A method for processing surveying and mapping data
Through quad-tree index and Getis Ord Gi* statistical analysis, combined with hierarchical clustering and multi-scale analysis, the problems of high complexity and insufficient accuracy of surveying and mapping data processing in the existing technology are solved, and efficient surveying and mapping data analysis and multi-dimensionality are realized Data mining improves the understanding of the spatial relationship between land and objects.
Patent Information
- Application Number
- CN202410241490.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-03-04
AI Technical Summary
The existing surveying and mapping data processing methods are highly complex, have low processing efficiency, and have insufficient spatial analysis accuracy, making it difficult to accurately capture the correlation relationship between land and objects and multi-scale distribution characteristics.
By constructing quadtree index and Getis Ord Gi* statistical analysis, the domain index and spatial weight matrix of land objects were calculated, and a hierarchical clustering algorithm and multi-scale local spatial statistical analysis were used to reveal the degree of local aggregation and distribution mode of land objects.
It improves the analysis accuracy of surveying and mapping data, reduces the complexity of data processing, realizes accurate description of the spatial relationship between land objects and multi-dimensional data mining, and provides more reliable statistical basis and decision-making support.
Smart Images

Figure CN118093673B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of surveying and mapping data processing, and in particular to a surveying and mapping data processing method. Background Art
[0002] With the rapid development of science and technology, the application of surveying and mapping data in the fields of geographic information systems, urban planning, environmental monitoring, etc. has become more and more extensive. However, existing technologies still face problems such as high complexity and insufficient spatial analysis accuracy in surveying and mapping data processing. These problems limit the in-depth mining and comprehensive analysis of geographic information, and put forward new requirements for efficient data processing and accurate spatial analysis.
[0003] There are many challenges in the current surveying and mapping data processing methods. Traditional processing methods are usually difficult to cope with large-scale, multi-dimensional geographic data, resulting in increased complexity and low processing efficiency. At the same time, the existing technology is not accurate enough in spatial analysis, and it is difficult to accurately capture the correlation between objects and multi-scale distribution characteristics.
[0004] In the related technology, for example, Chinese patent document CN117271683A provides a method for intelligent analysis and evaluation of surveying and mapping data, which relates to the field of surveying and mapping data information processing technology, and solves the shortcomings of incomplete data analysis, inaccurate data quality evaluation and anomaly detection in traditional surveying and mapping data analysis and evaluation methods; the adopted method includes: cleaning, denoising, correcting, converting and filling default values of surveying and mapping data by data preprocessing method; extracting features from surveying and mapping data by image processing tools, and excluding redundant and irrelevant features by feature selector; spatially superimposing geographic information by spatial analysis module; statistically describing, inferring and testing surveying and mapping data by statistical analysis module; classifying, predicting and optimizing surveying and mapping data by intelligent analysis module; performing data evaluation and anomaly detection by intelligent evaluation module; and displaying the evaluation content and analyzed surveying and mapping data by visualization module. However, the spatial analysis in this scheme mainly adopts superposition analysis, which cannot reflect complex spatial associations and interactive relationships, so the analysis accuracy of this scheme needs to be further improved. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the problem of low accuracy in surveying and mapping data analysis in the prior art, the present application provides a surveying and mapping data processing method, which improves the analysis accuracy of surveying and mapping data by constructing a quadtree index and Getis Ord Gi* statistical analysis.
[0007] 2. Technical solution
[0008] The purpose of this application is achieved through the following technical solutions.
[0009] The embodiment of the present specification provides a method for processing surveying and mapping data, including: collecting a surveying and mapping data set containing multiple objects, wherein each object represents a point, line or surface entity in a map; establishing a quadtree spatial index of the surveying and mapping data set; using the established quadtree spatial index, by a distance measurement method, calculating a domain index of each object, the domain index representing the statistical characteristics of the surrounding range of the object; constructing a spatial weight matrix of each object according to the calculated domain index; using a Getis Ord Gi* statistical method to calculate a local spatial statistical value of each object according to the constructed spatial weight matrix, the local spatial statistical value representing the local aggregation degree of the object; using a hierarchical clustering algorithm to hierarchically cluster the surveying and mapping data set according to the obtained local spatial statistical value of each object, to obtain clustering results of objects of different shapes; according to the obtained clustering results of objects of different shapes, by multi-scale local spatial statistical analysis, obtain distribution patterns of objects at different scales within different shapes as processing results of the surveying and mapping data.
[0010] Among them, a feature refers to a physical object on a map or on the surface of the earth, which can be a natural feature or an artificial feature. In the technical solution of the present application, a feature specifically refers to an element in a surveying and mapping product such as a topographic map or a land use map, representing different types of point, line, and surface feature objects on the map, such as buildings, roads, rivers, etc. Each feature contains rich attribute information, such as name, geometric shape, spatial coordinates, etc. The technical solution of the present application requires analysis and processing of each feature and its attributes in the surveying and mapping data set to discover the spatial distribution law between the features. In the present application, features mainly refer to the following types of elements in a topographic map or a land use map: point features: such as isolated buildings, place name labels, etc.; linear features: such as roads, rivers, contour lines, etc.; surface features: such as different types of land use areas, etc. By comprehensively analyzing the spatial position and attributes of each feature, the distribution and aggregation laws of features in the region can be revealed, and the mining of the internal structure of surveying and mapping data can be realized.
[0011] Among them, the quadtree spatial index is a tree data structure that can be used for indexing geographic spatial data. It recursively divides the spatial area into four sub-areas to construct a hierarchical tree structure to implement the indexing of spatial objects. In this application, the purpose of using the quadtree spatial index is to index and store each feature point in the surveying and mapping data set. Through the quadtree spatial index, the features adjacent to each feature can be quickly determined and retrieved, which is beneficial to the subsequent field indicator calculation and spatial analysis. The quadtree spatial index realizes efficient data storage and indexing, and is the basis for the present application to implement spatial clustering analysis.
[0012] Among them, the domain index is a statistic that reflects the characteristics of the domain environment around the feature. It characterizes the overall characteristics of the location of the feature by counting and analyzing the attributes of other features in the area around the feature. In this application, the set of adjacent features of each feature is determined based on the constructed quadtree spatial index. The Euclidean distance between each adjacent feature and the current feature is calculated. Weights are assigned to adjacent features according to the distance. The attribute values of adjacent features are weighted averaged to obtain the domain index of the current feature. The domain index can reflect the influence of the layout and distribution of features around the location of each feature, which is an important reference indicator for subsequent spatial statistical analysis.
[0013] Among them, the Getis Ord Gi* statistical method is a statistical method for detecting the spatial aggregation pattern of point events. It reflects the local spatial autocorrelation of the elements by calculating the relationship between each element and the surrounding element values. In this application; based on the constructed spatial weight matrix, the weight value of each feature and the surrounding features is calculated; the Gi* statistic of each feature is calculated using the attribute value and weight value of the feature; the Gi* value is standardized to obtain the Z-score value, which reflects the spatial aggregation degree of the feature; a positive Z-score value indicates that there is aggregation around the feature, and a negative Z-score value indicates that there is dispersion around the feature. Through the GetisOrd Gi* statistical method, it is possible to effectively determine whether there is aggregation of attribute values around each feature, that is, to determine the local aggregation law of the feature, and provide support for subsequent clustering analysis.
[0014] Among them, the hierarchical clustering algorithm is a clustering algorithm that continuously divides the data sample set. It can obtain clustering results of different granularities through hierarchical division. According to the local spatial statistical value of the object, the hierarchical clustering algorithm is used to cluster the objects. Adjust the clustering granularity to obtain clustering results at different granularities. Hierarchical clustering is performed on objects of different shapes (points, lines, and surfaces) to obtain clustering results of different shapes. Analyze the clustering rules under different granularities and shapes. The hierarchical clustering algorithm can obtain clustering of different granularities, further reveal the aggregation rules of objects at different scales, and realize multi-dimensional mining of surveying and mapping data. Specifically, in this application, the following can be used: density-based hierarchical clustering algorithms, such as DBSCAN algorithm and OPTICS algorithm. Model-based hierarchical clustering algorithms, such as variance analysis clustering and spectral clustering. Grid-based hierarchical clustering algorithms, such as STING clustering and CLIQUE clustering.
[0015] Among them, multi-scale local spatial statistical analysis refers to the use of different parameter settings to perform local spatial statistics, thereby achieving multi-scale analysis of the distribution pattern of land objects. In this application, different statistical window sizes are set for land objects after clustering of different shapes. For each window, the local spatial statistics of the land object, such as kernel density, are calculated. Change the window size, repeat the calculation, and obtain statistical results at different scales. Compare the differences in statistics at different scales to analyze the multi-scale distribution pattern of land objects. Through multi-scale local spatial statistical analysis, the aggregation and distribution laws of land objects of different shapes at different scale levels can be discovered, realizing multi-dimensional analysis of the inherent structure of surveying and mapping data. Specifically,
[0016] Specifically, first, a mapping dataset is collected from multiple sources. The dataset contains point, line or surface entities in the map. These objects can represent various geographic features, such as buildings, roads, water bodies, etc. The diversity and comprehensiveness of the dataset are of great significance for subsequent analysis, ensuring a comprehensive understanding of geographic information. For the collected mapping dataset, a quadtree spatial index structure is used to establish it. Quadtree is a tree-like data structure suitable for two-dimensional space, which can divide the geographic space into rectangular areas, and each node can contain several objects. Such an index structure helps to improve the retrieval efficiency of data and make access to objects faster. Through the established quadtree spatial index, the domain index is calculated for each object. The domain index is obtained by the distance measurement method, which represents the statistical characteristics of the surrounding range of each object. This may involve measuring the number and distance of neighboring objects in the area around the object to capture the characteristics of the spatial distribution of the object. When calculating the domain index, the distance measurement method is used to obtain the relative position information between the objects through the quadtree spatial index. This can include Euclidean distance, Manhattan distance, etc. The specific choice depends on the relationship between the objects and the requirements of the problem. The distance measurement method is a key step to ensure that the domain index accurately reflects the statistical characteristics of the surrounding range of the object. After the domain index is calculated, the statistical characteristics of the range around each object are obtained. These indicators can include the number of neighboring objects, average distance, density, etc., reflecting the spatial correlation and distribution of the objects. This provides an important data basis for subsequent spatial analysis.
[0017] Specifically, based on the calculated domain indicators, the spatial weight matrix of each feature is constructed. The spatial weight matrix reflects the spatial relationship between features and the degree of their mutual influence in space. In the process of constructing the spatial weight matrix, the numerical value of the domain indicator can be used as the weight, or other distance weighting methods can be used to better reflect the spatial correlation of the features. Using the constructed spatial weight matrix, the GetisOrdGi statistical method is used to calculate the local spatial statistical value of each feature. The GetisOrdGi statistical method is a statistical tool for evaluating the degree of aggregation in geographic data. It takes into account the weight of each feature and the spatial distribution of surrounding features. This statistical method can clearly reveal the local aggregation status of each feature in its surrounding area. By operating the spatial weight matrix and the feature attributes, the original local value of each feature is obtained. In spatial statistics, the expected local value is the expected value when it is uniformly distributed in space. The Getis Ord Gi* method compares the local value of each feature with the expected local value to evaluate its degree of aggregation. By comparing the actual local values with the expected local values, the Gi* statistic is calculated, which represents the degree of aggregation of each feature relative to its surrounding features. The results of the Getis Ord Gi* statistic can be divided into positive values, negative values, and values close to zero, representing local aggregation, local dispersion, and no significant aggregation, respectively. These values provide intuitive information about the distribution characteristics of each feature in its surrounding area, which is important for understanding the spatial relationship between features.
[0018] Specifically, a hierarchical clustering algorithm is used to hierarchically cluster the surveying and mapping data set to obtain clustering results of objects of different shapes. The hierarchical clustering algorithm is a clustering method based on similarity. It can group objects according to their similarities and construct a hierarchical structure. Such clustering results can intuitively reflect the correlation between objects and help understand the spatial distribution pattern of objects. According to the clustering results of objects of different shapes, the multi-scale local spatial statistical analysis method is used to obtain the distribution pattern of objects at different scales in different shapes. Multi-scale local spatial statistical analysis is a method for analyzing geographic data by comprehensively utilizing information of different scales. It can reveal the diversity and characteristics of object distribution at different spatial scales. According to the clustering results of objects, the different scale ranges within different shapes, that is, the analysis scale, are determined. At each scale, local spatial statistical methods (such as kernel density estimation, volatility analysis, etc.) are applied to perform statistical analysis on the spatial distribution of objects. The distribution patterns and aggregation degrees of objects at different scales are compared to obtain comprehensive information on the distribution of objects. The results obtained through multi-scale local spatial statistical analysis can show the spatial distribution patterns and aggregation degrees of objects at different scales. These results can provide important references for decision-making in urban planning, resource management, environmental protection and other fields. At the same time, the analysis results can also be used to explore the spatial relationships and laws between objects and promote in-depth understanding and mining of geographic data.
[0019] Furthermore, constructing a quadtree spatial index includes: constructing a quadtree data structure, the data structure including a root node and leaf nodes; obtaining the spatial coordinates (x, y, z) of each feature in the surveying and mapping data set; recursively judging the spatial coordinates (x, y, z) of each node starting from the root node in the data structure, to determine whether the spatial coordinates (x, y, z) of the feature are within the spatial range of the root node; if so, continuing to recursively judge the leaf nodes until a leaf node is found whose range includes the corresponding spatial coordinates (x, y, z), and associating the spatial coordinates (x, y, z) and the corresponding feature with the leaf node as the data of the corresponding leaf node; repeating the above steps until each feature in the surveying and mapping data set is recursively inserted into the quadtree to form a quadtree spatial index.
[0020] Specifically, initialize a root node to represent the entire coordinate space area; recursively divide the representative space of each node into four sub-areas, and generate four sub-nodes accordingly; each node uses a rectangle to represent the spatial area it represents; repeat the above steps to recursively generate internal nodes and leaf nodes; internal nodes are used to represent sub-areas, and leaf nodes are used to store specific data points; finally, a multi-layer tree structure from the root node to the leaf node is formed. Take the surveying and mapping data set and extract the geometric information of each feature.
[0021] Calculate the centroid of each feature's geometric shape and obtain the corresponding spatial coordinates (x, y, z); start from the root node and obtain the spatial range represented by the root node; for the first feature, determine whether its spatial coordinates (x, y, z) are within the root node's spatial range; if within the range, continue to determine the child nodes until a leaf node is found that contains the coordinates; store the feature data in the leaf node; repeat the above steps for each feature in turn, and recursively insert it into the quadtree; finally, all feature data points are recursively inserted into the corresponding leaf nodes. Insert from top to bottom and determine the spatial range step by step. Eliminate unsatisfied subtree branches in advance. Store the data in the leaf node that contains the spatial range. Repeat the insertion until all features are inserted.
[0022] Furthermore, the domain index of each feature is calculated, including: according to the quadtree spatial index, with each feature i as the center, a search radius r is set; the features within the search radius r are regarded as the neighboring features of feature i, and a neighboring feature set {N} of feature i is constructed; the Euclidean distance dist between each neighboring feature in the neighboring feature set {N} and feature i is calculated; and the coefficient weight is set according to the Euclidean distance dist, and the coefficient weight is calculated by the following formula: Among them, α is the distance attenuation coefficient, ranging from 0 to 1; dist k Represents the Euclidean distance between feature i and its adjacent feature k; calculates the domain index F of feature i according to the coefficient weight i ; Among them, k represents the neighboring features of feature i; weight k represents the coefficient of the adjacent feature k; attr k Represents the attribute value of the adjacent feature k.
[0023] Specifically, the distance attenuation coefficient α is introduced to adjust the attenuation rate of the distance. The smaller the α value, the slower the distance attenuation, and distant objects also have a certain impact. The larger the α value, the faster the distance attenuation, which mainly reflects the impact of close objects. By adjusting the α value, the distance attenuation effect can be controlled. The weight formula is simple and efficient to calculate and easy to implement. The weight value reflects the principle of weakening the effect of distance on adjacent objects. The distance attenuation principle conforms to the basic laws of geographic spatial analysis. Weights are assigned according to distance, and the calculated field indicators are more spatially representative. Weight coefficient weight k It plays a regulatory role, and the weight of the nearby objects is greater. k It reflects the attribute characteristics of each feature. The product of weight and attribute is summed up to achieve attribute synthesis. Finally, it is divided by the summed weight to obtain the standardized index result. The calculation process is simple, efficient and easy to implement. The comprehensive effect of surrounding features is taken into account, and the index value is more representative. The field indicators of different features can be compared with each other to reflect the spatial characteristics.
[0024] Furthermore, a spatial weight matrix for each feature is constructed, including: collecting spatial coordinate data of each feature; calculating the Manhattan distance between each feature and other features in the surveying and mapping data set except the feature according to the collected spatial coordinate data and domain indicators; calculating a weight value according to the calculated Manhattan distance; and constructing a spatial weight matrix according to the calculated weight value.
[0025] Among them, first of all, it is necessary to collect the spatial coordinate data of each feature from the surveying and mapping data set. These coordinate data can be the latitude and longitude coordinates of the feature on a two-dimensional plane, or the (x, y, z) coordinates of the feature in three-dimensional space. For each feature, calculate the Manhattan distance between it and other features in the surveying and mapping data set except itself. Manhattan distance is a method to measure the rectangular distance between two points, which can be calculated using the spatial coordinate data of the feature. According to the domain index and the calculated Manhattan distance, calculate the weight value between each feature and other features. Arrange the calculated weight values into a matrix form to construct a spatial weight matrix. The rows and columns of the matrix represent the number of the feature, and each element in the matrix represents the weight value between the corresponding features. Such a matrix can clearly reflect the spatial correlation between the features.
[0026] Furthermore, the weight value w is calculated by the following formula: ij : Among them, w ij represents the weight between feature i and feature j, F i and F j Respectively represent the domain index of features i and j, g(F i ,F j ) is the conversion function that maps domain indicators to weight values, d ij Represents the Manhattan distance between feature i and feature j. The Manhattan distance d is calculated by the following formula ij :d ij =k i |x i -x j |+k j |y i -y j |, where x i ,y i represents the coordinates of feature i, k i is the weight coefficient of feature i, x j ,y j represents the coordinates of feature j, k j is the weight coefficient of feature j.
[0027] Specifically, the mapping function g(F i,F j ), the weight can be adjusted according to the indicator value. i and F j It comprehensively reflects the spatial characteristics of the area where objects i and j are located. The g function can realize the custom weight calculation method based on spatial characteristics. Calculate the Manhattan distance d between objects ij , reflecting the spatial distance. The weight is related to the inverse of the distance, making the interaction of close distances more influential. The combination of the conversion function and distance calculation makes the weight value more spatially representative. The weight matrix reflects the spatial correlation between objects. The absolute value of the difference between the x and y coordinates is calculated respectively. The weight coefficient k is introduced i and k j , which can strengthen or weaken the coordinate difference. The setting of weight coefficient can be customized according to the characteristics of the object. The weight coefficient allows the distance calculation to be adjusted according to the scene requirements. The calculation process is simple, efficient and easy to implement. The distance calculation takes into account the spatial position and characteristics of the object more comprehensively. Since the coordinates and weights are taken into account, the calculated distance is more consistent with the actual spatial relationship. It is conducive to constructing a weight matrix that can reflect the spatial correlation.
[0028] Furthermore, the weight coefficient k is calculated by the following formula: i , k i =w1A i p +w2P i q +w3f(T i ,F i ), where A i represents the area of feature i, P i represents the perimeter of feature i, T i represents the type of feature i, w1, w2, w3 are weight values, representing the weights of area, perimeter and type respectively; p and q are the exponential weights of area and perimeter, f(T i ,F i ) represents the conversion function that maps type and domain indicators to weight values; f(T i ,F i ) is expressed as follows: Among them, λ is the feature type T i The mapping coefficient, T i is the digital code of the type of feature i; μ is the feature field index F i The mapping coefficient of i is the domain indicator of feature i.
[0029] Among them, w1 and w2 are weight values, which are used to adjust the contribution of area and perimeter to the weight coefficient. This allows for more flexibility in considering the shape and size of features when calculating the weight coefficient. w3 is used to adjust the contribution of feature type to the weight coefficient. By introducing this term, the calculation of the weight coefficient can more comprehensively consider different types of features. The mapping function f(T i ,F i ) comprehensively considers the influence of the type of feature and domain indicators on the weight coefficient. Through exponential mapping, the relationship between different types and domain indicators can be made more significant. The mapping coefficients λ and μ can be adjusted according to the needs of the actual problem to meet the actual influence of different types and domain indicators on the weight coefficient. The mapping function values of the type and domain indicators are combined with the calculation results of the area and perimeter to obtain the final weight coefficient k i . By introducing area, perimeter, type and domain indicators, the weight coefficient calculation can more comprehensively consider multiple features of the object. By adjusting the weight value and mapping coefficient, it can flexibly adapt to the needs of different problems and improve the applicability of the method. The mapping function comprehensively considers the type and domain indicators, and highlights the influence of different types and domain indicators on the weight coefficient through exponential mapping.
[0030] Furthermore, the local spatial statistics calculated by the Getis Ord Gi* statistical method adopt the standardized value ZG ij express;
[0031] Among them, E[G ij ] indicates G i The expected value of Var[G ij ] indicates G i Variance of ZG ij G represents the feature i ij The standardized value of G ij G is a statistic indicating the degree of aggregation of feature attribute values of feature j within a preset distance d around target feature i; ij Calculated by the formula: Where i represents the target object, j represents the object within the preset distance d of the target object i; w ij (d) represents the weight value between feature i and feature j, where d is the preset critical distance; attr j Represents the attribute value of feature j.
[0032] In particular, the Getis OrdGi* statistical method can provide an effective measure of the degree of clustering of objects in spatial datasets, especially by standardizing the value ZG ijThe introduction of ZG can better compare spatial aggregation. It can reveal the local aggregation pattern in space, not only providing global aggregation information. It considers the spatial relationship between feature i and feature j in its neighborhood, and calculates the corresponding attribute value aggregation degree according to the weight value. The standardized value ZG is used. ij The scale effect of the Gi* value can be reduced, making the clustering between different regions more intuitively comparable.
[0033] Furthermore, the attribute value attr k Calculated by the following formula: attr k =w4A k +w5P k +w6f(T k ), where A k represents the area of feature k, P k represents the perimeter of feature k, T k represents the type of feature k, w4, w5, w6 are weight values, representing the weights of area, perimeter and type respectively; f(T k ) indicates the adjacent feature type T k The mapping function of k ) is: Among them, λ is the feature type T k The mapping coefficient, T k It is the digital code of feature k type.
[0034] The calculation of the attribute value takes into account the contribution of the area and perimeter of the feature. This makes the features with large area or perimeter have a greater impact on the attribute value calculation, and the calculation of the attribute value can more comprehensively consider the different types of features. k ) The types of features are converted through exponential mapping. The form of exponential mapping makes the weight relationship between different types show exponential changes, so that the contribution of different types can be adjusted more flexibly. The mapping coefficient λ can be adjusted according to the actual situation to meet the degree of influence of different feature types on the attribute value. The contributions of area, perimeter and type are added by weight, and then combined with the mapping function to calculate the attribute value of the feature. This calculation method fully considers the multiple characteristics of the feature. The attributes of multiple dimensions such as area, perimeter and type of the feature are taken into account, making the attribute value calculation more comprehensive. Through the mapping function, the influence of different feature types on the attribute value can be flexibly adjusted, making the relationship between types more flexible. The mapping function uses exponential mapping, which makes the differences between different types more significant, which helps to highlight the influence of certain specific types.
[0035] Furthermore, the hierarchical clustering algorithm is a K-means hierarchical clustering algorithm. The K-means hierarchical clustering algorithm is a cluster analysis method that randomly selects k initial cluster centers. For each sample, the distance to each cluster center is calculated and assigned to the nearest cluster. For each cluster, the coordinates of the cluster center are recalculated. Repeat the above steps until the coordinates of the cluster center no longer change. In the present application, different k values are set according to the local spatial statistics of the object. The K-means algorithm is used to cluster the object data set. The k value is gradually increased to obtain clustering results at different granularities. The clustering results under different k values are analyzed to obtain the hierarchical clustering effect. The aggregation rules of objects at different scales are analyzed.
[0036] Furthermore, the multi-scale local spatial statistical analysis method includes kernel density estimation. Kernel density estimation (KDE) is a non-parametric probability density function estimation method. In the present application, kernel functions of different bandwidths are set for the distribution of objects after clustering of different shapes. The kernel function value of each object for the surrounding point x of the target area is calculated. The density value of point x is obtained by adding up the kernel function values. The kernel function bandwidth is changed, and the calculation is repeated to obtain the kernel density estimation results at different scales. The multi-scale kernel density differences are analyzed to determine the distribution pattern of objects in the target area.
[0037] 3. Beneficial effects
[0038] Compared with the prior art, the advantages of this application are:
[0039] The quadtree spatial index improves the efficiency of retrieval and insertion of surveying and mapping data and significantly reduces the complexity of data processing. This enables large-scale geographic data to be processed more quickly and efficiently.
[0040] By using domain index calculation and spatial weight matrix construction, the spatial correlation between objects can be captured, thus achieving a more accurate description of spatial distribution characteristics;
[0041] Combined with the Getis Ord Gi* statistical method, it is possible to conduct in-depth analysis on spatial statistics, evaluate the local aggregation degree of objects, and provide a more reliable statistical basis for decision-making;
[0042] The hierarchical clustering algorithm can be used to hierarchically cluster objects so that objects with high similarity are classified into one category, thereby better understanding the distribution pattern of objects;
[0043] The introduction of multi-scale local spatial statistical analysis enables the technical solution to not only accurately characterize local aggregation situations, but also reveal the diversity of land features at different scales, further enhancing the comprehensive understanding of geographic data. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0045] Figure 1 is a schematic diagram of a surveying and mapping data processing method according to some embodiments of this specification;
[0046] Figure 2 It is a schematic diagram of constructing a quadtree index space according to some embodiments of this specification. DETAILED DESCRIPTION
[0047] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0048] Example 1
[0049] Figure 1 It is a schematic diagram of a surveying and mapping data processing method shown in some embodiments of this specification, data collection: collecting a surveying and mapping data set containing multiple features, each of which represents a point, line or surface entity in the map. Extracting vector map data of a certain area from a geographic information system database, including multiple features such as points, lines and surfaces. Using the Fiona library in Python to read the shp format vector map file. Each feature is represented in geojson format, including attributes and geometric information. The attributes of each feature include attribute fields such as ID, name, and type. Point features are represented by coordinates; line features are represented by point sequences; and surface features are represented by boundary points. After reading the data, an integrity check is performed to confirm that the attributes and geometric information of each feature are complete. The extracted surveying and mapping data set is stored in json format, or stored in a spatial database such as MongoDB. The data is annotated as necessary to confirm the data source and extraction time.
[0050] Data preprocessing: Get the spatial coordinates (x, y, z) of each feature, and use the quadtree algorithm to create a spatial index for the feature data. Get the spatial coordinates. For point features, directly take their coordinates as (x, y, z). For line features, take the midpoint coordinates as (x, y, z). For surface features, calculate the center of mass of the surface geometry and take the center of mass coordinates as (x, y, z).
[0051] Figure 2This is a schematic diagram of constructing a quadtree index space according to some embodiments of this specification, constructing a quadtree, initializing the root node, representing the entire spatial range, recursively splitting the child nodes: calculating the midpoint of the current node range, using the midpoint to divide the current node into 4 child nodes, assigning a spatial range to each child node, and repeating the recursive splitting until the predetermined tree depth is reached. Initialize the root node, define the entire spatial range, where the X axis is 0-1000 and the Y axis is 0-1000, and create a root node, representing the entire 1000*1000 area. Recursively split the child nodes, calculate the midpoint coordinates of the current node area, where the midpoint coordinates of the root node are (500, 500), use the midpoint to divide the current area into 4 sub-areas, use the midpoint (500, 500) to split it into four 500*500 areas, create 4 child nodes to represent these four sub-areas, child node 1 represents (0, 0)-(500, 500), child node 2 represents (500, 500)-(1000, 1000), child node 3 represents (0, 500)-(500, 1000), child node 4 represents (500, 0)-(1000, 500). Repeat the recursive splitting, perform the above splitting on each child node, and continuously obtain smaller sub-areas. Recurse until the preset tree depth is reached, with a total of 10 recursive layers, and finally form a quadtree. The root node and child nodes form a 10-layer quadtree, and the leaf nodes represent the small subdivided areas.
[0052] Insert feature data, starting from the root node, determine whether the feature's (x, y, z) is within the current node range. If so, insert this node, otherwise enter the child node to continue judging until a leaf node is inserted. Take a feature A, the coordinates of A are (123, 456), start checking from the root node, the root node represents the area (0, 0)-(1000, 1000), feature A is within the root node area, enter the child node to continue judging. Check the child nodes, where entering child node 2 represents the area (500, 500)-(1000, 1000), feature A's coordinates (123, 456) are within the child node. Continue to judge the child nodes, where the child nodes of child node 2 represent (500, 500)-(750, 750), and the coordinates (123, 456) are still within the child node. Repeat the judgment until the leaf node is reached. Finally, a leaf node is determined to represent (100, 400)-(150, 500), and the coordinates (123, 456) are in the leaf node. Insert feature A into this leaf node, and perform the above insertion operation on other features in turn. Finally, all features are inserted into a leaf node.
[0053] Finally, a quadtree is formed, where the root node represents the global scope, the internal nodes represent the segmented sub-regions, and the leaf nodes contain feature data. The quadtree supports fast spatial query of feature data. The quadtree nodes contain spatial scope information. The root node represents the global scope, the internal nodes represent the segmented sub-region scope, and the leaf nodes contain specific feature data. Query example: Query point Q (200, 600), starting from the root node, compare whether Q is within the node range. Q is within the global scope represented by the root node, enter the child node, and after comparison and judgment, determine that Q is within the child node representing (100, 500)-(300, 800). After recursive judgment, determine that Q is within the leaf node (150, 550)-(250, 650). The surrounding feature data can be quickly obtained directly from the leaf node. Quadtree supports two types of queries: point query: quickly find the leaf node where a point is located, and area query: quickly find the leaf node covered by the area interval. Quadtree uses spatial segmentation to accelerate the query speed, eliminating the process of judging data one by one, and greatly improving the efficiency of spatial query.
[0054] Feature extraction: Based on the constructed quadtree spatial index, the domain index Fi of each feature is calculated by Euclidean distance. In the established quadtree, feature A is located in a leaf node. Set the query range r = 100 meters. From the leaf node where feature A is located, trace back upward to obtain an igher-level internal node, whose range completely covers the query range. Starting from this internal node, recursively search all its child nodes. For each child node, determine whether the area it represents has an intersection with the query range. If there is an intersection, collect all feature data under the child node and add it to the set {N}. Recursively determine the child nodes of each intersection child node. Finally, all features in the nodes that intersect with the query range are collected. These feature sets are taken as {N}, which represents the set of adjacent features within 100 meters around feature A. Repeating the query process can quickly obtain the adjacent features within the surrounding range of each feature.
[0055] For the adjacent feature An, its coordinates (x n ,y n ), calculate the Euclidean distance between it and the coordinates (x, y) of the central feature A:
[0056] Calculate the weight: where α is 0.5, Calculate the weight of each An: Each feature has an attribute value attr k , attr1=10, attr2=20, calculate the weight*attr of each An: weight1×attr1, weight2×attr2, and sum to get ∑weight i ×attr i, find the sum of all weights∑weight i , get the domain index of feature A: Repeat the above calculation to get the F of each feature. i .
[0057] Constructing a spatial weight matrix: Based on the domain index F of the land object i , using Manhattan distance and multiple attributes to calculate the weight coefficient k i , construct the spatial weight matrix W between features. For each feature i, its domain index F has been calculated i , calculate the Manhattan distance d ij , coordinates of feature i: (x i ,x j )=(10,15), coordinates of feature j: (x i ,y i )=(10,15),(x j ,y j )=(20,25),d ij =k i |x i -x j |+k j |y i -y j |=|10-20|+|15-25|, calculate the weight coefficient k i , where feature i has an area
[0058] A i =16,P i =20,T i =1,w1=0.4,w2=0.3,w3=0.5,p=0.5,q=0.5
[0059] f(T i ,F i )=2F i (where F i =0.6)
[0060] Calculate the weight w ij ,in
[0061]
[0062] Construct the spatial weight matrix W between the features: There are 4 features, so construct a 4x4 spatial weight matrix W:
[0063]
[0064] The calculated weight values are as follows:
[0065] w11 =0.1,w 12 =0.3,w 13 =0.2,w 14 =0.4
[0066] w 21 =0.5,w 22 =0.2,w 23 =0.6,w 24 =0.1
[0067] Normalize W by row: sum the values of each row w by S, let The first line:
[0068] S=w 11 +w 12 +w 13 +w 14 =1, then: w' 11 =0.1,w' 12 =0.3,w' 13 =0.2,w'4=0.4, repeat row standardization to get the standardized matrix W', W' is the final standardized spatial weight matrix, which represents the spatial weight between any features.
[0069] Local spatial statistics: According to the spatial weight matrix W, the GetisOrdGi* statistical method is used to calculate the local spatial statistics ZG of each feature. ij , which indicates the degree of attribute aggregation of the object. For object i, the search neighborhood distance is d, the surrounding object set is {j}, and the weight w of object i and each j is calculated ij (d) Construct the local weight matrix W i , calculate the attribute value attr of each feature j j , set the neighborhood distance of feature i to d = 100 meters, search for surrounding features within range d, find 5 features {j1, j2, j3, j4, j5}, and calculate the distance between feature i and each j k Weight: w ij1 =0.7,w ij2 =0.6, w ij3 =0.8, w ij4 =0.5, w ij5 =0.9. Construct the local weight matrix W i :
[0070]
[0071] Calculate the attribute value attr of each jk: attr j1 =5,attr j2 = 8. Calculate the local G value: Calculate the expected value E[G ij ] and variance Var[G ij ], standardized G i Score: ZG ij That is, the local Moran'I statistical value of feature i, and the ZG of each feature is repeatedly calculated. ij , positive ZG ij Indicates high value aggregation, negative ZG ij Indicates low value aggregation, and finally obtains the ZG of all objects ij The value indicates the degree of local spatial aggregation.
[0072] Known weight matrix W i and attribute value attr j , calculate the local G value: where ∑jw ij ×attr j =152,∑jattr j =100, then Gi=152 / 100=1.52, calculate the expected value and variance: E[Gi]=1, Var[Gi]=0.5, standardize Gi: Repeat the above steps to calculate the ZGi of each feature. Analyze the value of ZGi: if ZGi>0, it indicates high-value aggregation, and if ZGi<0, it indicates low-value aggregation. Finally, the ZGi of each feature is obtained, which reflects the local spatial aggregation intensity.
[0073] Hierarchical clustering: According to the local spatial statistical value ZGi, the K-means hierarchical clustering algorithm is used for objects of different shapes to obtain clustering results of different granularities. The feature data is divided into three different shapes: points, lines, and surfaces. A point feature data set is constructed: [0.2, 120, 300, 10, 20], [0.5, 150, 330, 15, 18], the number of clustering levels k is set to 5, and 5 points are randomly selected as the initial clustering centers: center 1: [0.3, 130, 310, 12, 19], center 2: [0.4, 140, 320, 13, 21], the Euclidean distance from each point to each center is calculated, and the cluster center of each class is updated, that is, the class mean center 1 is recalculated: [0.25, 135, 315, 11, 20], and the distance calculation and update of the class center are repeated. When the class center no longer changes, the clustering is completed. Finally, each point is classified into the 1 most matching class, and the results of 5 clustering levels are obtained. Repeat until the center point no longer changes, and finally the 5 clustering level results of the point features are obtained. Similarly, we can obtain the hierarchical clustering results of line and surface features, forming hierarchical clustering results of different granularities.
[0074] Multi-scale analysis: For the clustering results, we use multi-scale kernel density estimation and other methods to analyze the distribution patterns of objects of different shapes at different scales. We have obtained the hierarchical clustering results of point, line, and surface objects. Taking point objects as an example, we calculate the kernel density of point sets at different scales. The first scale is r = 100 meters. For each point Pi, we search for adjacent points within a radius of 100 meters and calculate the kernel function value: K(d) = 1 / 100-d / 100 (d is the distance from Pi to the adjacent point). We sum K(d) to obtain the kernel function of point P. i The density k1. The second scale r = 200 meters, search for neighboring points within a radius of 200 meters, kernel function: K(d) = 1 / 200-d / 200, sum to calculate k2. The third scale r = 500 meters, search for neighboring points within a radius of 500 meters, kernel function: K(d)
[0075] =1 / 500-d / 500, sum and calculate k3. Compare the distribution of k1, k2, and k3, and analyze the distribution patterns of point sets at different scales.
[0076] The kernel density images at each scale were spatially analyzed, and the distribution of kernel density values at different scales was compared. The changes in the densely distributed areas of land objects at different scales were observed. The similarities and differences in the distribution patterns of land objects at each scale were analyzed. Similarly, multi-scale kernel density analysis of line and surface land objects was performed, and finally the distribution law of land objects at different scales was obtained. Kernel density distribution images were obtained at the scales of 100 meters, 200 meters, and 500 meters. At the scale of 100 meters, it was observed that there was a high-density clustering area in area A. At the scale of 200 meters, the density value of area A decreased, while the density value of area B was higher. At the scale of 500 meters, a large high-density area appeared in area C. Comparing different scales, areas A and B are small-scale dense areas, while C is a larger-scale clustering area. This shows that the distribution of land objects has the dual characteristics of local aggregation and global aggregation. The changes in the kernel density distribution of line and surface land objects were also analyzed. Line land objects change less at different scales, while surface land objects change significantly. Comprehensive analysis results in the multi-scale law of land object distribution.
[0077] Output results: The distribution patterns of objects of different shapes at different scales are finally obtained as the results of surveying and mapping data processing. Visualization: Based on the results, clustering layer diagrams and distribution density diagrams are generated to achieve the visualization of surveying and mapping data analysis results. Model optimization: Based on the results, the impact of different parameter settings is evaluated, and the model is continuously optimized to improve the analysis effect.
[0078] Example 2
[0079] This embodiment uses the same data as in Embodiment 1, wherein the hierarchical clustering algorithm uses the DBSCAN algorithm:
[0080] Input data: feature dataset, including the coordinates, attributes and other information of each feature. Set the parameters of DBSCAN: neighborhood distance Eps and minimum number of samples MinPts. Input data: feature dataset:
[0081]
[0082] Among them, ID: represents the unique identification number of the feature, coordinates: (12,30) represents the coordinate position of the feature, here the first feature is located at the coordinate (12,30), attribute 1: an attribute value between 0 and 1, such as 0.6, attribute 2: a numerical attribute of the feature, here is 100, so this data set contains the ID, location coordinates and two attribute information of each feature. Contains the ID, coordinates and attribute information of each feature, sets the DBSCAN parameters: neighborhood distance Eps, according to the data range and clustering target, set Eps = 15 units; minimum sample number MinPts, based on experience, set MinPts = 5. This completes the data input and parameter setting required for the DBSCAN algorithm. Next, the density clustering process based on Eps and MinPts can be carried out.
[0083] Randomly select an unvisited point p and search for p's neighborhood samples within the range of Eps. If the number of neighborhood samples is greater than or equal to MinPts, mark p and the neighborhood samples as a cluster. The neighborhood samples are queued as core objects. Randomly select an unvisited point p, such as point A (23, 56), search for point A's neighborhood samples within the preset range of Eps = 15, and find that there are 6 sample points {B, C, D, E, F, G} in the neighborhood of point A. Determine whether the number of these 6 neighborhood samples is >= the preset MinPts = 5. Because 6>=5, mark point A and its neighborhood {B, C, D, E, F, G} as a cluster C1, and queue the neighborhood samples {B, C, D, E, F, G} as core objects. Next, take the core object out of the queue, search its neighborhood and expand the cluster, and repeat the process until the queue is empty.
[0084] Take out a core object core from the queue and search the Eps neighborhood of the core. If the neighborhood sample has not been visited, it is marked as the cluster of the core, and the unmarked sample is queued. Take out a core object A from the queue, search the neighborhood of core A within the range of Eps = 15, and find that there are 4 samples {B, C, D, E} in the neighborhood of core A. Determine whether these 4 samples have been marked. Samples B and C have been marked as cluster C1, and samples D and E have not been marked. Therefore, D and E are marked as cluster C1 where core A is located, and unmarked D and E are queued as new core objects. Subsequently, cores are taken out from the queue, the neighborhood is searched, and unmarked samples are added to the corresponding clusters. Repeat the expansion process until the queue is empty, and finally get the clustering result.
[0085] Repeat the above steps until the queue is empty. Unvisited samples are marked as noise. Increase Eps and MinPts, and repeat to obtain the next level of clustering. Recursively change the parameters to obtain hierarchical clustering results. According to the clustering results, perform spatial distribution law analysis. Repeat the clustering process with multiple core objects until the queue is empty. Mark the remaining unvisited sample points as noise. The first-level clustering results are obtained with Eps=15 and MinPts=5. Increase the parameters to Eps=25 and MinPts=8, and repeat the DBSCAN process. A new round of clustering results is obtained as the second level. Recursively increase the parameters to obtain the third, fourth, and... clustering results. Compare the results of different levels: the first level has the largest number of clusters and the smallest granularity. As the level increases, the number of clusters decreases and the granularity gradually increases. Analyze the clustering distribution laws at different levels: Level 1: microscopic distribution, Level 2: local distribution, Level 3: global distribution, and integrate multi-level clustering results to evaluate the distribution pattern of objects.
[0086] The invention of the present application and its implementation methods are described schematically above. The description is not restrictive. Without departing from the spirit or basic features of the present application, the present application can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention of the present application. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the present invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
Claims
1. A surveying and mapping data processing method, include: Acquiring a mapping data set containing a plurality of features, wherein each feature represents a point, line or area entity in a map; Establish a quadtree spatial index for surveying and mapping datasets; Using the established quadtree spatial index, the domain index of each feature is calculated through the distance measurement method. The domain index represents the statistical characteristics of the surrounding area of the feature. According to the calculated domain indicators, the spatial weight matrix of each feature is constructed; According to the constructed spatial weight matrix, the Getis OrdGi* statistical method is used to calculate the local spatial statistical value of each feature, which represents the local aggregation degree of the feature; According to the local spatial statistical value of each object, a hierarchical clustering algorithm is used to perform hierarchical clustering on the surveying and mapping data set to obtain clustering results of objects of different shapes; Based on the clustering results of objects of different shapes, the distribution patterns of objects of different shapes and scales are obtained through multi-scale local spatial statistical analysis as the processing results of surveying and mapping data; Build a quadtree spatial index, including: Construct a quadtree data structure, which includes a root node and leaf nodes; Get the spatial coordinates (x, y, z) of each feature in the surveying and mapping dataset; Starting from the root node in the data structure, recursively judge the spatial coordinates (x, y, z) of each node to determine whether the spatial coordinates (x, y, z) of the object are within the spatial range of the root node; If yes, continue to recursively judge the leaf nodes until a leaf node is found whose range contains the corresponding spatial coordinates (x, y, z), and the spatial coordinates (x, y, z), the corresponding ground object and the leaf node are associated as the data of the corresponding leaf node; Repeat the above steps until each feature in the surveying and mapping dataset is recursively inserted into the quadtree to form a quadtree spatial index; Calculate the domain indicators for each feature, including: According to the quadtree spatial index, the search radius r is set with each feature i as the center; The objects within the search radius r are regarded as the neighboring objects of object i, and a set {N} of neighboring objects of object i is constructed; Calculate the Euclidean distance dist between each adjacent feature in the adjacent feature set {N} and feature i; The coefficient weight is set according to the Euclidean distance dist. The coefficient weight is calculated by the following formula: Among them, α is the distance attenuation coefficient, ranging from 0 to 1; dist k represents the Euclidean distance between feature i and its adjacent feature k; Calculate the domain index F of feature i according to the coefficient weight i ; Among them, k represents the neighboring features of feature i; weight k represents the coefficient of the adjacent feature k; attr k Represents the attribute value of the adjacent feature k.
2. The surveying and mapping data processing method according to claim 1, Features: Construct the spatial weight matrix of each feature, including: Collect spatial coordinate data of each feature; Calculate the Manhattan distance between each feature and other features in the surveying and mapping data set except the feature according to the collected spatial coordinate data and domain indicators; Calculate the weight value according to the calculated Manhattan distance; According to the calculated weight values, a spatial weight matrix is constructed.
3. The surveying and mapping data processing method according to claim 2, Features: The weight value w is calculated by the following formula ij : Among them, w ij represents the weight value between feature i and feature j, F i and F j Respectively represent the domain index of features i and j, g(F i ,F j ) is the conversion function that maps domain indicators to weight values, d ij represents the Manhattan distance between feature i and feature j; The Manhattan distance d is calculated by the following formula ij : d ij =k i |x i -x j |+k j |y i -y j | Among them, x i ,y i represents the coordinates of feature i, k i is the weight coefficient of feature i, x j ,y j represents the coordinates of feature j, k j is the weight coefficient of feature j.
4. The surveying and mapping data processing method according to claim 3, Features: The weight coefficient k is calculated by the following formula i ; Among them, A i represents the area of feature i, P i represents the perimeter of feature i, T i Indicates the type of feature i, w 1 、w 2 、w 3 are weight values, representing the weights of area, perimeter and type respectively; p and q are the exponential weights of area and perimeter, f(T i ,F i ) represents the conversion function that maps type and domain indicators to weight values; f(T i ,F i ) is expressed as follows: Among them, λ is the feature type T i The mapping coefficient, T i is the digital code of the type of feature i; μ is the feature field index F i The mapping coefficient of i is the domain indicator of feature i.
5. The surveying and mapping data processing method according to any one of claims 2 to 4, Features: The local spatial statistics calculated by the Getis OrdGi* statistical method use the standardized value ZG ij express; Among them, E[G ij ] indicates G i The expected value of Var[G ij ] indicates G i The variance of G ij The standardized value of G ij Indicates the feature attributes ZG of the target feature i within the preset distance d around the feature j ij Statistics of the degree of clustering of sex values; G ij Calculated by formula: Where i represents the target object, j represents the object within the preset distance d of the target object i; w ij (d) represents the weight value between feature i and feature j, where d is the preset critical distance; attr j Represents the attribute value of feature j.
6. The surveying and mapping data processing method according to claim 5, Features: Attribute value attr k Calculated by the following formula: attr k =w 4 A k +w 5 P k +w 6 f(T k ) Among them, A k represents the area of feature k, P k represents the perimeter of feature k, T k Indicates the type of feature k, w 4 、w 5 、w 6 are weight values, representing the weights of area, perimeter and type respectively; f(T k ) indicates the adjacent feature type T k The mapping function of Mapping function f(T k ) is: f(T k )=e λTk Among them, λ is the feature type T k The mapping coefficient, T k It is the digital code of feature k type.
7. The surveying and mapping data processing method according to claim 6, Features: The hierarchical clustering algorithm is the K-means hierarchical clustering algorithm.
8. The surveying and mapping data processing method according to claim 7, Features: Multi-scale local spatial statistical analysis methods include kernel density estimation.
Citation Information
Cited By
Real estate surveying and mapping data processing method and system based on cloud service
CN121482824A
