Method for drawing stripe pattern spots fitted according to reference pattern layer in GIS data
Technical Field
The invention belongs to the technical field of drawing methods of image spots, and particularly relates to the technical field of a method for drawing strip-shaped image spots fitted according to a reference image layer in GIS data.
Background
Before 1:10000 land present data show that roads and rivers are represented in a linear pattern, and 1:5000 scale or greater scale, road and river will all be expressed with the planar figure, and planar figure is favorable to simplifying data structure's complexity, also can bring very big convenience for subsequent data application. The database after the completion of the initial survey data needs to be updated every year, which requires that the initial survey database be updated by drawing up the spots of newly added or changed roads and rivers.
Referring to fig. 1, the conventional drawing method for drawing roads and rivers is two, the first method is to draw single lines and then buffer the generated surface, but the first method has two disadvantages, namely that the corner is an arc, the second method is not well fitted with other image spots at the position where the end needs to be connected, and the workload of later data processing is increased; the second way is to draw along the contour of the road and river, which requires a relatively long time. The method provides a concept of drawing the graph to solve the problems of arc at the corner, end edge connection and drawing efficiency.
Technical disclosures relating to the striped patch drawing solutions were not retrieved by the retrieval.
Disclosure of Invention
The invention aims to solve the defects, and provides a method for drawing stripe pattern spots fitted according to a reference pattern layer in GIS data.
The invention is realized by adopting the following technical scheme.
A method for drawing stripe pattern spots fitted according to a reference pattern layer in GIS data comprises the following steps:
step 1: drawing a broken line L1 along the strip-shaped reference graph, wherein the end points of the drawn broken line L1 are a P1 point and a P2 point;
step 2: setting the width D of the ground object;
step 3: judging whether the fold line L1 is to be prolonged or not according to the judging method, and if the fold line L1 is to be prolonged, prolonging the fold line L1 in a prolonged mode, wherein the prolonged line is L2.
Step 4: offsetting the lengthened line L2; the offset comprises a left offset or a right offset or two-side offset;
step 5: a wire structure surface;
step 6: searching the associated pattern spots to form a pattern spot list T;
step 7: cutting the new structure surface.
The judging method of the step 3 comprises the following steps: whether the fold line L1 needs to be lengthened is based on whether the endpoints P1 and P2 are on the boundaries of other surfaces, and if the endpoints P1 and P2 are on the boundaries, the corresponding ends are lengthened.
The extension mode of the step 3 is as follows: endpoint of polyline L1: the straight lines formed by the P1 and the P2 and the previous nodes respectively are linearly prolonged, the previous node of the P1 is P3, and the previous node of the P2 is P4; the extended distance is 1 time of the width D of the ground object; the extended line is L2, and the endpoints are point P5 and point P6.
The left offset in the step 4 of the present invention is: l2 is shifted left along the drawing direction, the offset is 1 time the width D of the ground object, and the left offset line is L3.
The right offset in the step 4 of the present invention is: and (3) right-shifting L2 along the drawing direction, wherein the shift amount is 1 time of the width D of the ground object, and the right-shifting line is L4.
The offset of the two sides in the step 4 is: l2 is shifted left and right along the drawing direction, the offset is 0.5 times the width D of the ground feature, and the lines after the shifting are L5 and L6.
The invention comprises the following step 5: the wire structure surface is: drawing a structural plane A1 formed by L2 and a left offset line of the left offset pattern; drawing a structural plane A2 formed by L2 and a right offset line of the right offset pattern; drawing a structural surface A3 of the two-side offset pattern spots formed by two-side offset lines; the two ends of the structural surface A1 or A2 or A3 are connected by straight lines.
The invention comprises the following step 6: searching the associated pattern spots to form a pattern spot list T as follows: if the P1 end is prolonged, searching for a joint map spot by using a circle with the P5 as a circle center and 0.5D as a radius; if the P2 end is also prolonged, a circle with the P6 as the center and 0.5D as the radius is used for searching the associated pattern spots.
The invention comprises the following step 7: the new structure surface is cut: and sequentially cutting newly constructed structural planes A1, A2 or A3 by using the pattern spots in the T to obtain a final result A.
Compared with the prior art, the invention has the beneficial effects that,
1. drawing a single line to generate a strip-shaped pattern spot, avoiding drawing a whole circle around the outline of the ground object, and obviously improving the data production efficiency;
2. the problem of arc segments caused by line buffering is effectively avoided by using a line offset mode;
3. and cutting the newly generated graph by using the associated reference graph, so that the fitting of the new graph with the reference graph at the end is more accurate.
The invention is further explained below with reference to the drawings and the detailed description.
Drawings
FIG. 1 is a schematic diagram of a prior art defect;
FIG. 2 is a schematic diagram of step 1;
FIG. 3 is a schematic diagram of step 3;
FIG. 4 is a schematic diagram of step 4;
FIG. 5 is a schematic diagram of step 5;
FIG. 6 is a schematic diagram of step 6;
FIG. 7 is a schematic diagram of step 7;
FIG. 8 is a diagram illustrating a comparison of an embodiment of the present invention;
FIG. 9 is a schematic diagram of the steps of the present invention.
Detailed Description
See fig. 1, 2, 3, 4, 5, 6, 7, 8, 9.
A method for drawing stripe pattern spots fitted according to a reference pattern layer in GIS data comprises the following steps:
(1) And drawing a broken line (L1), wherein the end points of the drawn line are a P1 point and a P2 point.
(2) The width (D) of the feature to be drawn is input and the offset mode of the drawing line is selected, and the offset mode is divided into left offset, right offset and two-side offset. Left and right refer to drawing directions with respect to a line.
(3) And if the two ends of the line segment need to be prolonged, judging whether the end points P1 and P2 of the line are on the boundaries of other surfaces, and if the end points P1 and P2 are on the boundaries, prolonging the corresponding ends. The extending mode is that straight lines formed by endpoints (P1, P2) of the drawing line and the previous node (P3 is the previous node of the P1, and P4 is the previous node of the P2) are extended linearly, and the extending distance is 1 time of the width (D) of the ground feature. The extended line is L2, and the endpoints are point P5 and point P6.
(4) The extended line L2 is shifted according to a selected shifting mode, if the shifting mode is left shifting or right shifting, the shifting amount is 1 time of the feature width (D), the left shifting line is L3, and the right shifting line is L4; the offset of two sides is 0.5 times (0.5 x D) of the width of the ground object, and the offset lines are L5 and L6.
(5) The left offset pattern is formed by an L2 and L3 forming surface (A1), the right offset pattern is formed by an L2 and L4 forming surface (A2), the two offset pattern is formed by an L5 and L6 forming surface (A3), and the two ends are connected by straight lines.
(6) And searching the associated image spots, if the P1 end is prolonged, searching the associated image spots by using a circle with the P5 as the center of a circle and the radius of 0.5D, and if the P2 end is prolonged, searching the associated image spots by using a circle with the P6 as the center of a circle and the radius of 0.5D. These spots form a spot list T.
(7) And cutting the newly constructed surface, and sequentially cutting the newly constructed surface (A1, A2 or A3) by using the pattern spots in the T to obtain a final result (A).
(8) And (5) storing A.
Examples:
in the actual data production of a certain geographic area, a drawing tool is used for drawing a broken line first, then an operator sets the actual ground object width and the offset mode, and the offset mode can only select one of left offset, right offset and two-side offset, and a new face polygon is constructed according to parameters.
The basic operation steps are as follows: (1) drawing a broken line; (2) determining the width of the ground object and selecting an offset mode; (3) confirming the newly constructed face polygon.
The above steps are repeated, thereby completing the data production of such stripe pattern spots.
What has been described above is only a part of the specific embodiments of the present invention, and the specific contents or common knowledge known in the art are not described herein too much (including but not limited to shorthand, abbreviations, units commonly used in the art). It should be noted that the above embodiments do not limit the present invention in any way, and it is within the scope of the present invention for those skilled in the art to obtain the technical solution by equivalent substitution or equivalent transformation. The protection scope of the present application shall be subject to the content of the claims, and the description of the specific embodiments and the like in the specification can be used for explaining the content of the claims.