A plot mapping method and apparatus
By using UAV oblique photogrammetry and KD tree algorithm, the problems of high labor costs and low efficiency in village and town land ownership surveys have been solved, enabling simultaneous updates and efficient mapping of multiple land parcels.
Patent Information
- Application Number
- CN202211506879.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Existing technologies for village and town land ownership surveys suffer from high labor costs, low efficiency, and the need to map individual land parcels one by one, resulting in significant time consumption.
UAV oblique photogrammetry data was used to obtain parcel information. By supplementing the location information of boundary points, the nearest centroid was determined using the KD tree algorithm, and multiple parcels were updated.
It saves human resources, improves the efficiency of land parcel mapping, and can update multiple land parcels at the same time, reducing mapping time.
Smart Images

Figure CN115713601B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a plot surface drawing method and device. BACKGROUND
[0002] China is vast in territory, and the village and town cadastral survey is large in quantity and wide in range. The plot and other cadastral data collection and mapping work has the characteristics of large task quantity, high field intensity, tight time period, and large investment of technical personnel and measuring instruments and equipment.
[0003] At present, in the village and town cadastral survey, the combination of total station and GPS-RTK is mainly used for field collection of boundary point information and measurement of length and area. The data obtained by the field work is processed in the indoor work through the CASS software. In the CASS drawing process, only single plot surface can be drawn one by one. If the plot surface is updated, the field supplementary survey of the plot surface needs to be re-performed, and the supplementary survey data is imported into the CASS for corresponding plot update. However, the manual collection of boundary point information and other information consumes a large amount of human resources and is low in efficiency, and the single plot surface drawing one by one is time-consuming. SUMMARY
[0004] Therefore, the present application provides a plot surface drawing method and device to solve the problems of high labor cost, low efficiency and time-consuming caused by single plot surface drawing one by one in the prior art. The technical solutions are as follows:
[0005] A plot surface drawing method comprises the following steps:
[0006] Obtaining tilt photogrammetry data collected by a UAV on a to-be-measured region, and position information of a supplementary boundary point obtained by supplementary survey on a missing boundary point of the tilt photogrammetry data;
[0007] Drawing a plurality of plot surfaces contained in the to-be-measured region according to the tilt photogrammetry data, and determining the mass center and boundary range of the plurality of plot surfaces;
[0008] Constructing a KD tree with the mass center of the plurality of plot surfaces as a tree node, and determining the nearest neighbor mass center of the supplementary boundary point from the KD tree;
[0009] If the position information of the supplementary boundary point is within the boundary range of the nearest neighbor plot surface corresponding to the nearest neighbor mass center, updating the nearest neighbor plot surface according to the position information of the supplementary boundary point.
[0010] Optionally, the drawing of the plurality of plot surfaces contained in the to-be-measured region according to the tilt photogrammetry data, and the determination of the mass center and boundary range of the plurality of plot surfaces, comprises:
[0011] Processing the tilt photogrammetry data into a tilt photogrammetry three-dimensional model;
[0012] Collecting position information of a plurality of initial boundary points respectively corresponding to a plurality of land surfaces from the oblique photograph three-dimensional model by a graphic method;
[0013] Drawing the plurality of land surfaces according to the position information of the plurality of initial boundary points respectively corresponding to the plurality of land surfaces, and determining the center of mass and the boundary range of the plurality of land surfaces.
[0014] Optionally, the boundary range is a minimum circumscribed rectangle, and the position information of an initial boundary point comprises an x-axis coordinate value and a y-axis coordinate value of the initial boundary point.
[0015] Determining the center of mass and the boundary range of the plurality of land surfaces according to the position information of the plurality of initial boundary points respectively corresponding to the plurality of land surfaces, comprising:
[0016] For each land surface in the plurality of land surfaces:
[0017] Determining a maximum x-axis coordinate value and a minimum x-axis coordinate value from the x-axis coordinate values of the initial boundary points corresponding to the land surface;
[0018] Determining a maximum y-axis coordinate value and a minimum y-axis coordinate value from the y-axis coordinate values of the initial boundary points corresponding to the land surface;
[0019] Determining a minimum circumscribed rectangle of the land surface according to the maximum x-axis coordinate value, the minimum x-axis coordinate value, the maximum y-axis coordinate value and the minimum y-axis coordinate value;
[0020] Determining the center of mass of the land surface according to the x-axis coordinate values and the y-axis coordinate values of the initial boundary points corresponding to the land surface by using a polygon center of mass algorithm, or calculating the center of a minimum circumscribed rectangle of the land surface, and determining the calculated center as the center of mass of the land surface;
[0021] To obtain the center of mass and the minimum circumscribed rectangle of the plurality of land surfaces.
[0022] Optionally, the center of mass comprises an x-axis coordinate value and a y-axis coordinate value.
[0023] Constructing a KD tree with the center of mass of the plurality of land surfaces as a tree node, comprising:
[0024] Determining the maximum value of the x-axis range difference and the y-axis range difference of each center of mass in a to-be-processed center of mass set with the center of mass of the plurality of land surfaces as the to-be-processed center of mass set, wherein the range difference of a coordinate axis refers to the difference between the maximum coordinate value and the minimum coordinate value of each center of mass on the coordinate axis;
[0025] Determining the coordinate axis corresponding to the maximum value as a split axis, sorting the to-be-processed center of mass set according to the coordinate values of each center of mass on the split axis, and determining the middle center of mass in the sorted to-be-processed center of mass set as the parent node corresponding to the split axis;
[0026] clustering the centroids in the to-be-processed centroid set except the parent node into a left set and a right set under the parent node according to whether the coordinate value of each centroid in the to-be-processed centroid set on the split axis is greater than the coordinate value of the parent node on the split axis, wherein the centroids in the left set and the right set are child nodes of the parent node;
[0027] For any one of the left set or the right set, determining whether the number of the centroids contained in the set is greater than 1, if yes, taking the set as the to-be-processed centroid set and returning to execute the determining of the maximum value of the x-axis range difference and the y-axis range difference of each centroid in the to-be-processed centroid set.
[0028] Optionally, the clustering the centroids in the to-be-processed centroid set except the parent node into a left set and a right set under the parent node according to whether the coordinate value of each centroid in the to-be-processed centroid set on the split axis is greater than the coordinate value of the parent node on the split axis comprises:
[0029] For each centroid in the to-be-processed centroid set except the parent node, if the coordinate value of the centroid on the split axis is greater than the coordinate value of the parent node on the split axis, the centroid is clustered into the right set, otherwise, the centroid is clustered into the left set.
[0030] Optionally, the determining the nearest neighbor centroid of the supplementary address point from the KD tree comprises:
[0031] taking the root node in the KD tree as the nearest neighbor node and calculating a first Euclidean distance between the supplementary address point and the nearest neighbor node;
[0032] determining whether the first coordinate value is less than the second coordinate value, if yes and there is a left child node under the nearest neighbor node, taking the left child node as a candidate node, if not and there is a right child node under the nearest neighbor node, taking the right child node as the candidate node, wherein the first coordinate value is the coordinate value of the supplementary address point on the corresponding split axis of the nearest neighbor node, and the second coordinate value is the coordinate value of the nearest neighbor node on the corresponding split axis;
[0033] calculating a second Euclidean distance between the supplementary address point and the candidate node;
[0034] if the second Euclidean distance is less than the first Euclidean distance, taking the candidate node as the nearest neighbor node and the second Euclidean distance as the first Euclidean distance, and returning to execute the determining of whether the first coordinate value is less than the second coordinate value;
[0035] in the determining of whether the first coordinate value is less than the second coordinate value, if there is no left child node or right child node under the nearest neighbor node, or if the second Euclidean distance is greater than or equal to the first Euclidean distance, taking the parent node of the nearest neighbor node as a backtracking node;
[0036] A difference between coordinate values of the backtracking node on a corresponding split axis of the backtracking node is calculated as a backtracking distance;
[0037] If the first Euclidean distance is less than the backtracking distance, the nearest neighbor node is determined as the nearest neighbor centroid, and if the first Euclidean distance is greater than or equal to the backtracking distance, a sub-node not traversed under the backtracking node is taken as a candidate node, and a second Euclidean distance between the backtracking node and the candidate node is calculated.
[0038] Optionally, the method further comprises:
[0039] If the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor parcel ground corresponding to the nearest neighbor centroid, a minimum Euclidean distance between the supplementary boundary point and the nearest neighbor parcel ground is calculated.
[0040] It is judged whether the minimum Euclidean distance is less than a preset first distance threshold, and if so, the nearest neighbor parcel ground is updated according to the position information of the supplementary boundary point.
[0041] Optionally, the method further comprises:
[0042] If the minimum Euclidean distance is greater than or equal to the first distance threshold, the nearest neighbor centroid of the supplementary boundary point is deleted, and a KD tree is constructed with the remaining centroids after deleting the nearest neighbor centroid as tree nodes, and the method returns to determine the nearest neighbor centroid of the supplementary boundary point from the KD tree.
[0043] Optionally, the nearest neighbor parcel ground is updated according to the position information of the supplementary boundary point, comprising:
[0044] The minimum Euclidean distance between the supplementary boundary point and the nearest neighbor parcel ground is calculated.
[0045] If the minimum Euclidean distance is greater than a preset second distance threshold, the supplementary boundary point is taken as a newly added boundary point, and the nearest neighbor parcel ground is updated based on the position information of the newly added boundary point.
[0046] If the minimum Euclidean distance is less than or equal to the second distance threshold, the supplementary boundary point is taken as a replacement boundary point, and the nearest neighbor parcel ground is updated based on the position information of the replacement boundary point.
[0047] A parcel ground mapping device, comprising:
[0048] A data acquisition module is configured to acquire oblique photogrammetry data collected by a UAV on a to-be-measured region, and position information of a supplementary boundary point obtained by supplementing a missing boundary point of the oblique photogrammetry data;
[0049] A parcel ground information determination module is configured to determine centroids and boundary ranges of a plurality of parcel grounds contained in the to-be-measured region according to the oblique photogrammetry data;
[0050] The nearest neighbor centroid determination module is used to construct a KD tree with the centroids of multiple parcels as tree nodes, and determine the nearest neighbor centroid of the supplementary boundary point from the KD tree;
[0051] The first ground update module is used to update the nearest neighbor ground based on the location information of the supplementary boundary point if the location information of the supplementary boundary point is within the boundary range of the nearest neighbor ground corresponding to the nearest centroid.
[0052] As can be seen from the above technical solution, the land parcel mapping method provided in this application first maps multiple land parcels using oblique photogrammetry data collected by an UAV from the area to be measured. Since the oblique photogrammetry data may be missing some boundary points, this application also needs to supplement the missing boundary points. Then, based on the location information of the supplemented boundary points, the nearest neighbor land parcels among the multiple land parcels are updated, ensuring that the updated multiple land parcels are more accurate. This application only requires manual measurement for supplemented boundary points, saving manpower and improving the efficiency of land parcel mapping. Furthermore, when multiple supplemented boundary points are included, the method of this application can simultaneously update multiple nearest neighbor land parcels based on the location information of multiple supplemented boundary points, saving mapping time for multiple land parcels and further improving the mapping efficiency of multiple land parcels. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0054] Figure 1 A flowchart illustrating a land parcel mapping method provided in this application embodiment;
[0055] Figure 2(a) is a schematic diagram of the positional relationship of an odd number of centroids;
[0056] Figure 2(b) is a schematic diagram of a KD tree constructed with an odd number of centroids;
[0057] Figure 3(a) is a schematic diagram of the positional relationship of an even number of centroids;
[0058] Figure 3(b) is a schematic diagram of a KD tree constructed with an even number of centroids;
[0059] Figure 4 This is a schematic diagram of the structure of a land parcel mapping device provided in an embodiment of this application;
[0060] Figure 5A hardware structure block diagram of a plot mapping device is provided in the embodiments of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the protection scope of the present application.
[0062] The present application provides a plot mapping method. Next, the plot mapping method provided by the present application will be introduced through the following embodiments.
[0063] Please refer to Figure 1 , which shows a flowchart of a plot mapping method provided by the embodiments of the present application. The method can include the following steps.
[0064] In step S101, the tilt photogrammetry data collected by the unmanned aerial vehicle for the region to be measured is obtained, and the position information of the supplementary boundary point obtained by supplementary measurement of the missing boundary point of the tilt photogrammetry data is obtained.
[0065] Specifically, according to the tilt photogrammetry principle, the present application can use the unmanned aerial vehicle to perform tilt photogrammetry on the region to be measured to obtain the tilt photogrammetry data of the region to be measured. The tilt photogrammetry data is the three-dimensional real scene data of the region to be measured.
[0066] Since the tilt photogrammetry is performed on the region to be measured, there may be areas that are shielded or unclear in the region to be measured, resulting in missing of some boundary points. In order to avoid inaccurate plot mapping due to missing of some boundary points, the present application also needs field personnel to perform supplementary measurement on the missing boundary points of the tilt photogrammetry data. Thus, the present application can obtain the position information of the supplementary boundary points.
[0067] Optionally, the process of the field personnel performing supplementary measurement on the missing boundary points of the tilt photogrammetry data can include that the field personnel holds a related device (for example, a PAD) to perform on-site pointing. In the process of on-site pointing, it is determined whether there are boundary points that cannot be obtained by graphic method according to the tilt photogrammetry three-dimensional model processed from the tilt photogrammetry data. If there are erroneous, unclear or shielded boundary points, these boundary points are supplemented. If there are not, field supplement is not needed.
[0068] In this embodiment, the position information, attribute information (land surface indicating to which user the supplementary boundary point belongs) and the like of the supplementary boundary point can be obtained through supplementary survey. The application can store the information of the supplementary boundary point as a point-shaped Shapefile file. Here, the Shapefile file is a vector graphics format file that saves the position and related attributes of geometric figures, i.e., position coordinates and the like. Then, optionally, the position information of the supplementary boundary point can be obtained from the Shapefile file. For example, the application can use the PyShp library in Python to open the Shapefile file of the supplementary boundary point by using Reader to obtain the position information of the supplementary boundary point from the Shapefile file.
[0069] In step S102, a plurality of land surfaces contained in the to-be-measured region are drawn according to the oblique photogrammetry data, and the centroids and boundary ranges of the plurality of land surfaces are determined.
[0070] Specifically, the oblique photogrammetry data is three-dimensional real scene data of the to-be-measured region, so the plurality of land surfaces contained in the to-be-measured region can be drawn based on the oblique photogrammetry data.
[0071] Since the oblique photogrammetry data may contain missing boundary points (i.e., supplementary boundary points), the land surfaces containing the supplementary boundary points in the plurality of land surfaces drawn in this step are inaccurate. In order to accurately draw the land surfaces containing the supplementary boundary points, the position information of the supplementary boundary points needs to be obtained in the foregoing step, and then the supplementary boundary points need to be corresponded to the land surfaces one by one, and then the land surfaces are updated based on the corresponding supplementary boundary points.
[0072] In order to make the supplementary boundary points correspond to the land surfaces one by one, the centroids and boundary ranges of the plurality of land surfaces need to be determined in this step based on the oblique photogrammetry data.
[0073] In step S103, a KD tree is constructed with the centroids of the plurality of land surfaces as tree nodes, and the nearest neighbor centroid of the supplementary boundary point is determined from the KD tree.
[0074] Specifically, in general, the distances between the boundary points contained in a land surface and the centroid of the land surface are relatively closer, and the distances between the boundary points and the centroids of other land surfaces are relatively farther. Therefore, the application can construct a KD tree according to the centroids of the plurality of land surfaces, and then determine the centroid with the closest distance to the supplementary boundary point from the KD tree. In order to facilitate subsequent description, the determined centroid is defined as the nearest neighbor centroid of the supplementary boundary point.
[0075] If the position information of the supplementary boundary point is within the boundary range of the nearest neighbor parcel surface corresponding to the nearest neighbor centroid of the supplementary boundary point, the nearest neighbor parcel surface is updated according to the position information of the supplementary boundary point.
[0076] Step S104, if the position information of the supplementary boundary point is within the boundary range of the nearest neighbor parcel surface corresponding to the nearest neighbor centroid, the nearest neighbor parcel surface is updated according to the position information of the supplementary boundary point.
[0077] Here, the nearest neighbor parcel surface refers to the parcel surface corresponding to the nearest neighbor centroid of the supplementary boundary point in the plurality of parcel surfaces.
[0078] In the present application, if the position information of a supplementary boundary point is within the boundary range of the nearest neighbor parcel surface corresponding to the nearest neighbor centroid of the supplementary boundary point, it is considered that the supplementary boundary point belongs to the nearest neighbor parcel surface, and the nearest neighbor parcel surface is updated according to the position information of the supplementary boundary point, so as to draw a more accurate parcel surface.
[0079] The parcel surface drawing method provided by the present application first draws a plurality of parcel surfaces from the oblique photogrammetry data collected by the unmanned aerial vehicle in the to-be-measured region. Since the oblique photogrammetry data may miss some boundary points, the present application also needs to measure the missing boundary points of the oblique photogrammetry data, and then update the nearest neighbor parcel surface in the plurality of parcel surfaces based on the position information of the supplementary boundary point, so as to ensure that the updated plurality of parcel surfaces are more accurate. The present application only needs to measure the supplementary boundary point manually, which saves human resources and improves the efficiency of drawing the parcel surface. At the same time, when multiple supplementary boundary points are included, the method of the present application can update multiple nearest neighbor parcel surfaces based on the position information of multiple supplementary boundary points, which saves the drawing time of multiple parcel surfaces and further improves the drawing efficiency of multiple parcel surfaces.
[0080] In some embodiments of the present application, the process of drawing a plurality of parcel surfaces contained in the to-be-measured region according to the oblique photogrammetry data and determining the centroid and boundary range of the plurality of parcel surfaces is introduced.
[0081] Here, the process of drawing a plurality of parcel surfaces contained in the to-be-measured region according to the oblique photogrammetry data and determining the centroid and boundary range of the plurality of parcel surfaces can include:
[0082] Step S01, processing the oblique photogrammetry data into an oblique photogrammetry three-dimensional model.
[0083] Optionally, the oblique photogrammetry data can be processed by the context capture software to obtain an oblique photogrammetry three-dimensional model. Here, the processing in the industry includes data preprocessing, space three encryption operation, image dense matching, texture mapping, digital surface model (DSM) generation and the like.
[0084] Among them, the data preprocessing refers to image rectification, color uniformity processing and the like of the oblique photogrammetry data, so that the oblique photogrammetry data displays the ground objects clean, clear levels, consistent color, moderate contrast; the space three encryption operation refers to a small amount of field measurement of ground control points, control point encryption is carried out through the indoor, the elevation and the plane position of the encrypted point are obtained; the image dense matching refers to establishing the connection relationship between different images, automatically identifying the same point; the digital surface model generation is to obtain the ground elevation model of the height of buildings, bridges and trees and the like; the texture mapping refers to mapping the texture pixels in the texture space to the screen space pixels, matching the position information and the texture information to generate a three-dimensional model.
[0085] In the present application, the processing in the industry can also obtain a digital orthophoto map (DOM), and the digital orthophoto map DOM and the oblique photogrammetry three-dimensional model can assist the field personnel to determine the supplementary boundary point.
[0086] Step S02, the position information of the initial boundary point corresponding to each of the multiple land surfaces is collected from the oblique photogrammetry three-dimensional model by the graphic method.
[0087] Optionally, the position information of the initial boundary point corresponding to each of the multiple land surfaces can be collected based on the oblique photogrammetry three-dimensional model by the MapMatrix 3D software, and the data format is a planar Shapefile file.
[0088] Step S03, according to the position information of the initial boundary point corresponding to each of the multiple land surfaces, the multiple land surfaces are drawn, and the centroid and the boundary range of the multiple land surfaces are determined.
[0089] The present application can draw the multiple land surfaces according to the position information of the initial boundary point corresponding to each of the multiple land surfaces, and the present application can determine the centroid and the boundary range of the multiple land surfaces according to the position information of the initial boundary point corresponding to each of the multiple land surfaces.
[0090] In some embodiments of the present application, taking any one of the multiple land surfaces as an example, the process of determining the centroid and the boundary range of the land surface according to the position information of the initial boundary point corresponding to the land surface is introduced.
[0091] Optionally, the boundary range of the land parcel can be a minimum circumscribed rectangle of the land parcel, and the position information of the initial boundary point includes an x-axis coordinate value and a y-axis coordinate value of the initial boundary point, where the coordinate system composed of the x-axis and the y-axis is a preset coordinate system.
[0092] Then, according to the position information of the initial boundary point corresponding to the land parcel, the process of determining the centroid and the boundary range of the land parcel can include:
[0093] Step S031: determining a maximum x-axis coordinate value and a minimum x-axis coordinate value from the x-axis coordinate values of the initial boundary points corresponding to the land parcel, and determining a maximum y-axis coordinate value and a minimum y-axis coordinate value from the y-axis coordinate values of the initial boundary points corresponding to the land parcel.
[0094] It should be understood that a land parcel is composed of multiple initial boundary points, and the x-axis coordinate values and the y-axis coordinate values of the multiple initial boundary points are not completely the same. In this step, the maximum value and the minimum value can be determined from the x-axis coordinate values of the initial boundary points corresponding to the land parcel. For the convenience of subsequent description, the determined maximum value is defined as a maximum x-axis coordinate value X max , and the determined minimum value is defined as a minimum x-axis coordinate value X min .
[0095] Meanwhile, in this step, the maximum value and the minimum value can be determined from the y-axis coordinate values of the initial boundary points corresponding to the land parcel. For the convenience of subsequent description, the determined maximum value is defined as a maximum y-axis coordinate value Y max , and the determined minimum value is defined as a minimum y-axis coordinate value Y min .
[0096] Step S032: determining a minimum circumscribed rectangle of the land parcel according to the maximum x-axis coordinate value, the minimum x-axis coordinate value, the maximum y-axis coordinate value, and the minimum y-axis coordinate value.
[0097] Step S033: determining the centroid of the land parcel according to the x-axis coordinate values and the y-axis coordinate values of the initial boundary points corresponding to the land parcel by using a polygon centroid algorithm, or calculating the center of the minimum circumscribed rectangle of the land parcel, and determining the calculated center as the centroid of the land parcel.
[0098] According to the above steps S031 to S033, the centroids and the minimum circumscribed rectangles of multiple land parcels can be calculated, that is, the centroids and the boundary ranges of the multiple land parcels can be obtained.
[0099] According to the above process, the position information of the initial boundary point includes the x-axis coordinate value and the y-axis coordinate value, and correspondingly, the centroid of each land parcel is also composed of the x-axis coordinate value and the y-axis coordinate value.
[0100] Based on this, in some embodiments of the present application, the process of constructing a KD tree with the centroids of multiple land parcels as tree nodes is described for step S103.
[0101] Optionally, the process of constructing a KD tree with the centroids of multiple land parcels as tree nodes can include:
[0102] Step S11, taking the centroids of multiple land parcels as a set of centroids to be processed, determining the maximum value of the x-axis range difference and the y-axis range difference of each centroid in the set of centroids to be processed.
[0103] Wherein, the range difference of a coordinate axis refers to the difference between the maximum coordinate value and the minimum coordinate value of each centroid on the coordinate axis.
[0104] The set of centroids to be processed includes multiple centroids, and the x-axis coordinate values and y-axis coordinate values of the multiple centroids are not completely the same. In this step, the x-axis coordinate values of each centroid can be compared to obtain the maximum x-axis coordinate value and the minimum x-axis coordinate value, and the difference is calculated to obtain the x-axis range difference of each centroid. And, the y-axis coordinate values of each centroid are compared to obtain the maximum y-axis coordinate value and the minimum y-axis coordinate value, and the difference is calculated to obtain the y-axis range difference of each centroid. Then, the x-axis range difference and the y-axis range difference are compared to obtain the maximum value.
[0105] Step S12, determining the coordinate axis corresponding to the maximum value as the split axis, sorting the set of centroids to be processed according to the coordinate values of each centroid on the split axis, and determining the middle centroid in the sorted set of centroids to be processed as the parent node corresponding to the split axis.
[0106] Specifically, in this step, the coordinate axis corresponding to the maximum value can be determined as the split axis, and then each centroid in the set of centroids to be processed can be sorted according to its coordinate value on the split axis from small to large or from large to small to determine the middle centroid in the sorted set of centroids to be processed. If the set of centroids to be processed includes an odd number of centroids, the centroid at the median value in the sorted set of centroids is taken as the middle centroid. If the set of centroids to be processed includes an even number of centroids, one of the two centroids in the middle of the sorted set of centroids is selected as the middle centroid.
[0107] Here, "sorting the set of centroids to be processed according to the coordinate values of each centroid on the split axis" includes: if the split axis is the x-axis, the x-axis coordinate values of each centroid included in the set of centroids to be processed are sorted in order from small to large or from large to small; if the split axis is the y-axis, the y-axis coordinate values of each centroid included in the set of centroids to be processed are sorted in order from small to large or from large to small.
[0108] Step S13, according to whether the coordinate value of each centroid in the centroid set to be processed on the split axis is greater than the coordinate value of the parent node on the split axis, the centroids in the centroid set to be processed except the parent node are clustered into the left set and the right set under the parent node.
[0109] Here, the centroids in the left set and the right set are child nodes of the parent node.
[0110] In an optional embodiment, the process of the present step includes: for each centroid in the centroid set to be processed except the parent node, if the coordinate value of the centroid on the split axis is greater than the coordinate value of the parent node on the split axis, the centroid is clustered into the right set, otherwise, the centroid is clustered into the left set.
[0111] Specifically, in the case where the split axis is the x axis, if the x axis coordinate value of the centroid is greater than the x axis coordinate value of the parent node, the centroid is clustered into the right set under the parent node, otherwise, the centroid is clustered into the left set; in the case where the split axis is the y axis, if the y axis coordinate value of the centroid is greater than the y axis coordinate value of the parent node, the centroid is clustered into the right set under the parent node, otherwise, the centroid is clustered into the left set.
[0112] Step S14, for any one of the left set or the right set, it is judged whether the number of centroids contained in the set is greater than 1, if yes, the set is taken as the centroid set to be processed, and the process of determining the maximum value of the x axis range difference and the y axis range difference of each centroid in the centroid set to be processed is returned to be executed.
[0113] Specifically, if the number of centroids contained in the left set or the right set is greater than 1, it is indicated that the next layer of tree nodes can be continued to be constructed, and then the set needs to be taken as the centroid set to be processed, and the process of determining the maximum value of the x axis range difference and the y axis range difference of each centroid in the centroid set to be processed is returned to be executed.
[0114] In order to make those skilled in the art understand the above process better, the following two examples are described.
[0115] Example a: the process is executed according to the following process in the case where the centroids of the multiple land surfaces include an odd number of centroids.
[0116] For example, the centroids of the multiple land surfaces include: (7, 2), (5, 4), (9, 6), (2, 3), (8, 1), and the positional relationship is as shown in FIG. 2(a).
[0117] Step a1: Firstly, (7, 2), (5, 4), (9, 6), (2, 3), (8, 1) are taken as the centroid set to be processed, the x-axis range difference is the difference between the maximum x-axis coordinate value 9 and the minimum x-axis coordinate value 2 of each centroid, that is, the x-axis range difference of each centroid is 7; the y-axis range difference is the difference between the maximum y-axis coordinate value 6 and the minimum y-axis coordinate value 1 of each centroid, that is, the y-axis range difference of each centroid is 5; then the maximum value in the x-axis range difference and the y-axis range difference is 7.
[0118] Step a2: The coordinate axis corresponding to the maximum value 7, that is, the x-axis, is determined as the division axis, and each centroid is sorted according to the x-axis coordinate value, for example, the sorting is: (2, 3), (5, 4), (7, 2), (8, 1), (9, 6), and the middle centroid (7, 2) is determined as the parent node (here, the root node of the KD tree) corresponding to the division axis 7.
[0119] Step a3: The centroids with x-axis coordinate values less than 7 are divided into the left set {(2, 3), (5, 4)} under (7, 2); the centroids with x-axis coordinate values greater than 7 are divided into the right set {(8, 1), (9, 6)} under (7, 2).
[0120] Step a4: The number of centroids contained in the left set and the right set is greater than 1.
[0121] For the left set {(2, 3), (5, 4)}, the x-axis range difference is 3, the y-axis range difference is 1, and the maximum value is 3; for the right set {(8, 1), (9, 6)}, the x-axis range difference is 1, the y-axis range difference is 5, and the maximum value is 5.
[0122] Step a5: For the left set {(2, 3), (5, 4)}, the x-axis corresponding to the maximum value 3 is taken as the division axis, the centroids in the left set are sorted according to the x-axis coordinate value, and the middle centroid (5, 4) (or (2, 3)) is determined as the parent node corresponding to the division axis 3; the centroid with the x-axis coordinate value less than 5 is divided into the left set {(2, 3)} under (5, 4), at this time, the left set contains only one centroid, and the construction of this part is ended.
[0123] Step a6: For the right set {(8, 1), (9, 6)}, the y-axis corresponding to the maximum value 5 is taken as the division axis, the centroids in the right set are sorted according to the y-axis coordinate value, and the middle centroid (9, 6) (or (8, 1)) is determined as the parent node corresponding to the division axis 5; the centroid with the y-axis coordinate value less than 6 is divided into the left set {(8, 1)} under (9, 6), at this time, the left set contains only one centroid, and the construction of this part is ended.
[0124] Through the above 6 steps, the KD tree shown in FIG. 2(b) is finally constructed.
[0125] Example b: Example 1: the centroid of the plurality of land surfaces includes the case of even number of centroids, the following process is performed.
[0126] For example, the centroid of the plurality of land surfaces includes: (7, 2), (5, 4), (9, 6), (2, 3), (4, 7), (8, 1), and the positional relationship is as shown in FIG. 3(a).
[0127] Step b1: first, (7, 2), (5, 4), (9, 6), (2, 3), (4, 7), (8, 1) are taken as a set of centroids to be processed, the x-axis range difference is the difference between the maximum x-axis coordinate value 9 and the minimum x-axis coordinate value 2 of each centroid, that is, the x-axis range difference of each centroid is 7; the y-axis range difference is the difference between the maximum y-axis coordinate value 7 and the minimum y-axis coordinate value 1 of each centroid, that is, the y-axis range difference of each centroid is 6; then the maximum value in the x-axis range difference and the y-axis range difference is 7.
[0128] Step b2: the coordinate axis corresponding to the maximum value 7, that is, the x-axis, is determined as the partition axis, and each centroid is sorted according to the x-axis coordinate value, for example, the sorting is: (2, 3), (4, 7), (5, 4), (7, 2), (8, 1), (9, 6), and the middle centroid (7, 2) (which can also be (5, 4)) is determined as the parent node (here, the root node of the KD tree) corresponding to the partition axis 7.
[0129] Step b3: the centroids with x-axis coordinate values less than 7 are divided into a left set {(2, 3), (4, 7), (5, 4)} under (7, 2); and the centroids with x-axis coordinate values greater than 7 are divided into a right set {(8, 1), (9, 6)} under (7, 2).
[0130] Step b4: the number of centroids contained in the left set and the right set is greater than 1.
[0131] For the left set {(2, 3), (4, 7), (5, 4)}, the x-axis range difference is 3, the y-axis range difference is 4, and the maximum value is 4; for the right set {(8, 1), (9, 6)}, the x-axis range difference is 1, the y-axis range difference is 5, and the maximum value is 5.
[0132] Step b5: for the left set {(2, 3), (4, 7), (5, 4)}, the y-axis corresponding to the maximum value 4 is taken as the partition axis, the centroids in the left set are sorted according to the y-axis coordinate value, and the middle centroid (5, 4) is determined as the parent node corresponding to the partition axis 4; the centroid with the y-axis coordinate value less than 4 is divided into a left set {(2, 3)} under (5, 4), and the centroid with the y-axis coordinate value greater than 4 is divided into a left set {(4, 7)} under (5, 4); at this time, the left set and the right set each contain only one centroid, and the construction of this part is ended.
[0133] Step b6: for the right set {(8, 1), (9, 6)}, taking the maximum value 5 corresponding to the y-axis as the split axis, sorting the centroids in the right set according to the y-axis coordinate values, and determining the middle centroid (9, 6) (or (8, 1)) as the parent node corresponding to the split axis 5; dividing the centroid with a y-axis coordinate value less than 6 into the left set {(8, 1)} under (9, 6), and ending the construction of this part.
[0134] Through the above six steps, the KD tree shown in FIG. 3(b) is finally constructed.
[0135] In some embodiments of the present application, the process of determining the nearest neighbor centroid of the supplementary address point from the KD tree is described in step S103.
[0136] Corresponding to the aforementioned initial address point and centroid, the position information of a supplementary address point includes the x-axis coordinate value and the y-axis coordinate value of the supplementary address point. Then, the process of determining the nearest neighbor centroid of the supplementary address point from the KD tree can include:
[0137] Step S21, taking the root node in the KD tree as the nearest neighbor node, and calculating the first Euclidean distance between the supplementary address point and the nearest neighbor node.
[0138] This step can calculate the first Euclidean distance between the supplementary address point and the nearest neighbor address point (i.e., the root node) according to the position information of the supplementary address point.
[0139] Step S22, determining whether the first coordinate value is less than the second coordinate value, if yes and there is a left child node under the nearest neighbor node, taking the left child node as the candidate node, and if no and there is a right child node under the nearest neighbor node, taking the right child node as the candidate node.
[0140] Wherein, the first coordinate value refers to the coordinate value of the supplementary address point on the corresponding split axis of the nearest neighbor node, and the second coordinate value refers to the coordinate value of the nearest neighbor node on the corresponding split axis.
[0141] It should be noted that the split axis corresponding to the leaf node is the coordinate axis corresponding to the smaller value of the x-axis coordinate value and the y-axis coordinate value of the leaf node.
[0142] Step S23, calculating the second Euclidean distance between the supplementary address point and the candidate node.
[0143] Step S24, if the second Euclidean distance is less than the first Euclidean distance, taking the candidate node as the nearest neighbor node, taking the second Euclidean distance as the first Euclidean distance, and returning to determine whether the first coordinate value is less than the second coordinate value.
[0144] Step S25, if there is no left child node or right child node under the nearest neighbor node, or if the second Euclidean distance is greater than or equal to the first Euclidean distance, the parent node of the nearest neighbor node is taken as the backtracking node.
[0145] Step S26, the difference between the coordinate values of the supplementary survey boundary point and the backtracking node on the corresponding split axis of the backtracking node is calculated, and the calculated difference is taken as the backtracking distance.
[0146] Step S27, if the first Euclidean distance is less than the backtracking distance, the nearest neighbor node is determined as the nearest neighbor centroid, if the first Euclidean distance is greater than or equal to the backtracking distance, the child node under the backtracking node which has not been traversed is taken as the candidate node, and the calculation of the second Euclidean distance between the supplementary survey boundary point and the candidate node is returned.
[0147] Taking the KD tree shown in Fig. 3(b) and the supplementary survey boundary point (2.1, 3.1) as an example, the process of steps S21-S27 is explained.
[0148] Step 1: (7, 2) is taken as the nearest neighbor node, the first Euclidean distance between the supplementary survey boundary point (2.1, 3.1) and the nearest neighbor node (7, 2) is calculated, which is 6.23.
[0149] Step 2: the split axis corresponding to the nearest neighbor node (7, 2) is the x-axis, it is judged that the x-axis coordinate value 2.1 of the supplementary survey boundary point is less than the x-axis coordinate value 7 of the nearest neighbor node (7, 2), then the left child node (5, 4) of (7, 2) is taken as the candidate node.
[0150] Step 3: the second Euclidean distance between the supplementary survey boundary point (2.1, 3.1) and the candidate node (5, 4) is calculated, which is 3.03.
[0151] Step 4: it is judged that the second Euclidean distance 3.03 is less than the first Euclidean distance 6.23, then the candidate node (5, 4) is taken as the nearest neighbor node, and the first Euclidean distance is updated to 3.03.
[0152] Step 5: the split axis corresponding to the nearest neighbor node (5, 4) is the y-axis, it is judged that the y-axis coordinate value 3.1 of the supplementary survey boundary point is less than the y-axis coordinate value 4 of the nearest neighbor node (5, 4), then the left child node (2, 3) of (5, 4) is taken as the candidate node.
[0153] Step 6: the second Euclidean distance between the supplementary survey boundary point (2.1, 3.1) and the candidate node (2, 3) is calculated, which is 0.14.
[0154] Step 7: it is judged that the second Euclidean distance 0.14 is less than the first Euclidean distance 3.03, then the candidate node (2, 3) is taken as the nearest neighbor node, and the first Euclidean distance is updated to 0.14.
[0155] Step 8: The split axis corresponding to the nearest neighbor node (2, 3) is the x-axis. It is determined that the x-axis coordinate value of the supplementary boundary point 2.1 is greater than the x-axis coordinate value of the nearest neighbor node (2, 3) 2, but there is no right child node under (2, 3). Therefore, (5, 4) is taken as the backtracking node.
[0156] Step 9: The difference between the y-axis coordinate value 3.1 of the supplementary boundary point (2.1, 3.1) and the y-axis coordinate value 4 of the backtracking node (5, 4) is calculated. The calculated difference 0.9 is taken as the backtracking distance.
[0157] Step 10: The backtracking distance 0.9 is greater than the first Euclidean distance 0.14, which indicates that the right branch of the backtracking node (5, 4) is not closer to (2.1, 3.1) than the nearest neighbor node (2, 3). Therefore, the nearest neighbor node (2, 3) is determined as the nearest neighbor centroid.
[0158] If the application includes multiple supplementary boundary points, the nearest neighbor centroid of each supplementary boundary point can be obtained according to the above process.
[0159] In some embodiments of the application, after the nearest neighbor centroid of the supplementary boundary point is determined, if the position information of the supplementary boundary point is within the boundary range of the nearest neighbor land surface corresponding to the nearest neighbor centroid, the nearest neighbor land surface corresponding to the nearest neighbor centroid can be updated according to step S104.
[0160] Specifically, the process of updating the nearest neighbor land surface according to the position information of the supplementary boundary point in step S104 can include:
[0161] Step S31, calculating the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor land surface.
[0162] Optionally, the minimum value of the distance between the four corner points of the minimum circumscribed rectangle of the nearest neighbor land surface and the supplementary boundary point can be determined as the minimum Euclidean distance in this step.
[0163] Step S32a, if the minimum Euclidean distance is greater than the preset second distance threshold, the supplementary boundary point is taken as a new boundary point, and the nearest neighbor land surface is updated based on the position information of the new boundary point.
[0164] Specifically, if the minimum Euclidean distance is greater than the preset second distance threshold, the supplementary boundary point is taken as a new boundary point and added to the corresponding nearest neighbor land surface to complete the update of the nearest neighbor land surface.
[0165] Step S32b, if the minimum Euclidean distance is less than or equal to the second distance threshold, the supplementary boundary point is taken as a replacement boundary point, and the nearest neighbor land surface is updated based on the position information of the replacement boundary point.
[0166] Specifically, if the minimum Euclidean distance is less than or equal to the second distance threshold, the supplementary boundary point is taken as a replacement boundary point, and the related boundary point in the corresponding nearest neighbor land parcel surface is replaced with the replacement boundary point to complete the update of the nearest neighbor land parcel surface.
[0167] Optionally, the supplementary boundary point can also be a deletion boundary point. For example, the field personnel can add a deletion label to the supplementary boundary point, and then the application can directly delete the supplementary boundary point with the deletion label in the corresponding nearest neighbor land parcel surface according to the deletion label.
[0168] The application updates the plurality of land parcel surfaces drawn in step S102 by the supplementary boundary point, improves the drawing efficiency of the land parcel surface, and saves time.
[0169] In some embodiments of the application, there can also be a case where the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor land parcel surface corresponding to the nearest neighbor centroid. The embodiments of the application can also calculate the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor land parcel surface when the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor land parcel surface corresponding to the nearest neighbor centroid, and determine whether the minimum Euclidean distance is less than a preset first distance threshold. If yes, the nearest neighbor land parcel surface is updated according to the position information of the supplementary boundary point.
[0170] Specifically, there can be a case where the minimum circumscribed rectangle of the nearest neighbor land parcel surface drawn when the supplementary boundary point is missing cannot cover the supplementary boundary point. At this time, if the nearest neighbor land parcel surface is not updated, the nearest neighbor land parcel surface will be drawn incorrectly.
[0171] To avoid this situation, optionally, the application can also calculate the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor land parcel surface when the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor land parcel surface corresponding to the nearest neighbor centroid. The calculation method of the minimum Euclidean distance is the same as that of the aforementioned step S31, and details can be referred to the introduction in the aforementioned step, which will not be repeated here.
[0172] The application also presets a first distance threshold. If the minimum Euclidean distance is less than the preset first distance threshold, it means that the supplementary boundary point is a boundary point in the corresponding nearest neighbor land parcel surface, and then the corresponding nearest neighbor land parcel surface can be updated according to the position information of the supplementary boundary point. The specific updating process is the same as that of the aforementioned steps S31, S32a, and S32b, and will not be repeated here.
[0173] In some embodiments of the present application, if the minimum Euclidean distance is greater than or equal to the first distance threshold, the nearest neighbor centroid of the supplementary boundary point is deleted, and a KD tree is constructed with the remaining centroids after deleting the nearest neighbor centroid, and the execution of determining the nearest neighbor centroid of the supplementary boundary point from the KD tree is returned.
[0174] Specifically, if the minimum Euclidean distance is greater than or equal to the first distance threshold, it indicates that the currently determined nearest neighbor land surface may not be accurate, so the nearest neighbor centroid determined in step S103 can be deleted, and then the KD tree is reconstructed and the nearest neighbor centroid is determined again, and the nearest neighbor land surface corresponding to the re-determined nearest neighbor centroid is updated based on the position information of the supplementary boundary point.
[0175] In summary, the present application collects the position information of the initial boundary point based on the oblique photography three-dimensional model to draw a plurality of land surfaces, which reduces the labor cost and improves the investigation efficiency compared with the traditional field measurement based on the oblique photography three-dimensional model to collect land surface data. Meanwhile, the land surface drawing method provided by the present application combines KD tree and Euclidean clustering to calculate the minimum circumscribed rectangle and the centroid of a plurality of land surfaces, construct a KD tree according to the centroid, find the nearest neighbor by Euclidean distance, add a secondary judgment condition to determine the land surface to which the supplementary boundary point belongs, and add the Euclidean distance to judge the type of the supplementary boundary point, and then update the corresponding land surface. Compared with the traditional land update, this method improves the efficiency and realizes batch updating of land.
[0176] The present application also provides a land surface drawing device, which will be described below. The land surface drawing device described below can be correspondingly referred to the land surface drawing method described above.
[0177] Please refer to Figure 4 , which shows the structure schematic diagram of the land surface drawing device provided by the present application. As shown in Figure 4 , the device can include a data acquisition module 401, a land surface information determination module 402, a nearest neighbor centroid determination module 403, and a first land surface update module 404.
[0178] The data acquisition module 401 is configured to acquire the oblique photogrammetry data collected by the unmanned aerial vehicle on the to-be-measured region, and the position information of the supplementary boundary point obtained by supplementing the missing boundary point of the oblique photogrammetry data.
[0179] The land surface information determination module 402 is configured to determine the centroid and boundary range of a plurality of land surfaces contained in the to-be-measured region according to the oblique photogrammetry data.
[0180] The nearest neighbor centroid determination module 403 is configured to construct a KD tree with the centroids of the multiple land surfaces as tree nodes, and determine the nearest neighbor centroid of the supplementary boundary point from the KD tree.
[0181] The first land surface updating module 404 is configured to update the nearest neighbor land surface according to the position information of the supplementary boundary point if the position information of the supplementary boundary point is within the boundary range of the nearest neighbor land surface corresponding to the nearest neighbor centroid.
[0182] In a possible implementation, the land surface information determination module described above can include a model determination module, an initial boundary point collection module, and a land surface information calculation module.
[0183] The model determination module is configured to process the oblique photogrammetry data into an oblique photogrammetry three-dimensional model.
[0184] The initial boundary point collection module is configured to collect position information of initial boundary points corresponding to multiple land surfaces respectively from the oblique photogrammetry three-dimensional model by a graphical method.
[0185] The land surface information calculation module is configured to draw the multiple land surfaces according to the position information of the initial boundary points corresponding to the multiple land surfaces respectively, and determine the centroids and boundary ranges of the multiple land surfaces.
[0186] In a possible implementation, the boundary range is a minimum circumscribed rectangle, and the position information of an initial boundary point includes an x-axis coordinate value and a y-axis coordinate value of the initial boundary point.
[0187] The process of the land surface information calculation module described above for determining the centroid and the boundary range of each land surface in the multiple land surfaces according to the position information of the initial boundary point corresponding to the land surface can include:
[0188] determining a maximum x-axis coordinate value and a minimum x-axis coordinate value from the x-axis coordinate values of the initial boundary point corresponding to the land surface;
[0189] determining a maximum y-axis coordinate value and a minimum y-axis coordinate value from the y-axis coordinate values of the initial boundary point corresponding to the land surface;
[0190] determining a minimum circumscribed rectangle of the land surface according to the maximum x-axis coordinate value, the minimum x-axis coordinate value, the maximum y-axis coordinate value, and the minimum y-axis coordinate value;
[0191] determining the centroid of the land surface according to the x-axis coordinate values and the y-axis coordinate values of the initial boundary point corresponding to the land surface by using a polygon centroid algorithm, or calculating the center of the minimum circumscribed rectangle of the land surface, and determining the calculated center as the centroid of the land surface.
[0192] In a possible implementation, the centroid includes an x-axis coordinate value and a y-axis coordinate value.
[0193] The process in which the nearest neighbor centroid determination module constructs the KD tree with the centroids of the multiple plots as the tree nodes can include:
[0194] Taking the centroids of the multiple plots as a set of centroids to be processed, determining the maximum value of the x-axis range difference and the y-axis range difference of each centroid in the set of centroids to be processed, wherein the range difference of a coordinate axis refers to the difference between the maximum coordinate value and the minimum coordinate value of each centroid on the coordinate axis;
[0195] Determining the coordinate axis corresponding to the maximum value as a split axis, sorting the set of centroids to be processed according to the coordinate values of each centroid on the split axis, and determining the middle centroid in the sorted set of centroids to be processed as the parent node corresponding to the split axis;
[0196] According to whether the coordinate value of each centroid in the set of centroids to be processed on the split axis is greater than the coordinate value of the parent node on the split axis, clustering the centroids in the set of centroids to be processed except the parent node into a left set and a right set under the parent node, wherein the centroids in the left set and the right set are the child nodes of the parent node;
[0197] For any one of the left set or the right set, determining whether the number of the centroids contained in the set is greater than 1, if yes, taking the set as the set of centroids to be processed, and returning to execute the determination of the maximum value of the x-axis range difference and the y-axis range difference of each centroid in the set of centroids to be processed.
[0198] In a possible implementation, the process in which the nearest neighbor centroid determination module clusters the centroids in the set of centroids to be processed except the parent node into a left set and a right set under the parent node according to whether the coordinate value of each centroid in the set of centroids to be processed on the split axis is greater than the coordinate value of the parent node on the split axis can include: for each centroid in the set of centroids to be processed except the parent node, if the coordinate value of the centroid on the split axis is greater than the coordinate value of the parent node on the split axis, the centroid is clustered into the right set, otherwise, the centroid is clustered into the left set.
[0199] In a possible implementation, the process in which the nearest neighbor centroid determination module determines the nearest neighbor centroid of the supplementary cadastral boundary point from the KD tree can include:
[0200] Taking the root node in the KD tree as a nearest neighbor node, and calculating a first Euclidean distance between the supplementary cadastral boundary point and the nearest neighbor node;
[0201] judging whether the first coordinate value is less than the second coordinate value, if yes and a left child node exists under the nearest neighbor node, taking the left child node as a candidate node, if no and a right child node exists under the nearest neighbor node, taking the right child node as the candidate node, wherein the first coordinate value refers to a coordinate value of the supplementary boundary point on a corresponding split axis of the nearest neighbor node, and the second coordinate value refers to a coordinate value of the nearest neighbor node on the corresponding split axis;
[0202] calculating a second Euclidean distance between the supplementary boundary point and the candidate node;
[0203] if the second Euclidean distance is less than the first Euclidean distance, taking the candidate node as the nearest neighbor node, taking the second Euclidean distance as the first Euclidean distance, and returning to execute the judgment of whether the first coordinate value is less than the second coordinate value;
[0204] in the judgment of whether the first coordinate value is less than the second coordinate value, if no left child node or right child node exists under the nearest neighbor node, or if the second Euclidean distance is greater than or equal to the first Euclidean distance, taking a parent node of the nearest neighbor node as a backtracking node;
[0205] calculating a difference value between coordinate values of the supplementary boundary point and the backtracking node on a corresponding split axis of the backtracking node, and taking the calculated difference value as a backtracking distance;
[0206] if the first Euclidean distance is less than the backtracking distance, taking the nearest neighbor node as the nearest neighbor centroid, if the first Euclidean distance is greater than or equal to the backtracking distance, taking a child node that has not been traversed under the backtracking node as a candidate node, and returning to execute the calculation of the second Euclidean distance between the supplementary boundary point and the candidate node.
[0207] In a possible implementation, the parcel surface mapping device provided in the application can further include a first Euclidean distance calculation module and a second parcel surface updating module.
[0208] The first Euclidean distance calculation module is configured to calculate a minimum Euclidean distance between the supplementary boundary point and the nearest neighbor parcel if the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor parcel corresponding to the nearest neighbor centroid.
[0209] The second parcel surface updating module is configured to judge whether the minimum Euclidean distance is less than a preset first distance threshold, if yes, updating the nearest neighbor parcel according to the position information of the supplementary boundary point.
[0210] In a possible implementation, the parcel surface mapping device provided in the application can further include a third parcel surface updating module.
[0211] The third ground surface updating module is configured to delete the nearest neighbor centroid of the supplementary boundary point if the minimum Euclidean distance is greater than or equal to the first distance threshold, and construct a KD tree with the remaining centroids after the deletion of the nearest neighbor centroid as tree nodes, and return to determine the nearest neighbor centroid of the supplementary boundary point from the KD tree.
[0212] In a possible implementation, the first ground surface updating module, the second ground surface updating module and the third ground surface updating module can perform the process of updating the nearest neighbor ground surface according to the position information of the supplementary boundary point, which can include:
[0213] calculating the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor ground surface;
[0214] If the minimum Euclidean distance is greater than the second distance threshold, the supplementary boundary point is regarded as a new boundary point, and the nearest neighbor ground surface is updated based on the position information of the new boundary point.
[0215] If the minimum Euclidean distance is less than or equal to the second distance threshold, the supplementary boundary point is regarded as a replacement boundary point, and the nearest neighbor ground surface is updated based on the position information of the replacement boundary point.
[0216] The embodiments of the present application further provide a ground surface drawing device. Optionally, Figure 5 A hardware structure block diagram of the ground surface drawing device is shown, and the hardware structure of the device can include at least one processor 501, at least one communication interface 502, at least one memory 503 and at least one communication bus 504. Figure 5
[0217] In the embodiments of the present application, the number of the processor 501, the communication interface 502, the memory 503 and the communication bus 504 is at least one, and the processor 501, the communication interface 502 and the memory 503 complete the communication with each other through the communication bus 504.
[0218] The processor 501 can be a central processing unit CPU, or a specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiments of the present application, etc.
[0219] The memory 503 can include a high-speed RAM memory, and can also include a non-volatile memory, such as at least one disk memory.
[0220] The memory 503 stores a program, and the processor 501 can call the program stored in the memory 503, and the program is used for:
[0221] Obtain oblique photogrammetry data collected by the UAV on the region to be measured, and position information of a supplementary boundary point obtained by supplementary measurement on a missing boundary point in the oblique photogrammetry data;
[0222] Draw a plurality of land parcels contained in the region to be measured according to the oblique photogrammetry data, and determine the mass center and boundary range of the plurality of land parcels;
[0223] Construct a KD tree with the mass centers of the plurality of land parcels as tree nodes, and determine the nearest neighbor mass center of the supplementary boundary point from the KD tree;
[0224] If the position information of the supplementary boundary point is within the boundary range of the nearest neighbor land parcel corresponding to the nearest neighbor mass center, update the nearest neighbor land parcel according to the position information of the supplementary boundary point.
[0225] Optionally, the refinement function and the expansion function of the program can refer to the description above.
[0226] The embodiment of the application further provides a readable storage medium, which has a computer program stored thereon, and the computer program is executed by a processor to realize the land parcel drawing method.
[0227] Optionally, the refinement function and the expansion function of the program can refer to the description above.
[0228] Finally, it should be noted that in this document, relationship terms such as and the second and the like are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0229] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between various embodiments can be referred to each other.
[0230] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A parcel mapping method, characterized by, The method comprises the following steps: obtaining oblique photogrammetry data collected by a UAV on a region to be measured, and position information of a supplementary boundary point obtained by supplementing a missing boundary point in the oblique photogrammetry data; drawing a plurality of land parcels contained in the region to be measured according to the oblique photogrammetry data, and determining the mass center and boundary range of the plurality of land parcels; constructing a KD tree with the mass center of the plurality of land parcels as a tree node, and determining the nearest neighbor mass center of the supplementary boundary point from the KD tree; if the position information of the supplementary boundary point is within the boundary range of the nearest neighbor land parcel corresponding to the nearest neighbor mass center, updating the nearest neighbor land parcel according to the position information of the supplementary boundary point.
2. The parcel mapping method of claim 1, wherein, The step of drawing a plurality of land parcels contained in the region to be measured according to the oblique photogrammetry data, and determining the mass center and boundary range of the plurality of land parcels, comprises the following steps: processing the oblique photogrammetry data into an oblique photogrammetry three-dimensional model; collecting position information of an initial boundary point corresponding to each of the plurality of land parcels from the oblique photogrammetry three-dimensional model by a graphic method; drawing the plurality of land parcels according to the position information of the initial boundary point corresponding to each of the plurality of land parcels, and determining the mass center and boundary range of the plurality of land parcels.
3. The parcel mapping method of claim 2, wherein, The boundary range is a minimum circumscribed rectangle, and the position information of an initial boundary point comprises an x-axis coordinate value and a y-axis coordinate value of the initial boundary point. The step of determining the mass center and boundary range of the plurality of land parcels according to the position information of the initial boundary point corresponding to each of the plurality of land parcels, comprises the following steps: for each of the plurality of land parcels: determining a maximum x-axis coordinate value and a minimum x-axis coordinate value from the x-axis coordinate values of the initial boundary point corresponding to the land parcel; determining a maximum y-axis coordinate value and a minimum y-axis coordinate value from the y-axis coordinate values of the initial boundary point corresponding to the land parcel; determining a minimum circumscribed rectangle of the land parcel according to the maximum x-axis coordinate value, the minimum x-axis coordinate value, the maximum y-axis coordinate value and the minimum y-axis coordinate value; determining the mass center of the land parcel according to the x-axis coordinate values and the y-axis coordinate values of the initial boundary point corresponding to the land parcel by using a polygon mass center algorithm, or calculating the center of the minimum circumscribed rectangle of the land parcel, and determining the calculated center as the mass center of the land parcel; obtaining the mass center and the minimum circumscribed rectangle of the plurality of land parcels.
4. The parcel mapping method of claim 1, wherein, The mass center comprises an x-axis coordinate value and a y-axis coordinate value. The step of constructing a KD tree with the mass center of the plurality of land parcels as a tree node, comprises the following steps: determining the maximum value of the x-axis range difference and the y-axis range difference of each mass center in a mass center set to be processed, wherein the range difference of a coordinate axis refers to the difference between the maximum coordinate value and the minimum coordinate value of the mass center on the coordinate axis; determining the coordinate axis corresponding to the maximum value as a split axis, sorting the mass center set to be processed according to the coordinate values of each mass center on the split axis, and determining the middle mass center in the sorted mass center set to be processed as the parent node corresponding to the split axis; clustering the centroids in the to-be-processed centroid set except the parent node into a left set and a right set under the parent node according to whether a coordinate value of each centroid in the to-be-processed centroid set on the split axis is greater than a coordinate value of the parent node on the split axis, wherein the centroids in the left set and the right set are child nodes of the parent node; for any one of the left set or the right set, judging whether a number of the centroids contained in the set is greater than 1, if yes, taking the set as the to-be-processed centroid set and returning to execute the determining of the maximum value of the x-axis range difference and the y-axis range difference of each centroid in the to-be-processed centroid set.
5. The parcel mapping method of claim 4, wherein, the clustering of the centroids in the to-be-processed centroid set except the parent node into a left set and a right set under the parent node according to whether a coordinate value of each centroid in the to-be-processed centroid set on the split axis is greater than a coordinate value of the parent node on the split axis, comprises: for each centroid in the to-be-processed centroid set except the parent node, if a coordinate value of the centroid on the split axis is greater than a coordinate value of the parent node on the split axis, clustering the centroid into the right set, otherwise, clustering the centroid into the left set.
6. The parcel mapping method of claim 1, wherein, the determining of the nearest neighbor centroid of the supplement survey address point from the KD tree, comprises: taking a root node in the KD tree as a nearest neighbor node and calculating a first Euclidean distance between the supplement survey address point and the nearest neighbor node; judging whether a first coordinate value is less than a second coordinate value, if yes and there is a left child node under the nearest neighbor node, taking the left child node as a candidate node, if not and there is a right child node under the nearest neighbor node, taking the right child node as the candidate node, wherein the first coordinate value refers to a coordinate value of the supplement survey address point on a corresponding split axis of the nearest neighbor node, and the second coordinate value refers to a coordinate value of the nearest neighbor node on the corresponding split axis; calculating a second Euclidean distance between the supplement survey address point and the candidate node; if the second Euclidean distance is less than the first Euclidean distance, taking the candidate node as the nearest neighbor node and taking the second Euclidean distance as the first Euclidean distance, and returning to execute the judging of whether the first coordinate value is less than the second coordinate value; in the judging of whether the first coordinate value is less than the second coordinate value, if there is no left child node or right child node under the nearest neighbor node, or if the second Euclidean distance is greater than or equal to the first Euclidean distance, taking a parent node of the nearest neighbor node as a backtracking node; calculating a difference value between the coordinate values of the supplement survey address point and the backtracking node on the corresponding split axis of the backtracking node respectively, and taking the calculated difference value as a backtracking distance; if the first Euclidean distance is less than the backtracking distance, taking the nearest neighbor node as the nearest neighbor centroid, if the first Euclidean distance is greater than or equal to the backtracking distance, taking a child node not traversed under the backtracking node as the candidate node, and returning to execute the calculating of the second Euclidean distance between the supplement survey address point and the candidate node.
7. The parcel mapping method of claim 1, wherein, further comprising: If the position information of the supplementary boundary point is not within the boundary range of the nearest neighbor parcel corresponding to the nearest neighbor centroid, calculate the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor parcel; If the minimum Euclidean distance is less than a preset first distance threshold, update the nearest neighbor parcel according to the position information of the supplementary boundary point.
8. The parcel mapping method of claim 7, wherein, Further comprising: If the minimum Euclidean distance is greater than or equal to the first distance threshold, delete the nearest neighbor centroid of the supplementary boundary point, and construct the KD tree with the remaining centroids after deleting the nearest neighbor centroid as tree nodes, and return to execute the determination of the nearest neighbor centroid of the supplementary boundary point from the KD tree.
9. The parcel mapping method according to any one of claims 1 to 8, characterized in that, The updating of the nearest neighbor parcel according to the position information of the supplementary boundary point comprises: Calculate the minimum Euclidean distance between the supplementary boundary point and the nearest neighbor parcel; If the minimum Euclidean distance is greater than a preset second distance threshold, take the supplementary boundary point as a new boundary point, and update the nearest neighbor parcel based on the position information of the new boundary point; If the minimum Euclidean distance is less than or equal to the second distance threshold, take the supplementary boundary point as a replacement boundary point, and update the nearest neighbor parcel based on the position information of the replacement boundary point.
10. A plot mapping device, characterized by comprising: Comprise: A data acquisition module configured to acquire oblique photogrammetry data collected by a UAV on a to-be-measured region, and position information of a supplementary boundary point obtained by supplementing a missing boundary point of the oblique photogrammetry data; A parcel information determination module configured to determine centroids and boundary ranges of a plurality of parcels in the to-be-measured region according to the oblique photogrammetry data; A nearest neighbor centroid determination module configured to construct a KD tree with the centroids of the plurality of parcels as tree nodes, and determine a nearest neighbor centroid of the supplementary boundary point from the KD tree; A first parcel updating module configured to update the nearest neighbor parcel according to the position information of the supplementary boundary point if the position information of the supplementary boundary point is within the boundary range of the nearest neighbor parcel corresponding to the nearest neighbor centroid.
Citation Information
Patent Citations
Unmanned aerial vehicle tilt photography fine grid earthwork measurement method
CN110285792A
Route planning method for close-range photogrammetry of slope body by using aircraft
CN112308907A