Distance range connection query visualization method and device, equipment and medium
By dividing the spatial vector data set into a reference data set and a target data set, and visualized in the display screen, traversing each pixel to query whether the target vector is within the pixel range, filtering qualified pixels, and querying whether the distance between the target vector and the reference vector within the qualified pixel range is less than the preset threshold, and outputting the distance range connection query results, the problem of low efficiency of distance range connection query in the existing technology is solved, and efficient and applicable query effects are achieved.
Patent Information
- Application Number
- CN202510531782.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-25
AI Technical Summary
When processing large-scale spatial data sets, the distance-range connection query is inefficient and cannot meet the real-time requirements. The query strategy depends on the distribution and division of the data set, affecting applicability.
By dividing the spatial vector data set into a reference data set and a target data set, and visualizing it in the display screen, traversing each pixel to query whether the target vector is within the pixel range, filtering the qualified pixels, and querying whether the distance between the target vector and the reference vector within the qualified pixel range is less than the preset threshold, and outputting the distance range connection query results.
It realizes efficient query of vector data, significantly improves the efficiency of computational query, ensures applicability in different data sets, and directly outputs visual query results through pixel-by-pixel query, supporting detailed analysis and operation of subsequent data.
Smart Images

Figure CN120045594A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of spatial data analysis, and particularly to a visualization method, device, equipment and medium for distance range join query. Background Art
[0002] Distance Range Join Query (DRJQ) is a basic and important operation in spatial database query. Its task is to find, for each point in set P, all points in set Q that are located within a circular region centered at this point with a radius of R.
[0003] DRJQ usually involves the input and query of large-scale data sets. Common methods for processing these big data include parallel computing, distributed computing, and machine learning. However, although these methods can improve query efficiency to a certain extent, when dealing with a data set of hundreds of millions of records, the query time may still reach about 100 seconds, which cannot meet the real-time requirements. Moreover, most existing methods rely on the distribution and partitioning of the data set, which leads to the need to re-plan the query strategy when dealing with different data sets, thus affecting their applicability. Summary of the Invention
[0004] Based on this, it is necessary to provide a visualization method, device, equipment and medium for distance range join query for the above technical problems.
[0005] A visualization method for distance range join query, the method includes: Step 1, divide a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen; Step 2, traverse each pixel on the display screen, query whether the target vector in the target data set is located within the spatial range represented by the current pixel, and filter out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and match the display value of the qualified pixels with the distance range join query result to output the visualized distance range join query result.
[0006] In one embodiment, the vector data includes point vectors, line segment vectors and polygon vectors, and all vector data are stored based on R-tree index; Among them, the R-tree index of the point vector includes the point coordinates and the ID corresponding to the point; The R-tree index of line segments vectors includes the starting points of the line segments and the IDs corresponding to the line segments; The R-tree index of polygon vectors includes the line segment indexes representing each side of the polygon vector and the border indexes of the minimum bounding rectangle representing the polygon vector; wherein, the line segment index includes the starting point of the line segment, the inscribed polygon IP, and the ID corresponding to the line segment, and the border index includes the lower left coordinate and the upper right coordinate of the border.
[0007] In one embodiment, the method further includes: For the distance range join query of point vectors, set a distance threshold The framed query area is a circular area centered on the point vector with a radius of ; For the distance range join query of line segment vectors, set a distance threshold The framed query area is the union of all circular areas centered on each point on the line segment vector with a radius of ; For the distance range join query of polygon vectors, set a distance threshold The framed query area is the union of all circular areas centered on each point on the border of the polygon vector with a radius of and the spatial range inside the border of the polygon vector.
[0008] In one embodiment, when the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 2 of the method further includes: Define that the spatial range represented by the current pixel is a circular area centered on the pixel center with a pixel radius of , and use the inscribed rectangle and the circumscribed rectangle of the circular area as the internal box and the external box respectively; wherein, the side length of the internal box is , and the side length of the external box is , representing the resolution of the Z-th level of the display screen; Conduct a primary query of the target vector in the internal box. If the target vector is found in the primary query, determine that the target vector in the internal box is completely within the spatial range represented by the current pixel, and regard the current pixel as a qualified pixel; Otherwise, conduct a secondary query of the target vector in the external box. If the target vector is found in the secondary query, further determine the distance between the target vector in the external box and the pixel center whether it is less than . If it is less, determine that at least one target vector is within the spatial range represented by the current pixel, and regard the current pixel as a qualified pixel; otherwise, regard the current pixel as an unqualified pixel; wherein, is the spatial Euclidean distance.
[0009] In one embodiment, when the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 3 of the method further includes: Taking the target vector in the qualified pixels as the query center, constructing a circular area with the query center as the center of the circle and the radius as the distance threshold and taking the inscribed rectangle and the circumscribed rectangle of the circular area as the internal query box and the external query box respectively; wherein, the side length of the internal query box is and the side length of the external query box is ; Performing an initial query of the reference vector in the internal query box. If the reference vector is initially queried, determining whether the distance between the reference vector in the internal query box and the query center is less than the distance threshold . If so, directly outputting the reference vector in the internal query box and the target vector serving as the query center as the distance range connection query result; Otherwise, performing a secondary query of the reference vector in the external query box. If the reference vector is secondarily queried, further determining whether the distance between the reference vector in the external query box and the target vector serving as the query center is less than the distance threshold . If it is less, outputting at least one reference vector and the target vector serving as the query center as the distance range connection query result; otherwise, outputting the distance range connection query result as none.
[0010] In one embodiment, when the vector data in the reference data set and / or the target data set are polygon vector data, steps 2 and 3 of the method further include: When the reference vector is a point vector or a line segment vector and the target vector is a polygon vector, first evaluate the spatial relationship between the current pixel and any one of the target vectors. If the distance between the boundary feature of any one of the target vectors and the pixel center is less than the pixel radius, or the pixel center is located inside any one of the target vectors, it is determined that at least one target vector is located within the space range represented by the current pixel, and the current pixel is taken as a qualified pixel; then, determine whether the qualified pixel intersects with any one of the reference vectors under the distance threshold, and output the reference vector that meets the intersection condition and the target vector in the qualified pixel as the distance range connection query result; When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is located within the space range represented by the current pixel. If the distance between any one of the target vectors and the pixel center is less than , it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; then, it is determined whether the pixel center of the qualified pixel is inside any reference vector or intersects with any reference vector within a distance threshold, and the reference vector containing the pixel center or the reference vector satisfying the intersection condition and the target vector in the qualified pixel are output as the distance range connection query result; where is the pixel radius, represents the resolution of the Z-th level of the display screen; When both the reference vector and the target vector are polygon vectors, only the reference vectors and target vectors that satisfy the following two constraint conditions are output as the distance range connection query result, including: Constraint condition 1: The pixel center is inside any target vector or the boundary of any target vector is within the spatial range represented by the current pixel; Constraint condition 2: The pixel center is inside any reference vector or intersects with any reference vector within a distance threshold.
[0011] In one embodiment, determining whether the pixel center is inside a polygon vector includes: Locating candidate polygon vectors that may contain the pixel center according to the border index of the polygon vector; Draw a query line segment parallel to the x-axis from the boundary of the minimum bounding rectangle of the polygon vector to the pixel center position, and use the line segment index of the polygon vector to count the number of intersections of this query line segment and the boundary of the polygon vector; if the number of intersections is odd, it is determined that the pixel center is inside the polygon vector; if the number of intersections is even, it is determined that the pixel center is outside the polygon vector.
[0012] A distance range connection query visualization device, the device includes: A data preprocessing module, configured to divide a spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data in the display screen; A pixel and target vector spatial query module, configured to traverse each pixel in the display screen, query whether the target vector in the target data set is within the spatial range represented by the current pixel, and filter out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; A target vector and reference vector spatial query module, configured to query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold within the spatial range of the qualified pixel, output the target vector and the reference vector that satisfy the distance threshold constraint condition as the distance range connection query result, and perform style matching on the display value of the qualified pixel and the distance range connection query result, and output the visualized distance range connection query result.
[0013] A computer device, comprising a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Step 1, divide the spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen; Step 2, traverse each pixel on the display screen, query whether the target vector in the target data set is within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching between the display value of the qualified pixel and the distance range join query result, and output the visualized distance range join query result.
[0014] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Step 1, divide the spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen; Step 2, traverse each pixel on the display screen, query whether the target vector in the target data set is within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching between the display value of the qualified pixel and the distance range join query result, and output the visualized distance range join query result.
[0015] The above distance range join query visualization method, device, equipment and medium transform the problem of spatial distance range join query into the problem of evaluating the spatial topological relationship between pixel positions and vector objects. First, it determines and filters the qualified pixels containing the target vector on the display screen, and then, among the qualified pixels, it only queries the distances between a small number of target vectors and reference vectors to output the distance range join query result, realizing the efficient query of vector data. Moreover, since the number of pixels on the display screen is limited and stable, it can maintain a consistent computational complexity when processing different types and scales of spatial data queries, significantly improving the computational query efficiency and ensuring applicability in different datasets. In addition, by querying pixel by pixel and matching the display values of qualified pixels with the distance range join query results, it can directly output the visualized query results, which is beneficial for guiding the subsequent detailed analysis and targeted operations of data. Description of the Drawings
[0016] Figure 1 It is a schematic flowchart of the distance range join query visualization method in an embodiment; Figure 2 It is a schematic overall architecture diagram of the distance range join query visualization method in an embodiment; Figure 3 It is a schematic diagram of different types of target vectors intersecting with pixel P in an embodiment; among them, Figure 3 (a) shows a point vector intersecting with pixel P; Figure 3 (b) shows a line segment vector intersecting with pixel P; Figure 3 (c) shows a polygon vector intersecting with pixel P; Figure 4 It is a schematic diagram of different types of target vectors not intersecting with pixel P in an embodiment; among them, Figure 4 (a) shows a point vector not intersecting with pixel P; Figure 4 (b) shows a line segment vector not intersecting with pixel P; Figure 4 (c) shows a polygon vector not intersecting with pixel P; Figure 5 It is about setting distance thresholds for different types of vectors in an embodiment A schematic diagram of the query area framed; among them, Figure 5 (a) shows the query area framed by setting a distance threshold for a point vector The framed query area; Figure 5 (b) shows the query area framed by setting a distance threshold for a line segment vector The framed query area; Figure 5 (c) shows the query area framed by setting a distance threshold for a polygon vector The framed query area; Figure 6 It is a schematic diagram of the query box set for a point vector or a line segment vector in an embodiment; among them,Figure 6 (a) shows the internal box and the external box; Figure 6 (b) shows the internal query box and the external query box; Figure 7 It is a schematic diagram showing the influence of the value of the number n of query centers within qualified pixels in an embodiment on the query result. Among them, Figure 7 (a) shows n = 1, Figure 7 (b) shows n = 3, Figure 7 (c) shows n = the ground truth value; Figure 8 It is a schematic diagram comparing the query performance of different methods in an embodiment. Among them, Figure 8 (a) shows querying D2 using the reference dataset D1; Figure 8 (b) shows querying D4 using the reference dataset D3; Figure 8 (c) shows querying D6 using the reference dataset D5; Figure 9 It is a schematic diagram of the internal structure of a computer device in an embodiment. Detailed implementation manners
[0017] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0018] First, define Theorem 1 as: Let the reference dataset and the target dataset be two point sets in the spatial vector dataset , and be the distance threshold. Then the result of the distance range join query is the set , which contains each reference vector in , and all target vectors in whose points are within the circular range with as the center and the radius of : ; Among them, represents the i th reference vector and , is the number of reference vectors; represents the j th target vector, and , is the number of target vectors.
[0019] In an embodiment, asFigure 1 and Figure 2 As shown in Figure 2 , a visualization method for distance range join query is provided, including the following steps: Step 1: Divide the spatial vector dataset containing multi-type vector data into a reference dataset and a target dataset, and perform visualization processing on all vector data on the display screen.
[0020] Step 2: Traverse each pixel on the display screen, query whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels.
[0021] Step 3: Within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching between the display value of the qualified pixels and the distance range join query result, and output the visualized distance range join query result.
[0022] Among them, the style matching is as Figure 2 shown. Assign values to each pixel. If it is an unqualified pixel, directly assign a null value; if it is a qualified pixel, judge the corresponding assignment according to the distance range join query result. If the distance range join query result is none, the assignment of the qualified pixel is null; otherwise, the assignment of the qualified pixel is not null.
[0023] This method transforms the spatial distance range join query problem into an issue of evaluating the spatial topological relationship between pixel positions and vector objects. Since the number of pixels on the display screen is limited and stable, it can maintain a consistent computational complexity when processing queries of different types and scales of spatial data, significantly improving the computational query efficiency and ensuring applicability in different datasets. In addition, by querying pixel by pixel and performing style matching between the display value of the qualified pixels and the distance range join query result, it can directly output the visualized query result, which is beneficial for guiding the detailed analysis and targeted operations of subsequent data.
[0024] In one embodiment, the vector data includes point vectors, line segment vectors, and polygon vectors. To efficiently organize and manage spatial vector data and improve query efficiency, all vector data is stored based on the R-tree index, as shown in Table 1.
[0025] Table 1 R-tree Index of Multi-Type Vector Data
[0026] The R-tree index RtreeP of the point vectors in Table 1 includes the point coordinates (x, y) and the ID corresponding to the point; the R-tree index RtreeL of the line segment vectors includes the starting point of the line segment and the ID corresponding to the line segment; the R-tree index of the polygon vectors includes the line segment index RtreeE representing each side of the polygon vector and the bounding box index RtreeMBR representing the minimum bounding rectangle of the polygon vector; wherein, the line segment index RtreeE includes the starting point of the line segment, the inscribed polygon IP, and the ID corresponding to the line segment, and the bounding box index RtreeMBR includes the lower left coordinate ( , ) and the upper right coordinate ( ). Further, to support spatial judgment, for the R-tree index of the polygon vectors, the following operations are also performed: 1) Determine whether the node information is parallel to the x-axis; 2) For the edges with monotonically increasing or decreasing, use the line segment cutting technology for processing.
[0027] In one of the embodiments, to handle the problem of spatial topological relationships, the INTERSECT (set intersection) operation of the R-tree is adopted. Specifically, as Figure 3 and Figure 4 shown, it is necessary to determine whether different types of target vectors A or B are within the range of radius R of the pixel P. For point vectors, the condition is that the point is within the pixel range; for line vectors, it is required that the line feature is completely or partially within the pixel range; for polygon vectors, it is required that the polygon is completely within the pixel range or its spatial range overlaps with the spatial range of the pixel. This problem can be solved by checking the intersection of the circle with the center at pixel P and radius R and any target vector object. However, since the R-tree uses the minimum bounding rectangle to group adjacent objects at a high level and cannot directly support queries for circular regions, the definition in Theorem 1 is further extended to handle distance range join queries. Further, the method proposed in this application also includes: As Figure 5 (a) shown, for the distance range join query of point vectors, set the distance threshold to frame the query region as a circular region with the point vector as the center and radius .
[0028] As Figure 5 (b) shown, for the distance range join query of line segment vectors, set the distance threshold to frame the query region as the union of all circular regions with each point on the line segment vector as the center and radius ; As Figure 5 (c) shown, for the distance range join query of polygon vectors, set the distance threshold The framed query area is the union of all circular areas centered at each point on the polygon vector border with a radius of and the spatial range inside the polygon vector border.
[0029] In one embodiment, to further improve the query efficiency of different types of vector data, when the vector data in the reference dataset and the target dataset are point vectors or line vectors, step 2 of the method proposed in this application further includes: Defining the spatial range represented by the current pixel as a circular area centered at the pixel center with a pixel radius of , and taking the inscribed rectangle and the circumscribed rectangle of the circular area as the InsideBox and the OutsideBox respectively, as shown in Figure 6 (a); where the side length of the InsideBox is , the side length of the OutsideBox is , represents the resolution of the Z-th level of the display screen; Performing an initial query for the target vector in the InsideBox. If the target vector is initially queried, it is determined that the target vector in the InsideBox is completely within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; Otherwise, perform a secondary query for the target vector in the OutsideBox. If the target vector is secondarily queried, further determine whether the distance between the target vector in the OutsideBox and the pixel center is less than . If it is less than, it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; otherwise, the current pixel is regarded as an unqualified pixel; where is the spatial Euclidean distance.
[0030] In one embodiment, when the vector data in the reference dataset and the target dataset are point vectors or line vectors, step 3 of the method proposed in this application further includes: Taking the target vector in the qualified pixel as the query center, constructing a circular area centered at the query center with a radius of the distance threshold , and taking the inscribed rectangle and the circumscribed rectangle of the circular area as the IQueryBox and the OQueryBox respectively, as shown in Figure 6 (b); where the side length of the IQueryBox is , the side length of the OQueryBox is ; Performing an initial query for the reference vector in the IQueryBox. If the reference vector is initially queried, it is determined that the distance between the reference vector in the IQueryBox and the query center is less than the distance threshold , directly output the connection query result of the reference vector in the internal query box and the target vector as the query center as the distance range; Otherwise, perform a secondary query of the reference vector in the external query box. If a reference vector is found in the secondary query, further determine the distance between the reference vector in the external query box and the target vector as the query center Is it less than the distance threshold , if it is less, output the connection query result of at least one reference vector and the target vector as the query center as the distance range; otherwise, output that the connection query result of the distance range is none.
[0031] Specifically, the value of the number n of query centers within qualified pixels is determined according to actual application requirements. Figure 7 shows the influence of setting n to 1, 3, and the ground truth on the query result. Figure 7 The vectors in Figure 7 The blue dots represent the target vectors that have not been queried, the black dots represent the reference vectors, and the red dots represent the target vectors as the query centers. During the connection query of the distance range, for data-intensive query scenarios, only a small number of target vectors as the query centers need to be queried to obtain the display result of the pixel, significantly improving the query efficiency.
[0032] In one embodiment, when the connection query of the distance range involves polygon vectors, two problems need to be considered: First, how to determine whether a pixel is inside a polygon vector; Second, how to determine whether the polygon vector belongs to the reference data set or the target data set, or belongs to both at the same time. To solve this problem, steps 2 and 3 of the method proposed in this application also include: When the reference vector is a point vector or a line segment vector and the target vector is a polygon vector, first evaluate the spatial relationship between the current pixel and any one of the target vectors. If the distance between the boundary feature of any one of the target vectors and the pixel center is less than the pixel radius, or the pixel center is inside any one of the target vectors, it is determined that at least one target vector is within the space range represented by the current pixel, and the current pixel is used as a qualified pixel; Then, determine whether the qualified pixel intersects with any one of the reference vectors under the distance threshold, and output the connection query result of the reference vector that meets the intersection condition and the target vector in the qualified pixel as the distance range. When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is within the space range represented by the current pixel. If the distance between any one of the target vectors and the pixel center is less than , it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; then, it is determined whether the pixel center of the qualified pixel is inside any reference vector or intersects with any reference vector within a distance threshold, and the reference vector containing the pixel center or the reference vector satisfying the intersection condition and the target vector in the qualified pixel are output as the distance range connection query result; where, is the pixel radius, represents the resolution of the Z-th level of the display screen; When both the reference vector and the target vector are polygon vectors, only the reference vector and the target vector that meet the following two constraint conditions are output as the distance range connection query result, including: Constraint condition 1: The pixel center is inside any target vector or the boundary of any target vector is within the spatial range represented by the current pixel; Constraint condition 2: The pixel center is inside any reference vector or intersects with any reference vector within a distance threshold.
[0033] Specifically, the method for determining whether the pixel center is inside a polygon vector is as follows: First, locate the candidate polygon vector that may contain the pixel center according to the border index RtreeMBR of the polygon vector; then, use the ray casting algorithm to determine whether the pixel center is inside the candidate polygon vector. Specifically, draw a query line segment (QuerySegment) parallel to the x-axis from the boundary of the minimum bounding rectangle of the polygon vector to the pixel center position, and use the line segment index RtreeE of the polygon vector to count the number of intersection points between this query line segment and the boundary of the polygon vector; if the number of intersection points is odd, it is determined that the pixel center is inside the polygon vector; if the number of intersection points is even, it is determined that the pixel center is outside the polygon vector. This determination method also applies to polygon vectors with internal rings. To improve the query efficiency, it is necessary to minimize the length of the query line segment as much as possible to accelerate the query process. Specific strategies include: 1) Give priority to selecting polygon vectors with a smaller x-span for spatial inspection; 2) Use the vertical line segment from the pixel to the nearest edge of the minimum bounding rectangle of the polygon vector as the query line segment to reduce the calculation amount.
[0034] Through the above steps, it is possible to effectively process spatial queries involving polygon vectors, ensure accurate determination of the spatial topological relationship between pixels and polygon vectors, and thus support more accurate distance range connection queries.
[0035] Furthermore, to evaluate the performance of the method proposed in this application, the method proposed in this application was tested in an independent environment and compared with current leading spatial databases and GIS (Geographic Information System) software, including QGIS, ArcGIS, and PostgreSQL; in addition, the performance of the method proposed in this application in processing large datasets for distance range join queries (distributed raster join queries) in a cluster environment will also be evaluated, where spatial indexes will be built for all experimental datasets. The experimental datasets are shown in Table 2.
[0036] In the experiment, the method proposed in this application is also called PixelQuery (Pixel Query), and the visualization window resolution of PixelQuery is set to the current standard 1920×1080, and the visual level is 3. The reference datasets used in the experiment , and , as well as the target datasets , and , and the comparison results of the query performance of different methods are as Figure 8 shown, Figure 8 demonstrating the query performance advantage of the PixelQuery algorithm as the dataset size and spatial range expand. The experiment performed distance range join query tasks on datasets of the same type but different sizes and set different spatial join query radii.
[0037] Table 2 Experimental Datasets
[0038] As Figure 8 can be seen, at the same data scale, ArcGIS is superior to QGIS and PostgreSQL in query performance, and its query time increases significantly as the dataset size increases and the data distribution range expands. However, when processing large-scale geographic vector data queries, as the query radius increases, the time consumption of ArcGIS decreases. This is because its query method involves constructing a bounding box through index objects, and the increase in the query radius (RB) leads to an increase in the coverage area of the bounding box and an increase in the number of features included, thus reducing the overall number of queries. Among the four methods, QGI is less sensitive to the increase in the query radius and is more affected by the data size; PostgreSQL performs better when the data volume is small, but its performance is significantly affected by the data size and the query radius. At the scale of tens of millions of data, the calculation times of QGIS and PostgreSQL are much higher than those of ArcGIS and PixelQuery. This is because their query methods rely on spatial indexes to perform nearest neighbor queries between source vector features and adjacent vector features, and as the data scale grows significantly, the number of queries increases rapidly.
[0039] In one embodiment, a distance range join query visualization device is provided, including: A data preprocessing module, configured to divide a spatial vector data set including multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data in a display screen; A pixel and target vector space query module, configured to traverse each pixel in the display screen, query whether a target vector in the target data set is within the spatial range represented by the current pixel, and filter out pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; A target vector and reference vector space query module, configured to query whether the distance between the target vector and a reference vector in the reference data set is less than a preset distance threshold within the spatial range of the qualified pixels, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching on the display value of the qualified pixels and the distance range join query result, and output the visualized distance range join query result.
[0040] For the specific limitations of the distance range join query visualization device, reference can be made to the limitations of the distance range join query visualization method in the above text, which will not be elaborated here. Each module in the above distance range join query visualization device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0041] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a distance range join query visualization method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0042] Those skilled in the art can understand,Figure 9 The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0043] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Step 1, divide the spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data in the display screen; Step 2, traverse each pixel in the display screen, query whether the target vector in the target data set is located within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching between the display value of the qualified pixel and the distance range join query result, and output the visualized distance range join query result.
[0044] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Step 1, divide the spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data in the display screen; Step 2, traverse each pixel in the display screen, query whether the target vector in the target data set is located within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching between the display value of the qualified pixel and the distance range join query result, and output the visualized distance range join query result.
[0045] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0046] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0047] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A distance range connection query visualization method, characterized in that: The method comprises: Step 1, dividing a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and visualizing all the vector data on a display screen; Step 2, traverse each pixel in the display screen, query whether the target vector in the target data set is located within the spatial range represented by the current pixel, and select pixels containing the target vector in the spatial range represented by the current pixel as qualified pixels; Step 3: within the spatial range of the qualified pixel, query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, output the target vector and the reference vector that satisfy the distance threshold constraint as the distance range connection query result, perform style matching on the display value of the qualified pixel and the distance range connection query result, and output a visualized distance range connection query result.
2. The method according to claim 1, characterized in that The vector data includes point vectors, line segment vectors and polygon vectors, and all vector data are stored based on R-tree indexes; The R-tree index of the point vector includes the point coordinates and the ID corresponding to the point; The R-tree index of the line segment vector includes the starting point of the line segment and the ID corresponding to the line segment; The R-tree index of the polygon vector includes a line segment index representing each edge of the polygon vector and a border index representing the minimum circumscribed rectangle of the polygon vector; wherein the line segment index includes the starting point of the line segment, the IP of the inscribed polygon and the ID corresponding to the line segment, and the border index includes the lower left corner coordinates and the upper right corner coordinates of the border.
3. The method according to claim 2, characterized in that The method further comprises: For distance range join queries of point vectors, set the distance threshold The query area is a circle with the point vector as the center and a radius of The circular area of For distance range join queries of line segment vectors, set the distance threshold The query area is a circle with each point on the line vector as the center and a radius of The union of all circular areas of ; For distance range join queries of polygon vectors, set the distance threshold The query area is a circle with each point on the polygon vector border as the center and a radius of The union of all circular areas and the spatial extents inside the polygonal vector bounding box.
4. The method according to claim 3, characterized in that When the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 2 of the method further includes: Define the spatial range represented by the current pixel based on the pixel center is the center of the circle and the pixel radius is The circular area, and the inscribed rectangle and circumscribed rectangle of the circular area are used as the inner box and the outer box respectively; wherein the side length of the inner box is , the side length of the outer box is , Indicates the resolution of the Zth level of the display; Performing an initial search for a target vector in the internal box, if the target vector is found in the initial search, determining that the target vector in the internal box is completely within the spatial range represented by the current pixel, and taking the current pixel as a qualified pixel; Otherwise, a secondary search of the target vector is performed in the external box. If the target vector is found in the secondary search, the distance between the target vector in the external box and the pixel center is further determined. Is it less than , if it is less than, it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; otherwise, the current pixel is regarded as an unqualified pixel; where, is the spatial Euclidean distance.
5. The method according to claim 4, characterized in that When the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 3 of the method further includes: The target vector in the qualified pixel is used as the query center, and a circle with the query center as the center and the radius as the distance threshold is constructed. The circular area is a circle, and the inscribed rectangle and the circumscribed rectangle of the circular area are used as the internal query box and the external query box respectively; wherein the side length of the internal query box is , the side length of the external query box is ; A reference vector is initially queried in the internal query box. If a reference vector is initially queried, the distance between the reference vector in the internal query box and the query center is determined. Less than distance threshold , directly outputting the reference vector in the internal query box and the target vector as the query center as the distance range connection query result; Otherwise, a secondary query of the reference vector is performed in the external query box. If the reference vector is found in the secondary query, the distance between the reference vector in the external query box and the target vector as the query center is further determined. Is it less than the distance threshold? , if it is less than, at least one reference vector and the target vector as the query center are output as the distance range connection query result; otherwise, the output distance range connection query result is None.
6. The method according to claim 3, characterized in that When the vector data in the reference dataset and / or the target dataset is polygonal vector data, step 2 and step 3 of the method further include: When the reference vector is a point vector or a line segment vector, and the target vector is a polygon vector, the spatial relationship between the current pixel and any target vector is first evaluated. If the distance between the boundary feature of any target vector and the pixel center is less than the pixel radius, or the pixel center is located inside any target vector, it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is taken as a qualified pixel; then, it is determined whether the qualified pixel intersects with any reference vector under a distance threshold, and the reference vector that meets the intersection condition and the target vector in the qualified pixel are output as a distance range connection query result; When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is within the spatial range represented by the current pixel. If the distance between any target vector and the pixel center is less than , then it is determined that at least one target vector is located in the spatial range represented by the current pixel, and the current pixel is taken as a qualified pixel; then, it is determined whether the pixel center of the qualified pixel is located inside any reference vector or intersects with any reference vector under the distance threshold, and the reference vector containing the pixel center or the reference vector satisfying the intersection condition and the target vector in the qualified pixel are output as the distance range connection query result; wherein, is the pixel radius, Indicates the resolution of the Zth level of the display; When both the reference vector and the target vector are polygonal vectors, only the reference vector and the target vector that satisfy the following two constraints are output as the distance range connection query results, including: Constraint 1: The pixel center is located inside any target vector or the boundary of any target vector is within the spatial range represented by the current pixel; Constraint 2: The pixel center is inside any reference vector or intersects with any reference vector below the distance threshold.
7. The method according to claim 6, characterized in that Determine whether the pixel center is inside the polygon vector, including: Locate a candidate polygon vector that may contain the pixel center according to the bounding box index of the polygon vector; Draw a query line segment parallel to the x-axis from the minimum bounding rectangle boundary of the polygon vector to the center of the pixel, and use the line segment index of the polygon vector to count the number of intersections between this query line segment and the polygon vector boundary; if the number of intersections is an odd number, the pixel center is determined to be inside the polygon vector; if the number of intersections is an even number, the pixel center is determined to be outside the polygon vector.
8. A distance range connection query visualization device, characterized in that: The device comprises: A data preprocessing module, used for dividing a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and performing visualization processing on all vector data on a display screen; A pixel and target vector space query module is used to traverse each pixel in the display screen, query whether the target vector in the target data set is located within the spatial range represented by the current pixel, and select pixels containing the target vector in the spatial range represented by the current pixel as qualified pixels; The target vector and reference vector spatial query module is used to query whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold within the spatial range of the qualified pixel, output the target vector and the reference vector that meet the distance threshold constraint as the distance range connection query result, and perform style matching on the display value of the qualified pixel and the distance range connection query result, and output a visualized distance range connection query result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Large-scale Bayesian network parallel inference method based on MapReduce
CN103744878A
Map display method, remote sensing map display method, computing equipment and storage medium
CN115375868A
Geographic vector line data visualization method and device and computer equipment
CN115794938A
Method for stable set similarity joins
EP4270210A1