Background
Topographic map illustration (GB/T7929-1995) stipulates: the slope refers to various naturally formed and artificially constructed slope sections with the slope of below 70 degrees. The version is shown in fig. 2. The solid line on the upper edge of the symbol indicates the upper edge line of the slope, and the long and short lines indicate the slope surface. The long line of the symbol is typically drawn to the toe, and when the slope is wide and there is a significant toe line, the toe line can be measured and represented by the range line (dotted line). General drawing method of slope symbols in computer aided drafting software: and after the upper ridge line and the toe line are determined, drawing a group of long and short toe lines pointing to the toe line from the upper ridge line. Wherein, the long line is generally drawn to the toe of a slope according to the requirements of national standards.
The long and short lines of the slope can be drawn by two methods: bisection and normal methods, as shown in figure 1. The bisection method is a method for bisecting the upper ridge line and the slope leg line according to a fixed length and connecting corresponding bisection points to generate the slope surface line. The length lines of the slope obtained by the method are called equal division slope length lines or equal division slope surface lines. The slope obtained by this method is called an equal-divided (reinforced) natural slope. The normal line method is that the upper edge line is divided equally according to a fixed length, and a group of normal line segments (vertical to the upper edge line) are respectively made towards the bottom line of the slope from each equal division point to generate the slope surface line. The length of the slope surface obtained by the method is called as the length of the normal slope surface or the normal slope surface line. The slope obtained by this method is called normal (reinforced) natural slope.
The method for generating the slope surface short line comprises the following steps: and (4) cutting long lines at intervals to generate slope short lines with fixed length. Among the methods for generating the slope surface long line, the method for generating the slope surface long line by the bisection method is relatively simple: and corresponding equally-divided points of the equally-divided upper ridge line and the slope bottom line are sequentially connected. The bisection method does not have the intersection phenomenon, but the slope surface 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 the method for generating the beautiful long lines of the non-crossed slope by using the normal method is the content related to the invention.
The generation of regular filling patterns such as parallel lines or cross lines is mature, however, normal slope surface lines have particularity that ① the importance of the upper edge line of the slope is far greater than that of the bottom line of the slope, namely the weight values of all sides of the polygon are different, ② the slope surface lines are drawn from the upper edge line to the bottom line of the slope and have directivity, ③ the slope surface lines are dynamically generated according to the relative positions, lengths and angles of the upper edge line and the bottom line of the slope and cannot be customized in advance, ④ the slope surface lines are normal line segments with equal intervals near the upper edge line, if intercepting operation is not carried out, a large amount of intersection can be carried out near the bottom line of the slope, the attractiveness of the filling pattern is damaged, few slope surface line software can realize the filling pattern generation method which is similar to the slope surface line, has directivity, needs irregular and dynamic generation of the intercepting operation of the pattern, is only used for solving the problem of the intersection of the slope surface line by a man-machine interaction mode, and the problem of manual intersection processing is only limited to the manual intersection of the slope surface line.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for dynamically generating a slope surface line by eliminating a non-crossed normal slope based on an intersection point extension line.
The method for eliminating the non-intersection normal slope surface line dynamic generation based on the intersection point extension line comprises the following steps:
1) drawing or selecting two multi-segment lines, and respectively determining the multi-segment lines as an upper ridge line and a bottom line of the slope;
2) obtaining line segments and nodes (not including a starting point and an end point) of the upper ridge line, numbering the line segments and the nodes according to a left-to-right (or right-to-left) sequence, and taking a first node as a current node;
3) dividing the upper edge line into equal parts according to fixed length, and respectively making a group of normal line segments perpendicular to the upper edge line from each equal division 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 lines belonging to the same line segment into a group according to the number of the line segments of the upper edge line, and sequentially renumbering the normal line segments in the same group;
5) taking out the normal line group set of all the adjacent line segments on the left side of the current node and the normal line group set of one line segment on the right side of the current node as a current group;
6) judging whether all the normal line segments in the set are processed: if the processing is finished, the dynamic generation method of the slope surface line without the cross normal is eliminated based on the intersection point extension line; otherwise, taking the next node as the current node, and executing the step 5);
7) taking the current node as a center, and pairing the normal line sections on the two sides of the node in a pairwise symmetric manner;
8) and simultaneously judging whether the n pairs of pairing method line segments are intersected: if so, performing step 9); if not, waiting for the n pairs of normal line segments to be completely processed, taking the next node as the current node, and directly repeating the step 6);
9) removing the redundant part from the self-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 the processed normal line segments, taking the next node as the current node, and repeating the step 6).
The invention has the beneficial effects.
The invention can obtain the normal slope surface line which is compact and has no cross, can effectively and automatically process the cross part of the normal slope surface line in parallel, avoids a large amount of complicated manual operations, greatly improves the efficiency of drawing a complex topographic map, increases the variety of the normal slope which is automatically drawn and has no cross, and ensures the requirements of the universality and the dynamic property of the automatic drawing of the slope.
Detailed Description
The dynamic generation method for eliminating the non-intersection normal slope surface line based on the intersection point extension line can effectively and automatically process the intersection part of the normal slope surface line in parallel, avoids a large amount of complicated manual operations, greatly improves the efficiency of drawing a complex topographic map, increases the variety of automatically drawn non-intersection normal slopes, and ensures the requirements of universality and dynamics of automatic slope drawing.
In order to achieve the purpose, the invention adopts the following technical scheme:
1) drawing or selecting two multi-segment lines, and respectively determining the multi-segment lines as an upper ridge line and a bottom line of the slope;
2) obtaining line segments and nodes (not including a starting point and an end point) of the upper ridge line, numbering the line segments and the nodes according to a left-to-right (or right-to-left) sequence, and taking a first node as a current node;
3) dividing the upper edge line into equal parts according to fixed length, and respectively making a group of normal line segments perpendicular to the upper edge line from each equal division 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 lines belonging to the same line segment into a group according to the number of the line segments of the upper edge line, and sequentially renumbering the normal line segments in the same group;
5) taking out the normal line group set of all the adjacent line segments on the left side of the current node and the normal line group set of one line segment on the right side of the current node as a current group;
6) judging whether all the normal line segments in the set are processed: if the processing is finished, the dynamic generation method of the slope surface line without the cross normal is eliminated based on the intersection point extension line; otherwise, taking the next node as the current node, and executing the step 5);
7) taking the current node as a center, and pairing the normal line sections on the two sides of the node in a pairwise symmetric manner;
8) and simultaneously judging whether the n pairs of pairing method line segments are intersected: if so, performing step 9); if not, waiting for the n pairs of normal line segments to be completely processed, taking the next node as the current node, and directly repeating the step 6);
9) removing the redundant part from the self-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 the processed normal line segments, taking the next node as the current node, and repeating the step 6).
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) to respectively determine an upper ridge line and a bottom line of a slope: drawing two multi-segment lines on the electronic topographic map by using a drawing tool or by connecting measurement coordinate points, wherein the multi-segment lines are used as space entities and stored in a file or a space database and displayed on a screen; selecting two newly generated multi-segment lines in a man-machine interaction mode, particularly a mouse selection mode, or selecting two multi-segment lines existing in a digital topographic map; and clicking one of the multiline segments by using a 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) to respectively determine an upper ridge line and a bottom line of a slope: drawing two multi-segment lines on the electronic topographic map by using a drawing tool or by connecting measurement coordinate points, wherein the multi-segment lines are used as space entities and stored in a file or a space database and displayed on a screen; selecting two newly generated multi-segment lines in a man-machine interaction mode, particularly a mouse selection mode, or selecting two multi-segment lines existing in a digital topographic map; and clicking one of the multiline segments by using a 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 obtaining line segments and nodes (not including start points and end points) of the upper ridge line in step 2), and numbering the line segments and nodes in order from left to right (or from right to left): ArcEngine from ESRI was used
A development kit, calling an IPointCollection interface to obtain a node of an upper ridge (polyline), defining a set variable (an array of node types), sequentially putting nodes into the numerical value from a second node to a node which is the last node, and taking a first node as a current node; calling an IPath interface to obtain a segment of an upper ridge (polyline), defining an aggregation variable (an array of segment types), and sequentially putting the segment into the array.
According to the above technical solution, as a further preferable technical solution of the above technical solution, the step of equally dividing the upper ridge line by a fixed length in the step 3) and making a group of normal line segments perpendicular to the upper ridge line from each equal division point to the slope bottom line respectively: determining an equal division distance, typically 4cm in length; defining a distance variable distance which represents the distance from one point on the upper ridge line to one end point of the upper ridge line, and initializing the distance variable to be 0; ArcEngine from ESRI was used
A development kit, wherein a QueryNormal method of an ICurve interface is called to generate a normal line perpendicular to an upper ridge line at a distance from the upper ridge line endpoint distance, and a constracticutextended method of an IConstructCurve interface is called to extend the normal line to a slope bottom line; accumulating the distance variable once by using the equal division distance, and repeating the step until the distance variable is larger than the upper valueThe lengths of the ridge lines are equal, so that a group of normal slope surface lines which are perpendicular to the upper ridge line and are arranged at equal intervals and between the upper ridge line and the slope bottom line are generated; and the normal slope lines are stored as spatial entities in a file or a spatial database.
According to the above technical solution, as a further preferred technical solution of the above technical solution, in the step 4), sequentially loading all the normal line segments generated in the step 3) into a set, dividing the normals belonging to the same line segment into a group according to the number of the line segments of the upper edge line, sequentially renumbering the normal line segments in the same group, and taking 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 to cooperate as the current group: defining A set variables, wherein A is the number of upper ridge line segments obtained in the step 2), and sequentially loading all normal line segments generated in the step 2) into the A sets.
According to the above technical solution, as a further preferred technical solution of the above technical solution, the method for extracting the normal line group set of all the adjacent line segments on the left side of the current node and the normal line group set of one line segment on the right side in step 5) to cooperate as the current group comprises: the index value of the current node is b (0< b < a-1), then 1, … …, b, b +1, for a total of b +1 sets of normal segments, 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 line segments in the set have been processed in step 6) includes: 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 so, not processing all the normal line segments in the set; and otherwise, all normal line segments in the processed set are processed, and the method for dynamically generating the slope surface line without the crossed normal slope is eliminated based on the intersection point extension line.
According to the above technical solution, as a further preferred technical solution of the above technical solution, the method for pairwise symmetrically pairing the normal line segments on both sides of the node with the current node as the center in step 7) comprises: taking the current node as the center and the index value thereof as b, matching the normal segment which is the maximum number and is not processed in the first group of normal segment sets (the index values of the normal segment sets are b, b-1, b-2 and … … in sequence) on the left side of the node with the minimum number and is not processed in the normal segment set (the index of the normal segment set is b +1) on the right side of the node; pairing the normal line segments which are numbered the second largest in the first group of normal line segment sets (the index of the normal line segment set is b, b-1, b-2 and … …) on the left side of the node and are not processed with the normal line segments which are numbered the second smallest in the first group of normal line segment sets (the index of the normal line segment set is b +1) on the right side of the node and are not processed with the normal line segments, … …, and so on until no matched normal line segments or all normal line segments are matched; if one group of normal line segment sets is processed, the group of normal line segments with the maximum number is paired with the normal line segments 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 determining whether n pairs of paired normal line segments intersect, in step 8), includes: starting computer parallel process and simultaneously using ArcEngine of ESRI company
A development kit calls an intercept method of an itologic operator interface to obtain an intersection point of the n pairs of normal line segments, and if the intersection point cannot be obtained, the computer obtains a conclusion that the normal line segments do not Intersect; and under the condition of no intersection, after the n pairs of normal line segments are processed completely, adding 1 to the index value of the current node, and changing b into b + 1.
The method in step 9) for removing the redundant part between the self-intersection point and the slope bottom line on the normal line segment according to the intersection point obtained in step 8), setting the pair of normal line segments as the processed normal line segments, and then taking the next node as the current node: starting computer parallel process and simultaneously using ArcEngine of ESRI company
A development kit calls a PutCoords method of the ILIne interface, simultaneously resets the end points of the n pairs of normal line segments as the intersection points obtained in the step 8), and judges whether the normal line structure is processed or notAnd setting the finished mark variable to true, and after n normal line segments are completely processed, adding 1 to the index value of the current node, wherein b is changed into b + 1.
Example (b):
in the drawing software (based on ArcEngine of ESRI corporation)
Platform developed "basic geographic information collection system" software) to draw two slopes.
Example 1 a more regular slope is drawn on a 1:1000 map: the upper ridge was 246.1 meters long (this value is a value converted into an actual measured distance), the bottom of the slope was 204.5 meters long, the upper ridge and the bottom of the slope were spaced at an average interval of 66.5 meters, and the long and short ridges were spaced at an interval of 1 meter. The included angle of each section of the upper ridge line is a slope of 166.5 degrees and 149.9 degrees respectively. A total of 124 long lines from 3.5 meters to 71.45 meters in length are produced. The process 14 takes 1.14 milliseconds for intersecting long lines. The slope is concise and beautiful.
Example 2 a more irregularly shaped ramp is drawn on a 1:1000 map: the length of the upper ridge is 220.9 meters, the length of the bottom line of the slope is 157.7 meters, the average interval between the upper ridge and the bottom line of the slope is 58.8 meters, and the interval between the long ridge and the short ridge is 1 meter. The included angles of all line segments of the upper ridge line are respectively a slope of 170.2 degrees and 130.8 degrees. A total of 110 long lines from 2.9 meters to 88.6 meters are produced. 44 intersecting long lines were processed, taking 1.1 milliseconds. The slope is concise and beautiful.
Other irregular slopes are shown in fig. 7.
In the embodiment, the method for dynamically generating the non-intersection normal slope surface line based on the intersection point extension line elimination is adopted, so that the intersection part of the normal slope surface line is effectively and automatically processed, a large amount of complicated manual operations are avoided, the drawing efficiency of a complex topographic map is greatly improved, the type of the non-intersection normal slope is automatically drawn, and the requirements on the universality and the dynamic property of the automatic drawing of the slope are met.
It will be apparent to those skilled in the art that modifications and equivalents may be made in the embodiments and/or portions thereof without departing from the spirit and scope of the present invention.