Distributed multi-level spatial indexing method for massive airborne laser point clouds
By using multi-level indexing methods of virtual grid, quadtree and R-tree in a distributed environment, and combining with STR tree to build a global index, the problem of distributed storage and processing of massive laser point clouds is solved and efficient Laser point cloud management and query.
Patent Information
- Application Number
- CN202110301529.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-03-22
AI Technical Summary
Existing technology is difficult to efficiently manage and process massive laser point cloud data in a distributed storage environment. Especially when considering the complexity of node communication and overhead, the indexing technology of a stand-alone system cannot be directly applied to a distributed environment.
A distributed multi-level spatial index method for massive airborne laser point clouds is adopted. By dividing the laser point cloud space based on virtual grid, a local index is built by combining quadtree and three-dimensional R-tree, and a global index is built using STR tree. Realize distributed storage and parallel processing of laser point cloud. Specific steps include: determining the virtual grid based on laser point cloud density and storage space size, using quadtrees and Hilbert space filling curves to build local indexes, and serializing them into HDFS files, and finally using STR trees to build global indexes.
This method can achieve efficient query and processing of massive laser point clouds in a distributed cluster environment, make full use of the storage and computing capabilities of the distributed system, improve the processing capabilities of laser point clouds, and achieve this on the premise of ensuring spatial locality. for rapid partitioning and management.
Smart Images

