CN106530228A - Vector polygon right-angle correction method - Google Patents
Vector polygon right-angle correction method Download PDFInfo
- Publication number
- CN106530228A CN106530228A CN201610962658.XA CN201610962658A CN106530228A CN 106530228 A CN106530228 A CN 106530228A CN 201610962658 A CN201610962658 A CN 201610962658A CN 106530228 A CN106530228 A CN 106530228A
- Authority
- CN
- China
- Prior art keywords
- polygon
- right angle
- correction
- edge
- initial
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012937 correction Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000010276 construction Methods 0.000 claims description 27
- 238000004458 analytical method Methods 0.000 claims description 9
- 238000013519 translation Methods 0.000 claims description 7
- 238000012946 outsourcing Methods 0.000 claims description 5
- 238000001914 filtration Methods 0.000 claims description 4
- 238000004519 manufacturing process Methods 0.000 abstract description 6
- 238000012545 processing Methods 0.000 abstract description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000003780 keratinization Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000004606 Fillers/Extenders Substances 0.000 description 1
- 230000004308 accommodation Effects 0.000 description 1
- 230000003466 anti-cipated effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012732 spatial analysis Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention discloses a vector polygon right-angle correction method and belongs to the vector data production field. The method includes the following steps that: any one edge of a vector polygon is specified as an initial edge, the length of the next adjacent edge in a correcting direction is calculated; a correction rectangle is constructed for the initial edge and the adjacent edge, the intersection edge of the correction rectangle and the adjacent edge is obtained and adopted as the correction edge of the adjacent edge; the above processing is performed on the correction edge and the adjacent edge, the correction edges of all reaming edges except the initial edge are obtained one by one; and the last correction edge and the initial edge extend, and the intersection point of the last correction edge and the initial edge is obtained, and the correction edges of the initial edge and the last edge are obtained, polygon reconstruction is performed on all the correction edges, so that the right-angle correction of the vector polygon is completed. With the method adopted, accurate and efficient right-angle correction can be performed on the polygon, common vector data processing needs can be satisfied, the workload of manual operation can be reduced, and production efficiency can be improved.
Description
Technical field
The present invention relates to dependent vector data production technical field is surveyed and drawn, more particularly to a kind of vector polygon right angle entangles
Correction method.
Background technology
At present in terms of vector polygon data-reusing, due to different pieces of information source problem, data are required for greatly carrying out data
Correct so as to produce a large amount of on-right angle polygons.Existing vector data processes software and mostly vector polygon is not carried out directly
Keratinization corrects processing method, is essentially all manually to be adjusted, and artificial treatment is it cannot be guaranteed that polygon each angle is
Definitely right angle is while treatment effeciency is also than relatively low.
The content of the invention
It is an object of the invention to provide a kind of vector polygon right angle correcting method, so as to solve to deposit in prior art
Foregoing problems.
To achieve these goals, the technical solution used in the present invention is as follows:
A kind of vector polygon right angle correcting method, comprises the steps:
S1, it is intended that vector polygon is arbitrarily as initial side;
S2, obtains and corrects lower bar side adjacent with the initial side on direction, i.e. adjacent edge, and obtain the adjacent edge
The length of side;
S3, to the initial side, corrects rectangle using the length of side construction of the adjacent edge;
S4 obtains the rectangular edges that the correction rectangle is intersected with the adjacent edge, using the rectangular edges as the initial side
Right angle correct side;
S5, the right angle is corrected side as new initial side, repeats S2-S4, institute is removed in obtaining the polygon
State outside initial side it is all while right angle correct while;
S6, the last item right angle to obtaining in the initial side specified in S1 and S5 correct side and extend respectively,
Ask for intersection point and reconstruct, obtain two right angles and correct side;
S7, corrects side using all described right angle obtained in S4-S6, and polygon is corrected at construction right angle.
Preferably, the vector polygon is relatively regular polygon, including construction zone.
Preferably, also include step before step S1, determine the size of polygon angle, the polygon corner dimension exists
Can carry out in the angular range of right angle correction.
Preferably, the angular range for carrying out right angle correction is 75 ° -105 °.
Preferably, S2 comprises the steps:
The data of the initial side are carried out topological process, obtain corresponding structure node by S21;
S22, carries out buffer zone analysis, and carries out space intersection analysis to polygonal structure side, obtain to the structure node
Take the adjacent edge and calculate the length of side of the adjacent edge.
Preferably, S3 comprises the steps:
S31 is according to the length of side of the adjacent edge, described adjacent to initial side translation along the vertical edge direction of starting at
The corresponding distance of the length of side on side;
S32, is corresponding correction rectangle using construction minimum outsourcing rectangle in gained side before and after translation.
Preferably, S4 comprises the steps:
S41, topology process the correction rectangle, obtain the construction side of the vertical initial edge direction;
S42, carries out spatial filtering according to the adjacent edge, obtains the construction side intersected with the adjacent edge, as described
The correction side of adjacent edge.
Preferably, step S7 carries out planar polygon reconstruction specifically, correcting side to all right angles, obtains final
Right angle corrects polygon.
The invention has the beneficial effects as follows:A kind of vector polygon right angle correcting method is embodiments provided, is wrapped
Include following steps:Any a line of specified vector polygon is calculated and obtains the bar length of side under adjacent correction direction as initial side
Degree;Rectangle is corrected to initial side and adjacent edge construction, obtains the correction for the intersection edges of rectangle and adjacent edge being corrected as adjacent edge
Side;Next above-mentioned respective handling is done with adjacent edge to correcting side, gets entangling for all remaining sides in addition to initial side one by one
Positive side;Side and initial side corrected to the last item extend and ask for intersection point, so obtain initial side and the last item while correction while,
All correction sides are carried out with the right angle correction that polygon reconstruction completes vector polygon.Polygon can be carried out accurately and efficiently
Right angle is corrected, and meets general vector data process demand, reduces the workload of manual work, improve production efficiency.
Description of the drawings
Fig. 1 is vector polygon right angle correcting method flow chart provided in an embodiment of the present invention.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing, the present invention is entered
Row is further described.It should be appreciated that specific embodiment described herein is not used to only to explain the present invention
Limit the present invention.
As shown in figure 1, embodiments provide a kind of vector polygon right angle correcting method, the method include as
Lower step:
S1, it is intended that polygon is arbitrarily as initial side;
S2, obtains and corrects lower bar side adjacent with the initial side on direction, i.e. adjacent edge, and obtain the adjacent edge
The length of side;
S3, to the initial side, corrects rectangle using the length of side construction of the adjacent edge;
S4 obtains the rectangular edges that the correction rectangle is intersected with the adjacent edge, using the rectangular edges as the initial side
Right angle correct side;
S5, the right angle is corrected side as new initial side, repeats S2-S4, institute is removed in obtaining the polygon
State outside initial side it is all while right angle correct while;
S6, the last item right angle to obtaining in the initial side specified in S1 and S5 correct side and extend respectively,
Ask for intersection point and reconstruct, obtain two right angles and correct side;
S7, corrects side construction right angle using all described right angle obtained in S4-S6 and corrects polygon.
In embodiments of the present invention, correct in order to suitable right angle is compared to vector polygon, the present invention
In embodiment, construction has been used to correct rectangle.Correction rectangle is constructed by adjacent both sides, and then is accordingly corrected side.
Said method is corrected rectangle and further obtains corresponding correction side, pass through by specifying initial side to adjacent edge construction
Initial side and the last item are corrected and is finding intersection correction side when obtaining initial side and the last item, obtained by correcting side reconstruct
Cut-off keratinization corrects polygon.
The method is to the relevant GIS software of commonality vector data processing at this stage, it is impossible to enough to carry out right angle to polygon
Correct for processing effectively to supplement.Accurately and efficiently right angle can be carried out to correct to polygon, general vector data is met
Process demand, reduces the workload of manual work, improve production efficiency.
In a preferred embodiment of the present invention, step before step S1, can also be included,
Determine polygonal type, the polygonal angle can carry out the angular range of right angle correction.
S3 may include steps of:
S31 is according to the length of side of the adjacent edge, described adjacent to initial side translation along the vertical edge direction of starting at
The corresponding distance of the length of side on side;
S32, is corresponding correction rectangle using construction minimum outsourcing rectangle in gained side before and after translation;
S4 may include steps of:
S41, topology process the correction rectangle, obtain the construction side of the vertical initial edge direction;
S42, carries out spatial filtering according to the adjacent edge, obtains the construction side intersected with the adjacent edge, as described
The correction side of adjacent edge.
S6 to S7 specifically may include steps of:
Side is corrected to initial side and the last item to extend, it is ensured that the initial side after extension corrects side phase with the last item
Hand over, obtain corresponding intersection point;
Side is corrected to initial side and the last item according to intersection point to be reconstructed, obtain final correction side;
All correction sides after to acquisition carry out planar polygon reconstruction, obtain final right angle and correct polygon.
Specific embodiment:
A kind of vector polygon right angle correcting method is embodiments provided, is implemented using following steps:
Step one, asks for each side azimuth by each node coordinate of polygon, further obtains each adjacent edge angle, it is determined that
Polygonal type, the polygonal angle can carry out the angular range of right angle correction.
In the present embodiment, the angular range that can carry out right angle correction can be 75 ° -105 °.
Step 2, it is intended that polygon is arbitrarily as initial side.
Initial side data first, are carried out topological process, obtain corresponding structure node by step 3;Then, to construction
Node carries out buffer zone analysis, and then space intersection analysis is carried out to polygonal structure side, obtains adjacent edge and calculates its length of side.
Wherein it is possible to utilize FME softwares to provide Buffer methods, buffer zone analysis are carried out to structure node, and then is utilized
SpatialFilter methods carry out space intersection analysis to polygonal structure side, as will be understood by the skilled person in the art, also
Spatial analysis can be carried out using other existing methods.
Step 4, first, according to the length of side of the adjacent edge, described start at edge direction the initial side is translated along vertical
The corresponding distance of the length of side of the adjacent edge;Then, it is as corresponding using construction minimum outsourcing rectangle in gained side before and after translation
Correct rectangle.
Wherein it is possible to the Minimum Bounding Geometry instruments that ArcGIS softwares are provided are utilized, before and after translation
One group of side process, obtain minimum outsourcing rectangle.
Step 5, first, topology processes the correction rectangle, obtains the construction side of the vertical initial edge direction;Then,
Spatial filtering is carried out according to the adjacent edge, the construction side intersected with the adjacent edge is obtained, as the correction of the adjacent edge
Side.
Wherein it is possible to utilize the SpatialFilter methods that FME softwares are provided, obtained using the adjacent edge and correct side.
Step 6, the right angle is corrected side as new initial side, and repeat step three to step 5 is described until obtaining
In polygon in addition to the initial side it is all while right angle correct while.
Step 7, the last item right angle to obtaining in the initial side specified in step 2 and step 6 correct side point
Do not extended, ask for intersection point and reconstruct, obtained two right angles and correct side;
The Extender methods for wherein being provided using FME softwares are in the initial side specified in step 2 and step 6
The last item right angle for obtaining is corrected side and is extended, and then utilization space analysis asks for intersection point with the corresponding side starting section
Point reconstruct obtains right angle and corrects side.
Step 8, corrects side construction right angle using all described right angle obtained in step 5 to step 7 and corrects polygon
Shape.
The Feature To Plygon instruments for wherein being provided using ArcGIS softwares, to obtaining in step 5 to step 7
All described right angle correct side construction right angle and correct polygon.
By using above-mentioned technical proposal disclosed by the invention, having obtained following beneficial effect:The embodiment of the present invention is carried
A kind of feasible vector polygon right angle correcting method is supplied, has been comprised the steps:Any one of specified vector polygon
While as initial side, calculating and obtaining bar edge lengths under adjacent correction direction;Rectangle is corrected with adjacent edge construction to initial side, is obtained
Correction side of the intersection edges of correction rectangle and adjacent edge as adjacent edge;Next above-mentioned corresponding position is done with adjacent edge to correcting side
Reason, gets the correction side of all remaining sides in addition to initial side one by one;Correct side to ask for initial side extension to the last item
Intersection point, so obtain initial side and the last item while correction while, all correction sides are carried out with polygon reconstruction, and to complete vector more
Correct at the right angle of side shape.Accurately and efficiently right angle can be carried out to correct to polygon, general vector data is met and processed need
Ask, reduce the workload of manual work, improve production efficiency.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be with
The difference of other embodiment, between each embodiment identical similar part mutually referring to.
Those skilled in the art should be understood that the sequential of the method and step that above-described embodiment is provided can be entered according to practical situation
Row accommodation, is concurrently carried out also dependent on practical situation.
All or part of step in the method that above-described embodiment is related to can be instructed by program correlation hardware come
Complete, described program can be stored in the storage medium that computer equipment can read, for performing the various embodiments described above side
All or part of step described in method.The computer equipment, for example:Personal computer, server, the network equipment, intelligent sliding
Dynamic terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.;Described storage medium, for example:RAM、
ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, memory stick, webserver storage, network cloud storage
Deng.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by
One entity or operation are made a distinction with another entity or operation, and are not necessarily required or implied these entities or operation
Between there is any this actual relation or order.And, term " including ", "comprising" or its any other variant are anticipated
Covering including for nonexcludability, so that a series of process, method, commodity or equipment including key elements not only includes that
A little key elements, but also including other key elements being not expressly set out, or also include for this process, method, commodity or
The intrinsic key element of equipment.In the absence of more restrictions, the key element for being limited by sentence "including a ...", does not arrange
Except also there is other identical element in including the process of the key element, method, commodity or equipment.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
Depending on protection scope of the present invention.
Claims (8)
1. a kind of vector polygon right angle correcting method, it is characterised in that comprise the steps:
S1, it is intended that vector polygon is arbitrarily as initial side;
S2, obtains and corrects lower bar side adjacent with the initial side on direction, i.e. adjacent edge, and obtain the side of the adjacent edge
It is long;
S3, to the initial side, corrects rectangle using the length of side construction of the adjacent edge;
S4 obtains the rectangular edges that the correction rectangle is intersected with the adjacent edge, using the rectangular edges as the straight of the initial side
Correct side in angle;
S5, the right angle is corrected side as new initial side, is repeated S2-S4, is removed described in obtaining the polygon
Correct side in right angle when calculating all outside;
S6, the last item right angle to obtaining in the initial side specified in S1 and S5 correct side and extend respectively, ask for
Intersection point is simultaneously reconstructed, and is obtained two right angles and is corrected side;
S7, corrects side using all described right angle obtained in S4-S6, and polygon is corrected at construction right angle.
2. vector polygon right angle correcting method according to claim 1, it is characterised in that the vector polygon is
Relatively regular polygon, including construction zone.
3. vector polygon right angle correcting method according to claim 1, it is characterised in that also include before step S1
Step, determines the size of polygon angle, and the polygon corner dimension is in the angular range that can carry out right angle correction.
4. vector polygon right angle correcting method according to claim 3, it is characterised in that described to carry out right angle
The angular range of correction is 75 ° -105 °.
5. vector polygon right angle correcting method according to claim 1, it is characterised in that S2 comprises the steps:
The data of the initial side are carried out topological process, obtain corresponding structure node by S21;
S22, carries out buffer zone analysis, and space intersection analysis is carried out to polygonal structure side to the structure node, obtains institute
State adjacent edge and calculate the length of side of the adjacent edge.
6. vector polygon right angle correcting method according to claim 1, it is characterised in that S3 comprises the steps:
S31, according to the length of side of the adjacent edge, translates the adjacent edge to the initial side along the vertical edge direction of starting at
The corresponding distance of the length of side;
S32, is corresponding correction rectangle using construction minimum outsourcing rectangle in gained side before and after translation.
7. vector polygon right angle correcting method according to claim 1, it is characterised in that S4 comprises the steps:
S41, topology process the correction rectangle, obtain the construction side of the vertical initial edge direction;
S42, carries out spatial filtering according to the adjacent edge, obtains the construction side intersected with the adjacent edge, as described adjacent
While correction while.
8. vector polygon right angle correcting method according to claim 1, it is characterised in that step S7 is specifically, right
All right angles are corrected side and carry out planar polygon reconstruction, obtain final right angle and correct polygon.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962658.XA CN106530228A (en) | 2016-11-04 | 2016-11-04 | Vector polygon right-angle correction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610962658.XA CN106530228A (en) | 2016-11-04 | 2016-11-04 | Vector polygon right-angle correction method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106530228A true CN106530228A (en) | 2017-03-22 |
Family
ID=58326218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610962658.XA Pending CN106530228A (en) | 2016-11-04 | 2016-11-04 | Vector polygon right-angle correction method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106530228A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110727755A (en) * | 2019-10-14 | 2020-01-24 | 武汉汉达瑞科技有限公司 | Polygon squaring method, electronic equipment and storage medium |
CN112837394A (en) * | 2019-11-25 | 2021-05-25 | 珠海金山办公软件有限公司 | Polygon drawing method and device, electronic equipment and readable storage medium |
CN115619907A (en) * | 2022-12-15 | 2023-01-17 | 航天宏图信息技术股份有限公司 | Self-adaptive building squaring method and device |
-
2016
- 2016-11-04 CN CN201610962658.XA patent/CN106530228A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110727755A (en) * | 2019-10-14 | 2020-01-24 | 武汉汉达瑞科技有限公司 | Polygon squaring method, electronic equipment and storage medium |
CN110727755B (en) * | 2019-10-14 | 2022-02-08 | 武汉汉达瑞科技有限公司 | Terrain shape regularization method, electronic device and storage medium |
CN112837394A (en) * | 2019-11-25 | 2021-05-25 | 珠海金山办公软件有限公司 | Polygon drawing method and device, electronic equipment and readable storage medium |
CN115619907A (en) * | 2022-12-15 | 2023-01-17 | 航天宏图信息技术股份有限公司 | Self-adaptive building squaring method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Behjati et al. | Single image super-resolution based on directional variance attention network | |
CN104200212B (en) | A kind of building external boundary line drawing method based on airborne LiDAR data | |
Wang et al. | 3D-CenterNet: 3D object detection network for point clouds with center estimation priority | |
Zhao et al. | Mathematical morphology-based generalization of complex 3D building models incorporating semantic relationships | |
CN107392875A (en) | A kind of cloud data denoising method based on the division of k neighbours domain | |
CN106530228A (en) | Vector polygon right-angle correction method | |
Yang et al. | Multi-view semantic learning network for point cloud based 3D object detection | |
Li et al. | Geometric structure simplification of 3D building models | |
Wang et al. | Feature-sensitive tetrahedral mesh generation with guaranteed quality | |
CN104123343B (en) | It is a kind of towards the spatial data real-time coordinates conversion/projection transform method rendered | |
CN104299241A (en) | Remote sensing image significance target detection method and system based on Hadoop | |
CN104809760A (en) | Depth-first strategy based method for automatically constructing geo-spatial three-dimensional outline | |
Liu et al. | Coarse registration of point clouds with low overlap rate on feature regions | |
Chen et al. | Costformer: Cost transformer for cost aggregation in multi-view stereo | |
CN115984489B (en) | Three-dimensional reconstruction method, device and processing equipment of power transmission line | |
CN106023317A (en) | Weighted Voronoi diagram generation method used for big data test | |
Shi et al. | Filling n-sided regions with G 1 triangular Coons B-spline patches | |
CN105160704A (en) | Drawing method based on shared data of spatial triangular meshes and spatial quadrilaterals | |
CN113034515A (en) | Bounding box tree-based polygon clipping method, electronic device and storage medium | |
CN108052657A (en) | A kind of service label computational methods, system, equipment and computer storage media | |
CN109855622B (en) | Path searching method and device for mobile robot | |
Xian et al. | Efficient and effective cage generation by region decomposition | |
Baudouin et al. | Lloyd’s energy minimization in the L p norm for quadrilateral surface mesh generation | |
Akimaliev et al. | Improving skeletal shape abstraction using multiple optimal solutions | |
CN110322415A (en) | High-precision surface three-dimensional reconstruction method based on point cloud |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170322 |