Background
Topography (GB/T7929-1995) specifies: the slope refers to various naturally-occurring and artificially-constructed slope sections with slopes below 70 degrees. The pattern of which is shown in figure 2. The upper solid line of the symbol represents the upper ridge of the slope, and the long and short lines represent the slope. The long line of symbols is generally drawn to the toe, which can be mapped when the slope is wide and there is a significant toe line, represented by a range line (dotted line). General drawing method of slope symbol in computer aided drawing software: and after the upper ridge line and the slope toe line are determined, a group of slope line lines with alternate lengths pointing to the slope toe line from the upper ridge line are drawn. The long line is generally drawn to the toe according to the requirements of the national standard.
The slope long and short lines have two drawing methods: the bisection method and the normal method are shown in fig. 1. And (3) dividing the upper ridge line and the slope toe line equally according to fixed lengths, and connecting corresponding equally dividing points to generate a slope line. The slope long and short lines obtained by the method are called equally divided slope long and short lines or equally divided slope lines. The ramp obtained by this method is called an aliquoting (reinforcing) natural ramp. The normal method is to equally divide the upper ridge line according to a fixed length, and the slope line is generated by respectively making a group of normal sections (perpendicular to the upper ridge line) to the slope bottom line from each equally divided point. The slope long and short lines obtained by the method are called normal slope long and short lines or normal slope lines. The slope obtained by this method is called normal (reinforced) natural slope.
The generation method of the slope short line comprises the following steps: and intercepting long lines at intervals to generate slope short lines with fixed lengths. In the method for generating the slope long line, the method for generating the slope long line by an equal division method is relatively simple: corresponding equal dividing points for equally dividing the upper ridge line and the slope bottom line are sequentially connected. The equal division method does not cross, but the slope long lines of the normal method cross each other in the automatic generation process. As shown in fig. 3, the slope lines generated by the normal method are very cluttered, so that the method of generating beautiful slope long lines without crossing by the normal method is the content of the invention.
The upper ridge line, the slope bottom line and two slopes at the two end edges of the upper ridge line and the slope bottom line can form a closed simple polygon, and the generation of the slope line is converted into a polygonal filling pattern or filling symbol generation problem. The generation of regular filling patterns such as parallel lines or intersecting lines is mature, but the normal slope lines have specificity: (1) the importance of the ridge line on the slope is far greater than that of the slope bottom line, namely the weight values of the sides of the polygon are different; (2) the slope lines are drawn from the upper edge line to the slope bottom line, and have directivity; (3) the slope line is dynamically generated according to the relative position, length and angle of the upper ridge line and the slope bottom line, and cannot be customized in advance; (4) the slope lines are equally spaced normal line sections near the upper ridge line, and if the intercepting operation is not performed, a large number of slope lines are crossed near the slope bottom line, so that the attractiveness of the filling pattern is damaged. There are few mapping and drafting software capable of realizing a filling pattern generation method which is directional and needs to intercept patterns and dynamically generate, and is similar to slope lines. Most of them use man-machine interaction mode to intercept slope line crossing portion, and manual operation is tedious and time-consuming. Or the problem of intersecting part of the normal slope surface line is solved by adopting a computer automatic processing mode, but the method is also limited to normal slopes with more regular shapes, as shown in fig. 4.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a dynamic generation method for slope lines without cross normal based on elimination of cross extension lines.
The method for dynamically generating the slope line without the cross normal based on the intersection point extension line elimination comprises the following steps:
1) Drawing or selecting two multi-section lines, and respectively determining an upper ridge line and a slope bottom line of a slope;
2) Obtaining line segments and nodes (excluding starting points and end points) of the upper ridge, numbering the line segments and the nodes in the order from left to right (or from right to left), and taking the first node as a current node;
3) Equally dividing the upper edge line according to a fixed length, and respectively making a group of normal line segments perpendicular to the upper edge line to the slope bottom line from each equally dividing point;
4) Sequentially loading all the normal line segments generated in the step 3) into a set, dividing the normal line belonging to the same line segment into a group according to the number of the line segments of the upper ridge line, and sequentially renumbering the normal line segments in the same group;
5) Taking out normal line group sets of all adjacent line segments at the left side of the current node and normal line group sets of one line segment at the right side of the current node to be used as current groups;
6) Judging whether all normal line segments in the set have been processed or not: if the processing is finished, eliminating the non-cross normal slope surface line dynamic generation method based on the intersection point extension line; otherwise, taking the next node as the current node, and executing the step 5);
7) Symmetrically pairing the normal line sections on two sides of the node by taking the current node as the center;
8) Meanwhile, judging whether n pairs of paired line segments intersect or not: if crossing then executing step 9); if the normal segments are not intersected, waiting for n pairs of normal segments to be processed completely, and taking the next node as the current node to directly repeat the step 6);
9) And (3) removing redundant parts from the intersection point to the slope bottom line on the normal line segment according to the intersection point obtained in the step (8), setting the pair of normal line segments as processed normal line segments, and repeating the step (6) by taking the next node as the current node.
The invention has the beneficial effects of.
The invention can obtain the overall compact normal slope line without crossing, effectively and automatically process the crossing part of the normal slope line in parallel, avoid a great deal of complicated manual operation, greatly improve the efficiency of drawing complex topographic map drawings, increase the variety of automatically drawing the normal slope without crossing, and ensure the requirements of universality and dynamics of automatic drawing of the slope.
Detailed Description
The intersection part of the normal slope surface line can be effectively and automatically processed in parallel by eliminating the slope surface line dynamic generation method without the intersection normal line based on the intersection point extension line, so that a great deal of complicated manual operation is avoided, the drawing efficiency of complex topographic map is greatly improved, the variety of automatically drawing slopes without the intersection normal line is increased, and the requirements of the universality and the dynamics of the automatic drawing of the slopes are ensured.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
1) Drawing or selecting two multi-section lines, and respectively determining an upper ridge line and a slope bottom line of a slope;
2) Obtaining line segments and nodes (excluding starting points and end points) of the upper ridge, numbering the line segments and the nodes in the order from left to right (or from right to left), and taking the first node as a current node;
3) Equally dividing the upper edge line according to a fixed length, and respectively making a group of normal line sections perpendicular to the upper edge line from each equally dividing point to the slope bottom line;
4) Sequentially loading all the normal line segments generated in the step 3) into a set, dividing the normal line belonging to the same line segment into a group according to the number of the line segments of the upper ridge line, and sequentially renumbering the normal line segments in the same group;
5) Taking out normal line group sets of all adjacent line segments at the left side of the current node and normal line group sets of one line segment at the right side of the current node to be used as current groups;
6) Judging whether all normal line segments in the set have been processed or not: if the processing is finished, eliminating the non-cross normal slope surface line dynamic generation method based on the intersection point extension line; otherwise, taking the next node as the current node, and executing the step 5);
7) Symmetrically pairing the normal line sections on two sides of the node by taking the current node as the center;
8) Meanwhile, judging whether n pairs of paired line segments intersect or not: if crossing then executing step 9); if the normal segments are not intersected, waiting for n pairs of normal segments to be processed completely, and taking the next node as the current node to directly repeat the step 6);
9) And (3) removing redundant parts from the intersection point to the slope bottom line on the normal line segment according to the intersection point obtained in the step (8), setting the pair of normal line segments as processed normal line segments, and repeating the step (6) by taking the next node as the current node.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the step of drawing or selecting two multi-segment lines in step 1) respectively determines an upper ridge line and a slope bottom line of the slope: drawing two multi-section lines on an electronic topographic map by using a drawing tool or adopting a mode of connecting measurement coordinate points, wherein the multi-section lines are stored in a file or a spatial database as spatial entities and are displayed on a screen; selecting two newly generated multi-line lines or two multi-line lines existing in the digital topographic map by adopting a man-machine interaction mode, in particular a mouse selection mode; and click one of the multi-line segments using the mouse pointer to determine the upper ridge of the slope.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the step of drawing or selecting two multi-segment lines in step 1) respectively determines an upper ridge line and a slope bottom line of the slope: drawing two multi-section lines on an electronic topographic map by using a drawing tool or adopting a mode of connecting measurement coordinate points, wherein the multi-section lines are stored in a file or a spatial database as spatial entities and are displayed on a screen; selecting two newly generated multi-line lines or two multi-line lines existing in the digital topographic map by adopting a man-machine interaction mode, in particular a mouse selection mode; and click one of the multi-line segments using the mouse pointer to determine the upper ridge of the slope.
According to the above-mentioned technical means, as a further preferable technical means of the above technical means, the step of obtaining the line segments and the nodes (excluding the start point and the end point) of the upper ridge in step 2) and numbering them in the order from left to right (or from right to left). ArcEngine Using ESRI company
Developing a package, calling an IPointCollection interface to obtain nodes of an upper edge (polyline), defining a collection variable (an array of node types), starting from a second node, sequentially putting the nodes into the value until the last-to-last node, and putting the first nodeThe individual nodes are used as current nodes; and calling an IPath interface to obtain a line segment of an upper ridge (polyline), defining a set variable (an array of line segment types), and sequentially placing the line segments into the array.
According to the above technical scheme, as a further preferable technical scheme of the above technical scheme, the step 3) of equally dividing the upper ridge line according to a fixed length, and making a group of normal line segments perpendicular to the upper ridge line to the slope bottom line from each equally divided point: determining an equal dividing distance, wherein the length of the upper graph is 4cm; defining a distance variable distance which represents the distance from one point on the upper edge line to one end point of the upper edge line, and initializing the distance variable to 0; arcEngine Using ESRI company
![Figure SMS_2](https://patentimages.storage.googleapis.com/45/24/49/cb04f11c34cab2/SMS_2.png)
A package is developed, a Querynormal method of the ICurve interface is called to generate a normal line perpendicular to an upper edge line at a distance from an end point of the upper edge line, and a structExtended method of the IContstructCurve interface is called to extend the normal line to a slope bottom line; accumulating the distance variable once by using the equal-dividing distance, and repeating the step until the distance variable is larger than the length of the upper ridge line, thereby generating a group of equidistant normal slope lines which are perpendicular to the upper ridge line and are between the upper ridge line and the slope bottom line; and the normal slope line is stored as a spatial entity in a file or spatial database.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the method in step 4) sequentially loads all the normal line segments generated in step 3) into one set, divides the normal line belonging to the same line segment into one group according to the number of the line segments of the upper edge line, sequentially renumbers the normal line segments in the same group, and takes out the normal line group set of all the adjacent line segments on the left side of the first node and the normal line group set of one line segment on the right side as the current group: defining A set variables, wherein A is the number of the upper ridge line segments obtained in the step 2), and sequentially loading all normal line segments generated in the step 2) into A sets.
According to the above technical solution, as a further preferable technical solution of the above technical solution, in the method for taking out the normal line group set of all the adjacent line segments on the left side and the normal line group set of one line segment on the right side of the current node as the current group in step 5): the index value of the current node is b (0 < b < A-1), then 1, … …, b, b+1, a total of b+1 normal segment sets are fetched.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the method for determining whether all the normal segments in the set have been processed in step 6) is as follows: judging whether the index value of the current node in the set variable is not greater than the number of elements in the set variable, if true, not processing all the normal line segments in the set; otherwise, all normal line segments in the processed set are eliminated based on the intersection point extension line, and the dynamic generation method of the slope line without the intersection normal is finished.
According to the above technical solution, as a further preferred technical solution of the above technical solution, the method for pairwise symmetric pairing of normal line segments on two sides of the node in step 7) with the current node as the center includes: the index value of the current node is b, and the normal line segment which is the largest number and is not processed in a first group of normal line segment sets (index values of the normal line segment sets are b, b-1, b-2 and … …) on the left side of the node and the normal line segment which is the smallest number and is not processed in a normal line segment set (index of the normal line segment set is b+1) on the right side of the node are paired; pairing the normal line segment which is not processed and is in the second large number in the first group of normal line segment sets (the index of the normal line segment sets is b, b-1, b-2 and … …) on the left side of the node with the normal line segment which is not processed and is in the second small number in the right side of the node (the index of the normal line segment set is b+1), … …, and so on until no pairing normal line segment or all normal line segments are paired; if one group of normal line segment sets are processed, the normal line segment with the largest serial number is paired with the normal line segment of other groups, and finally n pairs of paired normal line segment pairs are obtained.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the method for simultaneously judging whether n pairs of paired line segments intersect in step 8) is as follows: starting parallel processes of computerSimultaneously using arcEngine from ESRI company
A package is developed, an Intersect method of an ITopology operator interface is called to calculate the intersection point of n pairs of normal line segments, and if the intersection point cannot be calculated, a computer obtains a disjoint conclusion; and under the condition of no intersection, after the n pairs of normal line segments are completely processed, adding 1 to the index value of the current node, and changing b into b+1.
The method for removing the redundant part from the intersection point to the slope bottom line on the normal line segment according to the intersection point obtained in the step 8) and setting the pair of normal line segments as processed normal line segments, and taking the next node as the current node comprises the following steps: starting the computer parallel process while using arcEngine from ESRI company
And D), a package is developed, the PutCoords method of the ILine interface is called, meanwhile, the end point of n pairs of normal line segments is reset to be the intersection point obtained in the step 8), a flag variable in a normal line structure which is processed or not is set to be true, after all n pairs of normal line segments are processed, the index value of the current node is added with 1, and b is changed into b+1.
Examples:
in graphic software (ArcEngine based on ESRI company
"basic geographic information acquisition System" software developed by the platform).
Example 1 a more regular ramp was plotted on a map of 1:1000: the upper ridge line is 246.1 meters long (this value is converted to the value after the actual measurement distance), the slope bottom line is 204.5 meters long, the average spacing between the upper ridge line and the slope bottom line is 66.5 meters, and the long and short line spacing is 1 meter. And each section of the upper ridge has an included angle of 166.5 degrees and 149.9 degrees respectively. A total of 124 long lines with lengths from 3.5 meters to 71.45 meters are generated. Process 14 takes 1.14 milliseconds for intersecting long lines. The slope is concise and beautiful.
Example 2 a less irregularly shaped ramp was plotted on a map of 1:1000: the upper ridge line is 220.9 m long, the slope bottom line is 157.7 m long, the average interval between the upper ridge line and the slope bottom line is 58.8 m, and the interval between the long and short lines is 1 m. The included angles of all the line segments of the upper ridge are respectively 170.2 degrees and 130.8 degrees. 110 long lines with lengths ranging from 2.9 meters to 88.6 meters are generated. 44 intersecting long lines are processed, taking 1.1 milliseconds. The slope is concise and beautiful.
Other irregular slopes are shown in fig. 7.
According to the method, the intersection part of the normal slope surface line is effectively and automatically processed by adopting the method for eliminating the slope surface line without the cross normal based on the intersection point extension line, so that a great deal of complicated manual operation is avoided, the drawing efficiency of a complex topographic map is greatly improved, the variety of automatically drawing slopes without the cross normal is increased, and the requirements on the universality and the dynamics of the automatic drawing of the slopes are ensured.
Modifications of the embodiments described above, or equivalents of some of the features may be made by those skilled in the art, and any modifications, equivalents, improvements or etc. within the spirit and principles of the present invention are intended to be included in the scope of the present invention.