Figure CN113934686B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of laser scanning measurement data processing, and relates to a distributed multi-level spatial indexing method, and in particular to a distributed multi-level spatial indexing method for massive airborne laser point clouds. Background Art
[0002] Laser radar measurement technology (LiDAR) integrates high-precision 3D laser scanners, positioning and attitude systems, and high-definition digital cameras to achieve active measurement of the real environment through laser ranging. Compared with other traditional measurement methods, it has the advantages of high degree of automation, less impact by weather, short data production cycle, and high data accuracy. It can obtain high-precision 3D spatial coordinate information and texture information over a large area, quickly, and completely, and is an important data source for infrastructure construction engineering applications.
[0003] However, the "massiveness" of laser point clouds brings great difficulties to the post-processing of point cloud data, and has become a bottleneck restricting the application of laser point clouds in storage, management, query, analysis, visualization and other aspects. Cloud computing technology is a combination of distributed technology, parallel processing technology and virtualization technology. It has the advantages of being universal, cheap, distributed and highly scalable. It can provide nearly unlimited storage management and computing capabilities, and provides new ideas for the storage and processing of massive point cloud data. Its flexible architecture, full data sharing and good scalability make it possible to efficiently manage and utilize massive laser point cloud data.
[0004] Gong Jun et al. used octree to cut 3D point cloud data, adopted dynamically balanced R-tree to manage data nodes, and established a multi-level resolution model on this basis. Yang Jiansi used a hybrid indexing mechanism of quadtree and KD tree to manage airborne LiDAR data, and used facet fitting and R-tree to manage vehicle-mounted LiDAR data. Commonly used spatial indexing technologies include KD tree, KDB tree, BSP tree, quadtree, octree, R-tree, R+ tree, etc. According to different needs, different combination strategies are selected to improve indexing performance through index combination and complementary advantages. However, the above methods are mainly used in stand-alone storage mode. Compared with traditional stand-alone centralized indexing, distributed indexing needs to consider factors such as node communication and overhead, which is more complicated and cannot directly use the indexing technology of stand-alone system.
[0005] In recent years, cloud computing technologies and software facilities such as the distributed computing framework Hadoop and its improved version Spark, the distributed file system HDFS, and the distributed database HBase have developed rapidly. Among them, the Spark framework adopts a memory-based distributed processing mode, which has better performance and fault tolerance than Hadoop MapReduce. However, it does not support the storage and spatial operations of spatial data.
[0006] Fan Jianyong et al. established a spatial data storage model based on HBase, constructed a spatial index in a grid manner, used the Hilbert curve to determine the index ID of the grid, and used MapReduce to create the spatial index in parallel. Li Xun proposed a distributed spatial index based on the Hilbert curve and the R-tree, which uses the Hilbert curve to divide the space and sorts the spatial data through Hilbert coding. However, in general, current research on the efficient management and processing of massive laser point clouds in distributed storage environments is not perfect and in-depth, and the characteristics of massive laser point clouds themselves are not taken into account. To this end, the present invention proposes a multi-level distributed spatial indexing method that integrates quadtrees, Hilbert space filling curve sorting, and three-dimensional R-trees for the storage and parallel processing of massive airborne laser point clouds in a distributed cloud environment. Summary of the invention
[0007] In order to solve the above technical problems existing in the background technology, the present invention provides a distributed multi-level spatial indexing method for massive airborne laser point clouds, which can realize distributed storage, efficient query and scheduling of massive airborne laser point clouds on cluster nodes.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A distributed multi-level spatial indexing method for massive airborne laser point clouds, characterized in that the distributed multi-level spatial indexing method for massive airborne laser point clouds comprises the following steps:
[0010] 1) Divide the laser point cloud space based on the virtual grid to form laser point cloud partitions;
[0011] 2) Constructing local index of laser point cloud partition based on quadtree and 3D R-tree;
[0012] 3) The root node of each laser point cloud partition local index is used as the leaf node of the global spatial index, and the global spatial index is established using the STR tree.
[0013] Preferably, the specific implementation method of step 1) adopted in the present invention is: according to the density of the laser point cloud and the storage space occupied by a single point cloud data, the size of the virtual grid is determined; according to the coverage of the laser point cloud and the size of the virtual grid, the coverage of each laser point cloud partition is calculated; and the plane coordinates of the laser point cloud are used to realize the rapid division of the corresponding laser point cloud partitions.
[0014] Preferably, step 1) adopted in the present invention is implemented by using Hadoop HDFS, and the specific implementation method of step 1) is:
[0015] a) Calculate the virtual grid side length l using formula (1):
[0016]
[0017] in:
[0018] B is the default size of the HDFS file block. In Hadoop 2.X, the B size is 128M.
[0019] α is the space coefficient occupied by the index, and its empirical value is 0.2;
[0020] r is the number of bytes occupied by a single laser. The main information of the laser point is X, Y, Z coordinates, intensity, time GPSTime and category;
[0021] d is the density of airborne laser point cloud, generally not exceeding 50 points / m 2 ;
[0022] b) Expand Spark’s spatial data processing function and implement PointRDD, which can provide elastic computing capabilities for Point-type spatial data. Use textfile in Spark to read laser point cloud files stored in Hadoop HDFS and generate PointRDD of laser point cloud.
[0023] c) Using the aggregate operator in Spark, perform aggregation operations on the minimum bounding rectangle MBR of each point in the laser point cloud PointRDD, and finally determine the MBR of the entire engineering laser point cloud, denoted as MBR 总 ;
[0024] d) According to MBR 总 and the virtual grid side length l, determine the coordinate range of each virtual grid {x min ,x max ,y min ,y max}, remove the empty grid without laser points to get the final virtual grid list grids;
[0025] e) Use the virtual grid list grids to build a partitioner and input it to the laser point cloud PointRDD to partition the laser point cloud and obtain the newly partitioned laser point cloud PointRDD, recorded as PointcloudRDD.
[0026] Preferably, the specific implementation method of step 2) adopted in the present invention is: using a quadtree to perform two-dimensional partitioning of the laser points in the laser point cloud partition, first sorting the quadtree grid obtained by the partition in one dimension according to the Hilbert space filling curve, and then constructing an R tree for the sorted quadtree grid to complete the local index construction of the laser point cloud partition; serializing the laser point data and local index of the laser point cloud partition into a single HDFS file for storage.
[0027] Preferably, the specific implementation method of using a quadtree to perform two-dimensional segmentation of laser points in the laser point cloud partition in step 2) of the present invention is:
[0028] a) Set the maximum number of laser points T that a quadtree node is allowed to contain, and push the laser point cloud data of the entire partition into the quadtree node buffer queue as the quadtree root node;
[0029] b) Get the first node of the quadtree node buffer queue, count the number of laser points of the node, set it as M, if M<T, push the node into the R tree leaf node buffer queue; if M≥T, go to step c);
[0030] c) Split the node in a quadtree manner, calculate the MBRs corresponding to the four child nodes of the node, and divide the laser point in the node into four child nodes, and insert the four child nodes one by one from the tail of the quadtree node buffer queue. After the execution is completed, continue to step b);
[0031] d) When the quadtree node buffer queue is empty, it indicates that the partitioned laser point cloud is divided according to the quadtree.
[0032] Preferably, the specific implementation method of constructing an R-tree from the sorted quadtree grid in step 2) of the present invention is:
[0033] a) Set the order of the R-tree and the lower bound value Min of the number of leaf node point clouds, and create two new arrays A and B;
[0034] b) Sort the nodes in the R tree leaf node buffer queue in one dimension according to the Hilbert code, and group them according to the following rules: the nodes with more than Min laser points are saved as a whole to array A, and the nodes with less than Min laser points have their laser points saved one by one to array B;
[0035] c) For the nodes in array A, build R-tree indexes in batches;
[0036] d) Insert each laser point in array B into the R-tree index constructed in step c) point by point in a top-down manner to generate the final R-tree index of the laser point cloud partition.
[0037] Preferably, the specific implementation method of serializing the laser point data and local index of the laser point cloud partition into a single HDFS file for storage in step 2) of the present invention is: using Spark's foreachPartition operator, the laser point data and partition R-tree index in the laser point cloud partition are stored as a single HDFS file; the file includes a file header for storing the partition R-tree index structure information and each node information stored in the R-tree according to the partition R-tree index depth traversal order; the file header includes the total number of points, tree height, spatial range MBR, center coordinates and index size; the node information stored in the R-tree includes the layer number of the node, the MBR corresponding to the node, the number of child nodes and the address of each child node.
[0038] Preferably, the specific implementation method of establishing the global spatial index using the STR tree in step 3) of the present invention is:
[0039] a) Set the child node value N of the R-tree node, calculate the MBR of the entire laser point cloud, determine the approximate direction of the point cloud according to the direction of the coordinate axis where the long edge is located, and construct the STR tree global index with the root node of each laser point cloud partition as the leaf node;
[0040] b) The STR tree global index constructed in step a) is stored in the name node NameNode of the Hadoop cluster in the form of a single HDFS file. The entire laser point cloud is organized into a multi-level R-tree structure that integrates grid, quadtree and R-tree indexes in the distributed storage environment Hadoop HDFS.
[0041] Preferably, the specific implementation method of constructing the STR tree global index in step a) of the present invention is:
[0042] 1) The root node of each laser point cloud partition is a leaf node, and all laser point cloud partitions in the same column or the same column are organized into a slice as a node in the upper layer;
[0043] 2) In the X-axis direction or the Y-axis direction, the nodes of the new layer generated in step 1) are grouped into groups of N nodes to form a node of the previous layer, and the remaining nodes less than N are finally merged into one node;
[0044] 3) Calculate the number of nodes N in the new layer n , if N n ≥N, repeat 2) and 3), otherwise exit.
[0045] Compared with the prior art, the present invention has the following significant advantages and effects:
[0046] The present invention discloses a distributed multi-level indexing method for massive airborne laser point clouds. First, the size of the virtual grid is determined according to the density of the laser point cloud and the size of the storage space occupied by a single point cloud data. The coverage of each laser point cloud partition is calculated according to the point cloud coverage and the size of the virtual grid. The plane coordinates of the laser point cloud are directly used to realize the rapid partitioning of the laser point cloud. Then, the laser points in the laser point cloud partition are two-dimensionally partitioned by a quadtree. The quadtree grid obtained by the partition is first sorted in one dimension according to the Hilbert space curve, and then the R tree is constructed in batches, and the R tree index and the partitioned laser point cloud are serialized in a single HDFS data block. Finally, the root node of the local index is used as the leaf node of the global index, and the global spatial index is established using the STR tree, and is stored in the cluster name node as a single HDFS file to complete the multi-level distributed index construction of the laser point cloud. This method can make full use of the more powerful storage management and computing capabilities provided by the distributed system, realize the distributed storage and parallel processing of the laser point cloud in each data node of the cluster, and greatly improve the processing capability of massive laser point clouds. Compared with the stand-alone airborne laser point cloud management, the present invention can make full use of the more powerful data storage management and computing capabilities provided by the distributed cluster to achieve efficient query and processing of laser point clouds; the spatial division of laser point clouds based on virtual grids eliminates the coordinate sorting operation, and achieves rapid division of laser point clouds while ensuring the spatial locality of laser points; the fast convergence of quadtrees in two-dimensional space segmentation and the self-balancing characteristics of R-trees are fully utilized to construct a multi-level distributed spatial index of laser point clouds, which is very suitable for multi-level management and parallel processing of airborne laser point clouds in a cluster environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of the laser point cloud multi-level distributed index construction process adopted by the present invention;
[0048] Figure 2 It is a schematic diagram of the construction of the laser point cloud partition local index adopted by the present invention;
[0049] Figure 3 It is a flow chart of constructing an R-tree using nodes obtained by quadtree decomposition in the present invention. DETAILED DESCRIPTION
[0050] The present invention provides a distributed multi-level spatial indexing method for massive airborne laser point clouds, the method comprising the following steps:
[0051] 1) Virtual grid-based laser point cloud spatial division: According to the laser point cloud density and the storage space occupied by a single point cloud data, the virtual grid size is determined to ensure that a single HDFS file block can store the laser point cloud data and the corresponding local index information within the virtual grid range. According to the laser point cloud coverage and the virtual grid size, the coverage of each laser point cloud partition is calculated, and the plane coordinates of the laser point cloud are used to achieve rapid division of the corresponding laser point cloud partition.
[0052] 2) Construction of local index of laser point cloud partition based on quadtree and 3D R-tree: Use quadtree to divide the laser points in laser point cloud partition in two dimensions, sort the obtained quadtree grid in one dimension according to Hilbert space filling curve, and then construct R-tree for the sorted quadtree grid to complete the construction of local index of laser point cloud partition. Serialize the laser point data and local index of laser point cloud partition into a single HDFS file for storage.
[0053] 3) Construction of global spatial index based on STR (Sort-Tile-Recursive) tree: The root node of the local index of each laser point cloud partition is used as the leaf node of the global spatial index, and the global spatial index is established using the STR tree.
[0054] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0055] See also Figure 1 , the specific implementation of step 1) is:
[0056] The present invention uses Hadoop HDFS to store laser point cloud data and its corresponding spatial index. In order to reduce unnecessary network transmission loss, the partition size is required to be no larger than the size of a single HDFS data block (128M in this embodiment); in order to retain the spatial locality of the laser points, spatially adjacent laser points are allocated to the same partition as much as possible. The specific steps are as follows:
[0057] 1) Use formula (1) to calculate the virtual grid side length l:
[0058]
[0059] in:
[0060] B is the default size of the HDFS file block. In Hadoop 2.X, based on the optimal transmission loss theory, its size is 128M.
[0061] α is the space coefficient occupied by the index, and is generally taken as 0.2 according to experience;
[0062] r is the number of bytes occupied by a single laser. The main information of the laser point is X, Y, Z coordinates, intensity Intensity, time GPSTime, and category. In this embodiment, the coordinate and time information are stored in a 4-byte single-precision floating point type, and the intensity and category are stored in a 2-byte short integer type, occupying 4×4+2×2=20 bytes.
[0063] d is the density of airborne laser point cloud, generally not exceeding 50 points / m 2 In this embodiment, the side length l of the virtual grid is 300m, and the size of the virtual grid is 300m×300m.
[0064] 2) Expand Spark's spatial data processing function and implement PointRDD, which can provide elastic computing capabilities for Point-type spatial data. Use textfile in Spark to read laser point cloud files stored in Hadoop HDFS and generate PointRDD of laser point cloud.
[0065] 3) Using the aggregate operator in Spark, perform aggregation operations on the minimum bounding rectangle (MBR) of each point in the laser point cloud PointRDD, and finally determine the MBR of the entire engineering laser point cloud, denoted as MBR 总 ;
[0066] 4) According to MBR 总 and the virtual grid side length l, determine the coordinate range of each virtual grid {x min ,x max ,y min ,y max}, remove the empty grid without laser points to get the final virtual grid list grids;
[0067] 5) Use the virtual grid list grids to build a partitioner and input it to the laser point cloud PointRDD to partition the laser point cloud and obtain the newly partitioned laser point cloud PointRDD, recorded as PointcloudRDD.
[0068] See also Figure 2 , the specific implementation of step 2 is:
[0069] Using Spark's MapPartition operator and inputting a custom index building method, we can build a quadtree and R-tree hybrid index for the partitioned laser point cloud. Specifically:
[0070] First, the partitioned laser point cloud is quadtree-divided. The specific steps are as follows:
[0071] 1) Set the maximum number of laser points T that a quadtree node is allowed to contain, and push the laser point cloud data of the entire partition into the quadtree node buffer queue as the root node of the quadtree;
[0072] 2) Obtain the head node of the quadtree node buffer queue, count the number of laser points in this node, denoted as M. If M < T, push this node into the R-tree leaf node buffer queue; if M ≥ T, go to step 3);
[0073] 3) Split this node in the quadtree manner, calculate the MBRs corresponding to the four child nodes of this node, and divide the laser points in this node into the four child nodes. Then, insert the four child nodes one by one from the tail of the quadtree node buffer queue. After execution is completed, continue to execute step 2);
[0074] 4) When the quadtree node buffer queue is empty, it indicates that the partition of the laser point cloud is completed by the quadtree.
[0075] Then, construct an R-tree using the R-tree leaf node buffer queue, as Figure 3 shown. The specific steps are as follows:
[0076] 5) Set the order of the R-tree and the lower bound value Min of the number of point clouds in the leaf nodes, and create two new arrays A and B;
[0077] 6) Sort the nodes in the R-tree leaf node buffer queue in one dimension according to the Hilbert code, and group them according to the following rules: The nodes with the number of laser points greater than Min are saved as a whole in array A, and for the nodes with the number of laser points less than Min, the laser points in this node are saved one by one in array B.
[0078] 7) For the nodes in array A, batch construct the R-tree index;
[0079] 8) For each laser point in array B, insert it into the R-tree index constructed in step 7) point by point in a top-down manner to generate the final R-tree index of the laser point cloud partition.
[0080] Use the foreachPartition operator of Spark to store the laser point data and the partition R-tree index in the laser point cloud partition as a single HDFS file. This file is mainly divided into two parts: one is the file header, which stores the structural information of the partition R-tree index, such as the total number of points, tree height, spatial range MBR, center coordinates, index size, etc.; the other is the information of each R-tree node. Each node is stored in the order of depth traversal of the partition R-tree index. The information stored mainly includes: the layer number where the node is located, the MBR corresponding to the node, the number of child nodes, the addresses of each child node, and for leaf nodes, the coordinates of the contained laser points, etc.
[0081] The specific implementation method of step 3) is:
[0082] After the establishment of each laser point cloud partition local index, the laser point cloud of the entire project is jointly managed by multiple laser point cloud partition local indexes. For long line projects, such as roads and railways, there are generally a large number of virtual grids, resulting in a large number of laser point cloud partitions that are not managed. To this end, the present invention uses the root node of the R-tree index of each laser point cloud partition as the leaf node of the global index, and further uses a STR tree algorithm proposed by Leutenegger et al. to construct a global R-tree index.
[0083] First, set the child node value N of the R tree node, calculate the MBR of the entire laser point cloud, determine the approximate direction of the point cloud according to the direction of the long side of the coordinate axis, and construct the STR tree global index with the root node of each laser point cloud partition as the leaf node. In this embodiment, the specific steps of constructing the STR tree global index taking the direction of the point cloud along the X-axis as an example are as follows:
[0084] 1) The root node of each laser point cloud partition is a leaf node, and all laser point cloud partitions in the same column are organized into a slice as a node in the previous layer;
[0085] 2) In the X-axis direction, every N nodes of the new layer generated in step 1) are grouped together to form a node of the previous layer, and the remaining nodes less than N are finally merged into one node;
[0086] 3) Calculate the number of nodes N in the new layer n , if N n ≥N, repeat 2) and 3), otherwise exit.
[0087] For the Y-axis direction, the specific method is the same as before and will not be repeated here.
[0088] The established global index is stored in the NameNode of the Hadoop cluster as a single HDFS file. The file format is similar to the R-tree index storage file format of the laser point cloud partition, except that the leaf node information here is the path of the R-tree index storage file of the laser point cloud partition.
[0089] At this point, the laser point cloud of the entire project is organized into a multi-level R-tree structure that integrates grid, quadtree and R-tree indexes in the distributed storage environment Hadoop HDFS.
Claims
1. A distributed multi-level spatial indexing method for massive airborne laser point clouds, characterized by: The distributed multi-level spatial indexing method for massive airborne laser point clouds comprises the following steps: 1) Divide the laser point cloud space based on the virtual grid to form laser point cloud partitions; 2) Constructing a local index of laser point cloud partitions based on quadtree and 3D R-tree; 3) The root node of each laser point cloud partition local index is used as the leaf node of the global spatial index, and the global spatial index is established using the STR tree; The specific implementation of step 1) is as follows: determining the size of the virtual grid according to the density of the laser point cloud and the storage space occupied by a single point cloud data; calculating the coverage of each laser point cloud partition according to the coverage of the laser point cloud and the size of the virtual grid; and using the plane coordinates of the laser point cloud to quickly divide the corresponding laser point cloud partitions; The step 1) is implemented using Hadoop HDFS. The specific implementation of the step 1) is: a) Calculate the virtual grid side length l using formula (1): in: B is the default size of the HDFS file block. In Hadoop 2.X, the B size is 128M. α is the space coefficient occupied by the index, and the empirical value is 0.2; r is the number of bytes occupied by a single laser point. The main information of the laser point is X, Y, Z coordinates, intensity, GPSTime, and category; d is the density of the airborne laser point cloud, not exceeding 50 points / m 2 ; b) Expand Spark's spatial data processing capabilities and implement PointRDD, which can provide elastic computing capabilities for point-type spatial data. Use Spark's textfile to read laser point cloud files stored in Hadoop HDFS and generate PointRDD of the laser point cloud. c) Using the aggregate operator in Spark, perform aggregation operation on the minimum bounding rectangle (MBR) of each point in the laser point cloud PointRDD, and finally determine the MBR of the entire engineering laser point cloud, which is recorded as MBR 总 ; d) According to MBR 总 and the virtual grid side length l, determine the coordinate range of each virtual grid {x min ,x max ,y min ,y max }, remove the empty grid without laser points to obtain the final virtual grid list grids; e) Use the virtual grid list grids to build a partitioner and input it to the laser point cloud PointRDD to partition the laser point cloud and obtain the newly partitioned laser point cloud PointRDD, recorded as PointcloudRDD; The specific implementation method of step 2) is as follows: using a quadtree to perform two-dimensional segmentation on the laser points in the laser point cloud partition, first sorting the quadtree grids obtained by the segmentation in one dimension according to the Hilbert space filling curve, and then constructing an R-tree on the sorted quadtree grids to complete the construction of the local index of the laser point cloud partition; serializing the laser point data and local index of the laser point cloud partition into a single HDFS file for storage; The specific implementation method of using quadtree to perform two-dimensional segmentation of laser points in the laser point cloud partition in step 2) is: a) Set the maximum number of laser points T that a quadtree node is allowed to contain, and push the laser point cloud data of the entire partition into the quadtree node buffer queue as the quadtree root node; b) Obtain the first node of the quadtree node buffer queue, count the number of laser points of the node, set it to M, if M < T, push the node into the R leaf node buffer queue; if M ≥ T, go to step c); c) Split the node in a quadtree manner, calculate the MBRs corresponding to the four child nodes of the node, and divide the laser point in the node into the four child nodes. Insert the four child nodes one by one from the tail of the quadtree node buffer queue. After the execution is completed, continue to step b); d) When the quadtree node buffer queue is empty, it indicates that the partitioned laser point cloud is divided according to the quadtree; The specific implementation method of constructing the R-tree from the sorted quadtree grid in step 2) is: a) Set the order of the R-tree and the lower bound of the number of leaf node point clouds, and create two new arrays A and B; b) Sort the nodes in the R leaf node buffer queue in one dimension according to the Hilbert code and group them according to the following rule: the nodes with more than Min laser points are saved as a whole to array A; the nodes with less than Min laser points have their laser points saved one by one to array B; c) For the nodes in array A, batch build R-tree indexes; d) Insert each laser point in array B into the R-tree index constructed in step c) point by point in a top-down manner to generate the final R-tree index of the laser point cloud partition.
2. The distributed multi-level spatial indexing method for massive airborne laser point clouds according to claim 1, characterized in that: The specific implementation method of serializing the laser point data and local index of the laser point cloud partition into a single HDFS file for storage in step 2) is: using Spark's foreachPartition operator to store the laser point data and partition R-tree index in the laser point cloud partition as a single HDFS file; the file includes a file header for storing the partition R-tree index structure information and each node information stored in the R-tree according to the partition R-tree index depth traversal order; the file header includes the total number of points, tree height, spatial range MBR, center coordinates and index size; the node information stored in the R-tree includes the layer number of the node, the MBR corresponding to the node, the number of child nodes and the address of each child node.
3. The distributed multi-level spatial indexing method for massive airborne laser point clouds according to claim 2, characterized in that: The specific implementation method of using the STR tree to establish a global spatial index in step 3) is: a) Set the child node value N of the R-tree node, calculate the MBR of the entire laser point cloud, determine the approximate direction of the point cloud according to the direction of the coordinate axis where the long edge is located, and construct the STR tree global index with the root node of each laser point cloud partition as the leaf node; b) The STR tree global index constructed in step a) is stored in the NameNode of the Hadoop cluster as a single HDFS file. The entire laser point cloud is organized in the distributed storage environment Hadoop HDFS as a multi-level R-tree structure that integrates grid, quadtree, and R-tree indexes.
4. The distributed multi-level spatial indexing method for massive airborne laser point clouds according to claim 3, characterized in that: The specific implementation method of constructing the STR tree global index in step a) is: 1) The root node of each laser point cloud partition is a leaf node, and all laser point cloud partitions in the same column or row are organized into a slice as a node in the upper layer; 2) In the X-axis or Y-axis direction, the nodes of the new layer generated in step 1) are grouped into groups of N nodes to form a node of the previous layer. Finally, the remaining nodes less than N are merged into one node. 3) Calculate the number of nodes in the new layer N n , if N n ≥N, repeat 2) and 3), otherwise exit.
