Geospatial object indexing method and device, storage medium, and computer equipment
By dynamically adjusting the R tree storage structure in the geospatial grid map, the problem of traditional R trees degradation in large-scale geospatial data processing is solved, and more efficient indexing and query performance is achieved.
Patent Information
- Application Number
- CN202510220234.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Traditional tree-shaped index structures, such as R-tree, will significantly reduce index performance and query efficiency when processing large-scale geospatial data due to the increase of non-leaf nodes and the overlap of the smallest external rectangles, especially in highly skewed or dynamically changing data environments.
In the geospatial grid map, the geospatial objects corresponding to the smallest external rectangle located in a single grid are stored in the region-specific R tree for each initial region grid, and the objects spanning multiple grids are stored in the region-shared R tree. When the initial area grid is in a dense state, re-mesh until it reaches a sparse state. During querying, parallel query is performed using the region shared R tree and the current latest region-specific R tree of the target region grid.
By reducing the density of the grid and reorganizing the R-tree storage structure, the efficiency and query performance of geospatial object indexes are significantly improved, especially when processing dense or dynamic data, it can effectively avoid index performance degradation.
Smart Images

Figure CN119719115B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for indexing geographic spatial objects, a storage medium, and a computer device. Background Art
[0002] With the rapid development of geographic information systems, efficiently managing and querying large-scale geospatial data has become a crucial task. However, current data indexing methods face many challenges.
[0003] Traditional tree-based index structures, such as R-trees, are widely used for indexing multidimensional spatial data. R-trees use a self-balancing tree data structure to organize data by storing the minimum bounding rectangle (MBR) of spatial objects with multidimensional coordinates. However, with the rapid growth of data volume, R-trees will generate a large number of non-leaf nodes, and the MBRs of these nodes will overlap, which will significantly reduce index performance and query efficiency. Especially when processing highly skewed or dynamically changing data, the performance degradation of R-trees is more obvious. Summary of the invention
[0004] In view of this, the present application provides a method and apparatus for indexing geospatial objects, a storage medium, and a computer device. For each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object spanning the initial regional grid is stored in the regional shared R-tree; when any initial regional grid is in a dense state, the initial regional grid is re-divided until the divided regional grid is in a sparse state; in the current latest geospatial grid map, the target regional grid is determined according to the index box selection area corresponding to the geospatial object index instruction, and the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid are used in parallel to query and return the target geospatial object corresponding to the index box selection area. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0005] According to one aspect of the present application, a geospatial object indexing method is provided, the method comprising:
[0006] Acquire multiple geospatial objects and longitude and latitude information of contour points of each geospatial object, and determine, for any geospatial object in a geospatial grid map, a minimum bounding rectangle of the geospatial object based on the longitude and latitude information of contour points of the geospatial object, wherein the geospatial grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geospatial space based on longitude and latitude;
[0007] For each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object spanning the initial regional grids is stored in the regional shared R-tree;
[0008] When it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided into at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network;
[0009] Receive a geospatial object indexing instruction, determine a target area grid in a current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and use a regional shared R-tree and a current latest area-specific R-tree corresponding to the target area grid in parallel to query and return a target geospatial object corresponding to the index selection area, wherein the geospatial object indexing instruction is triggered when a user performs an index area selection operation in a geospatial grid map.
[0010] According to another aspect of the present application, a geospatial object indexing device is provided, the device comprising:
[0011] A bounding rectangle determination module is used to obtain multiple geographic space objects and the longitude and latitude information of the contour points of each geographic space object, and in a geographic space grid map, for any geographic space object, determine the minimum bounding rectangle of the geographic space object based on the longitude and latitude information of the contour points of the geographic space object, wherein the geographic space grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on the longitude and latitude;
[0012] An object R-tree storage module is used to store, for each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and store the geospatial object across the initial regional grids in the region-shared R-tree;
[0013] A dense grid division module, configured to, when it is determined based on the region-specific R-tree corresponding to any initial region grid that the initial region grid is in a dense state, re-divide the initial region network at at least one level, until it is determined based on the region-specific R-tree corresponding to any level of the divided region network that the region networks at any level are in a sparse state, and update the geographic space grid map based on the re-divided initial region network;
[0014] The R-tree object indexing module is used to receive a geospatial object indexing instruction, determine a target area grid in the current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and use the regional shared R-tree and the current latest area-specific R-tree corresponding to the target area grid in parallel to query and return the target geospatial object corresponding to the index selection area, wherein the geospatial object indexing instruction is triggered when the user performs an index area selection operation in the geospatial grid map.
[0015] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned geospatial object indexing method is implemented.
[0016] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned geospatial object indexing method when executing the program.
[0017] By means of the above technical scheme, the present application provides a method and device for indexing geographic spatial objects, a storage medium, and a computer device. For each initial regional grid, the geographic spatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geographic spatial object spanning the initial regional grid is stored in the regional shared R-tree; when any initial regional grid is in a dense state, the initial regional grid is re-divided until the divided regional grid is in a sparse state; in the current latest geographic spatial grid map, the target regional grid is determined according to the index box selection area corresponding to the geographic spatial object index instruction, and the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid are used in parallel to query and return the target geographic spatial object corresponding to the index box selection area. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1A schematic diagram of a flow chart of a geospatial object indexing method provided in an embodiment of the present application is shown;
[0021] Figure 2 A schematic diagram of a geographic space grid map provided in an embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram showing the association relationship between a geographic space object and a minimum bounding rectangle provided in an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of a regional grid dynamic division process provided by an embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of a flow chart of another geospatial object indexing method provided in an embodiment of the present application is shown;
[0025] Figure 6 A schematic diagram showing the association relationship between a minimum circumscribed rectangle and an initial area grid provided in an embodiment of the present application is shown;
[0026] Figure 7 An R-tree storage address representation diagram provided by an embodiment of the present application is shown;
[0027] Figure 8 A schematic diagram of a flow chart of another geospatial object indexing method provided in an embodiment of the present application is shown;
[0028] Fig. 9 A schematic diagram of the structure of a geospatial object indexing device provided in an embodiment of the present application is shown;
[0029] Fig.10 A schematic structural diagram of another geospatial object indexing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0031] In this embodiment, a geospatial object indexing method is provided. Figure 1 As shown, the method includes:
[0032] Step 101, obtain multiple geospatial objects and longitude and latitude information of contour points of each geospatial object, and in a geospatial grid map, for any geospatial object, determine the minimum enclosing rectangle of the geospatial object based on the longitude and latitude information of the contour points of the geospatial object, wherein the geospatial grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on longitude and latitude.
[0033] For example, when a user needs a remote sensing image in a certain geographic space area, he needs to select the index area in a "map" that contains the distribution of remote sensing images around the world. The required remote sensing image can then be obtained. Since the number of remote sensing images in land areas is larger and denser than that in ocean areas, the distribution is uneven. If the traditional grid indexing method is used, that is, by dividing the entire geographic space into regular grid cells to index the geospatial objects, when the amount of data in the grid cells increases significantly, the indexing efficiency will be low.
[0034] In the above embodiment of the present application, multiple geospatial objects and the longitude and latitude information of the contour points of each geospatial object are obtained. In the geospatial grid map, for any geospatial object, the minimum bounding rectangle of the geospatial object is determined based on the longitude and latitude information of the contour points of the geospatial object. The minimum bounding rectangle is equivalent to the "index unit" of the geospatial object. The geospatial grid map, for example, Figure 2 As shown, Figure 2 It contains multiple initial regional grids (region codes are 00, 01, 02, 03), which are obtained by dividing the geographic space based on longitude and latitude. Figure 2 In , the “actual shape” of each geospatial object can be irregular, for example Figure 3 As shown, at the same time, for the regional coding of each initial regional grid, the Hilbert coding method can be used to divide the space. The above division method can also be replaced by various space filling curve division methods such as Peano curve, Dragon curve, Gosper curve, and quadtree recursive subdivision method to divide the space.
[0035] Step 102, for each initial regional grid, stores the geospatial object corresponding to the minimum circumscribed rectangle within a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and stores the geospatial object spanning the initial regional grids in the region-shared R-tree.
[0036] Next, for each initial regional grid, the geospatial object located in a single initial regional grid, that is, the basic spatial information of the geospatial object (including the minimum bounding rectangle and the id set for the geospatial object) can be stored in the region-specific R-tree corresponding to the initial regional grid, and the basic spatial information of the remaining geospatial objects spanning multiple grid areas is stored in the regional shared R-tree. Specifically, for each initial regional grid, the geospatial object corresponding to the minimum bounding rectangle located in a single initial regional grid is stored in the region-specific R-tree corresponding to the initial regional grid, for example Figure 2 For the geospatial objects in the initial regional grid 02, the aforementioned geospatial objects are correspondingly stored in the regional exclusive R-tree of the initial regional grid 02, and then the remaining geospatial objects, namely the "cross-grid" geospatial objects, are stored together in the regional shared R-tree.
[0037] Step 103: When it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided into at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network.
[0038] Next, when the initial regional grid is determined to be in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided at least one level until any level of regional network is determined to be in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network. The dynamic division process of the regional grid is as follows: Figure 4 shown.
[0039] Step 104, receiving a geospatial object indexing instruction, determining a target area grid in the current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and querying and returning a target geospatial object corresponding to the index selection area by using a regional shared R-tree and a current latest area-specific R-tree corresponding to the target area grid in parallel, wherein the geospatial object indexing instruction is triggered when a user performs an index area selection operation in the geospatial grid map.
[0040] Next, receive the geospatial object indexing instruction, determine the target area grid in the current latest geospatial grid map according to the index box selection area corresponding to the geospatial object indexing instruction, and use the regional shared R tree and the current latest area-specific R tree corresponding to the target area grid in parallel to query and return the target geospatial object corresponding to the index box selection area.
[0041] Therefore, when the distribution of geospatial objects is uneven, resulting in low indexing efficiency of a single grid structure in densely populated areas, and when a tree-based index structure (such as an R-tree) generates a large number of overlaps of the minimum bounding rectangles of non-leaf nodes when the number of objects increases rapidly, which significantly reduces indexing performance and query efficiency, a dynamic multi-level grid R-tree combined indexing scheme can effectively address the problem of reduced indexing efficiency in dense areas. At the same time, it can also flexibly adapt to the use scenarios of uneven object distribution, that is, by using a geospatial index structure that mixes grids and R-trees, when objects in the regional grid are sparse, the R-tree index structure is used to handle the problem of uneven object distribution, and when objects in the regional grid are dense, the next level of finer-grained regional grids are used for processing, thereby avoiding the problem of excessive overlap of minimum bounding rectangles in the R-tree. In particular, the R-tree can be replaced by various R-tree variants, such as R*-tree, R+-tree and other object-oriented dynamic index management methods.
[0042] By applying the technical solution of this embodiment, the geospatial object corresponding to the minimum circumscribed rectangle located in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object spanning the initial regional grid is stored in the regional shared R-tree; when any initial regional grid is in a dense state, the initial regional grid is re-divided until the divided regional grid is in a sparse state; in the current latest geospatial grid map, the target regional grid is determined according to the index box selection area corresponding to the geospatial object index instruction, and the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid are used in parallel to query and return the target geospatial object corresponding to the index box selection area. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0043] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another geospatial object indexing method is provided, such as Figure 5 As shown, the method includes:
[0044] Step 201, obtain multiple geospatial objects and longitude and latitude information of contour points of each geospatial object, and in a geospatial grid map, for any geospatial object, determine the minimum bounding rectangle of the geospatial object based on the longitude and latitude information of the contour points of the geospatial object, wherein the geospatial grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on longitude and latitude.
[0045] In the above embodiment of the present application, multiple geospatial objects and the longitude and latitude information of the contour points of each geospatial object are obtained. In the geospatial grid map, for any geospatial object, the minimum enclosing rectangle of the geospatial object is determined based on the longitude and latitude information of the contour points of the geospatial object, so as to prepare for subsequent dynamic grid division.
[0046] Step 202, for each initial regional grid, stores the geospatial object corresponding to the minimum circumscribed rectangle within a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and stores the geospatial objects spanning the initial regional grids in the region-shared R-tree.
[0047] Next, for each initial regional grid, the geospatial object corresponding to the minimum bounding rectangle within a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial objects spanning the initial regional grids are stored in the regional shared R-tree, such as Figure 6 As shown, Figure 6 The first minimum bounding rectangle on the left is located in the initial regional grid 03, so the geospatial object corresponding to the first minimum bounding rectangle is stored in the regional exclusive R-tree corresponding to the initial regional grid 03. The second minimum bounding rectangle on the right spans 4 initial regional grids, so the geospatial object corresponding to the second minimum bounding rectangle is stored in the regional shared R-tree, which is specifically used to store the geospatial objects corresponding to the minimum bounding rectangle that "spans the grid". Specifically, when judging whether the minimum bounding rectangle "crosses the grid", the division level of the current regional grid can be determined first, for example, the regional grid determined from the 1-dimensional Hilbert curve is defined as the first level, and then the regional codes corresponding to the coordinate points of the four vertices of the minimum bounding rectangle are calculated based on the current level. If the prefixes of the regional codes of all vertices are inconsistent with the regional code lengths of each regional grid in the current level, it means that the aforementioned minimum bounding rectangle spans multiple regional grids.
[0048] Step 203: for any initial regional grid, determine the grid state of the initial regional grid based on the region-specific R-tree corresponding to the initial regional grid, wherein the grid state includes a dense state and a sparse state.
[0049] Step 204: if the depth of the region-specific R-tree corresponding to the initial region grid is greater than or equal to a preset depth threshold, the initial region grid is judged to be in a dense state; if the depth of the region-specific R-tree corresponding to the initial region grid is less than the preset depth threshold, the initial region grid is judged to be in a sparse state.
[0050] As the number of geospatial objects increases, the coarse-grained grid is gradually refined. HEAD (head level pointer) can be introduced to mark the level of the regional grid in the current hybrid index (regional grid and R-tree hybrid structure index). The initial regional grid is the starting level, that is, the first level. When all regional grids in the first level no longer meet the R-tree storage (that is, the regional grids are all in a dense state), it means that the current number of geospatial objects is sufficient and the first-level regional grid cannot filter geospatial objects well. At this time, HEAD will automatically point to the next level (second level), and subsequent geospatial object insertion and search will start from the second-level regional grid. Specifically, for any initial regional grid, the grid state of the initial regional grid is determined based on the regional-specific R-tree corresponding to the initial regional grid. If the depth of the regional-specific R-tree corresponding to the initial regional grid is greater than or equal to the preset depth threshold, the initial regional grid is judged to be in a dense state. If the depth of the regional-specific R-tree corresponding to the initial regional grid is less than the preset depth threshold, the initial regional grid is judged to be in a sparse state. The preset R-tree depth threshold can be set to 3. In particular, the product of the number of geospatial objects recorded in the region-specific R-tree corresponding to the regional grid and the default minimum enclosing rectangle size of a single geospatial object (the default minimum enclosing rectangle size can be set to 5°) can be compared with the current initial regional grid width (regional grid longitude and latitude span) to determine whether the regional grid is in a dense state. When the aforementioned product is greater than the current regional grid width, the regional grid is considered to be in a dense state.
[0051] Step 205: When it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided into at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network.
[0052] Next, when the initial regional grid is judged to be in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional grid is re-divided, that is, the initial regional network is re-divided at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network. By reducing the grid density and then using the R-tree for indexing, the indexing efficiency can be improved.
[0053] Step 206, receiving a geospatial object index instruction, and determining a target area grid having an overlapping portion with the index box selection area based on the index box selection area corresponding to the geospatial object index instruction in the current latest geospatial grid map, wherein each initial area grid corresponds to an area code, and starting with the initial area grid, each level of area grids shares the area code of the directly superior area grid as a prefix, and the area grids in the same level correspond to different suffixes.
[0054] Step 207, in the R-tree address storage table, for any target area grid, based on the area code of the target area grid, query the current latest target area exclusive R-tree address corresponding to the target area grid, and determine the current latest target area exclusive R-tree corresponding to the target area grid based on the current latest target area exclusive R-tree address, wherein the R-tree address storage table stores the area codes of each latest area grid in the current latest geographic space grid map, and the current latest target area exclusive R-tree address corresponding to each area code, and multiple current latest target area exclusive R-tree addresses corresponding to the same area code are stored under the same area code.
[0055] Step 208 , query and return the target geographic spatial object corresponding to the index frame selected area by using the regional shared R-tree and the current latest region-specific R-tree corresponding to the target regional grid in parallel.
[0056] Next, receive the geospatial object index instruction, in the current latest geospatial grid map, based on the index box selection area corresponding to the geospatial object index instruction, determine the target area grid that overlaps with the index box selection area, in the R-tree address storage table, for any target area grid, based on the area code of the target area grid, query the current latest target area exclusive R-tree address corresponding to the target area grid, determine the current latest target area exclusive R-tree corresponding to the target area grid based on the current latest target area exclusive R-tree address, and use the regional shared R-tree and the current latest area exclusive R-tree corresponding to the target area grid in parallel to query and return the target geospatial object corresponding to the index box selection area. R-tree address storage table, for example Figure 7As shown in the figure, the "inverted index" method is adopted, with the regional code as the primary key, and the identification field DataPtr (data type identifier) is used to mark the current regional grid storage object index method as R-tree, or it is dense enough to use the next level grid to organize the index. For example, if the data type identifier is displayed as "next level", it proves that the regional grid is in a dense state and has been divided into the next level of regional grids. In particular, in the DataValue field (i.e., the regional-specific R-tree address), the serialized content of the R-tree object can be stored (it can also be a pointer to the R-tree) or the regional code prefix of the next level of regional grid. For the R-tree address storage table, if the inverted index method is not used, when searching for the regional-specific R-tree of a regional grid, since the primary key is the regional-specific R-tree address, it is necessary to query one by one, and the query efficiency is slow. When the inverted index method is used, since the regional code is used as the primary key, at this time, if the regional-specific R-tree of the 00 regional grid needs to be searched, only one query operation is required to quickly locate it. At the same time, the regional-specific R-tree query of multiple regional grids can be processed in parallel, which is more efficient.
[0057] By applying the technical solution of this embodiment, the minimum bounding rectangle of the geographic spatial object is determined, and for each initial regional grid, the geographic spatial object corresponding to the minimum bounding rectangle located in a single initial regional grid is stored in a regional-specific R-tree, and the geographic spatial object that crosses the initial regional grid is stored in a regional shared R-tree. By comparing the depth of the regional grid's regional-specific R-tree with a preset depth threshold, it is determined whether the regional grid is in a dense state, and the regional grid in a dense state is divided to obtain a new regional-specific R-tree, receive a geographic spatial object index instruction, determine the target regional grid that has an overlapping part with the indexed frame selection area, obtain the current latest target regional-specific R-tree corresponding to the target regional grid in the R-tree address storage table, and use the regional shared R-tree and the current latest regional-specific R-tree corresponding to the target regional grid in parallel to query and return the target geographic spatial object corresponding to the indexed frame selection area. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0058] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another geospatial object indexing method is provided, such as Figure 8 As shown, the method includes:
[0059] Step 301, obtaining multiple geospatial objects and the longitude and latitude information of the contour points of each geospatial object, wherein the types of the geospatial objects include vector data and raster images. When the type of the geospatial object is a raster image, the longitude and latitude information of the contour points of the geospatial object includes the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates on the raster image corresponding to the geospatial object.
[0060] In the above-mentioned embodiment of the present application, multiple geographic spatial objects and the longitude and latitude information of the contour points of each geographic spatial object are obtained to prepare for subsequent object storage.
[0061] Step 302, for any type of vector data geospatial object, traverse the longitude and latitude information of the contour points on the boundary range of the geospatial object to obtain the maximum longitude point coordinates, minimum longitude point coordinates, maximum latitude point coordinates and minimum latitude point coordinates of the geospatial object.
[0062] Step 303, in the geospatial grid map, based on the maximum longitude point coordinates, minimum longitude point coordinates, maximum latitude point coordinates and minimum latitude point coordinates corresponding to each geospatial object, determine the minimum enclosing rectangle of each geospatial object, wherein the geospatial grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geospatial space based on longitude and latitude.
[0063] Next, since the types of acquired geographic spatial objects include vector data and raster images, for vector data, the longitude and latitude information of the contour points on the boundary range of the geographic spatial object can be directly traversed to obtain the maximum longitude point coordinates, minimum longitude point coordinates, maximum latitude point coordinates and minimum latitude point coordinates of the geographic spatial object, so as to determine the minimum enclosing rectangle of each geographic spatial object based on the maximum longitude point coordinates, minimum longitude point coordinates, maximum latitude point coordinates and minimum latitude point coordinates corresponding to each type of geographic spatial object.
[0064] Step 304, for each initial regional grid, stores the geospatial object corresponding to the minimum bounding rectangle within a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and stores the geospatial objects spanning the initial regional grids in the region-shared R-tree.
[0065] Step 305: When it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided into at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network.
[0066] Next, for each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object spanning the initial regional grid is stored in the regional shared R-tree. When the initial regional grid is judged to be in a dense state based on the regional exclusive R-tree corresponding to any initial regional grid, the initial regional grid is re-divided until it is determined that any level of regional network is in a sparse state based on the regional exclusive R-tree corresponding to any level of regional network divided, and the geospatial grid map is updated based on the re-divided initial regional network. By reducing the density of the grid, the object is stored in the R-tree, that is, the grid is dynamically divided in a hierarchical manner, which can reduce the storage depth of the R-tree and improve the index efficiency of the R-tree. Since the geospatial objects in the cross-grid part will always be in a cross-grid state as the grid is continuously graded, the geospatial objects spanning the grid are stored separately, that is, stored in the regional shared R-tree.
[0067] Step 306, receiving a geospatial object index instruction, and determining a target area grid in the current latest geospatial grid map according to an index selection area corresponding to the geospatial object index instruction, wherein the geospatial object index instruction is triggered when the user performs an index area selection operation in the geospatial grid map.
[0068] Step 307: determine a target R-tree set based on the regional shared R-tree and the current latest region-specific R-tree corresponding to the target regional grid.
[0069] Step 308, for any target R tree in the target R tree set, starting with the root node of the target R tree, perform a recursive search on the nodes of each recursive branch layer in turn according to the recursive order of the target R tree, wherein the target R tree includes multiple recursive branch layers, each recursive branch layer includes multiple nodes, and each node stores the minimum enclosing rectangle of multiple geographic spatial objects.
[0070] Step 309, searching for the recursive branch layer where the minimum bounding rectangle containing the overlapping part with the index frame selection area is located, based on the minimum bounding rectangle in the index frame selection area in the recursive branch layer, obtaining the candidate geographic spatial objects of the target R tree, and returning the candidate geographic spatial objects of each target R tree.
[0071] Step 310, in the geospatial grid map, determine the longitude and latitude information of the edge points of the index box selection area of the index box selection area, and among the candidate geospatial objects, determine and return the target geospatial object in the index box selection area based on the longitude and latitude information of the contour points of each candidate geospatial object and the longitude and latitude information of the edge points of the index box selection area.
[0072] Next, a geospatial object index instruction is received, and in the current latest geospatial grid map, the target area grid is determined according to the index selection area corresponding to the geospatial object index instruction, and the target R-tree set is determined based on the regional shared R-tree and the current latest area-specific R-tree corresponding to the target area grid. For any target R-tree, starting with the root node of the target R-tree, a recursive search is performed on the nodes of each recursive branch layer in turn according to the recursive order of the target R-tree, and it is determined whether the minimum bounding rectangle stored in each node in the recursive branch layer overlaps with the index selection area. Only the recursive branch layer where the minimum bounding rectangle is judged to contain an overlapping part with the index selection area is searched, which can improve the search efficiency, and finally obtain the candidate geospatial object corresponding to the minimum bounding rectangle in the index selection area in the aforementioned recursive branch layer, and return the candidate geospatial object of each target R tree.
[0073] In particular, after using the R-tree to return the candidate geospatial objects first, for any candidate geospatial object, a secondary screening is performed based on the longitude and latitude information of the contour points of each candidate geospatial object and the longitude and latitude information of the edge points of the index frame selection area, that is, a secondary fine judgment is performed again based on the contour edge of each selected geospatial object and the index frame selection area, and the target geospatial object is obtained after removing the candidate geospatial objects with overlapping parts. By first using the R-tree to roughly retrieve the candidate geospatial objects and then finely screening each candidate geospatial object, the index accuracy can be further improved.
[0074] By applying the technical solution of this embodiment, for different types of geospatial objects, the minimum bounding rectangle is determined respectively, and the geospatial object corresponding to the minimum bounding rectangle located in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object crossing the initial regional grid is stored in the regional shared R-tree. When the initial regional grid is in a dense state, the initial regional grid is re-divided until each divided regional grid is in a sparse state, and the target regional grid is determined according to the index box selection area corresponding to the geospatial object index instruction, and the target R-tree set is determined based on the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid. Starting with the root node of any target R tree, according to the recursive order of the target R tree, a recursive search is performed on the nodes of each recursive branch layer in turn to obtain the candidate geospatial objects of each target R tree. For any candidate geospatial object, based on the longitude and latitude information of the contour points of the candidate geospatial object and the longitude and latitude of the regional edge points of the index box selection area, the target geospatial object in the index box selection area is determined and returned. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0075] Further, as Figure 1The specific implementation of the method, the embodiment of the present application provides a geospatial object indexing device, such as Fig. 9 As shown, the device comprises:
[0076] The bounding rectangle determination module 401 is used to obtain multiple geographic space objects and the longitude and latitude information of the contour points of each geographic space object, and in the geographic space grid map, for any geographic space object, determine the minimum bounding rectangle of the geographic space object based on the longitude and latitude information of the contour points of the geographic space object, wherein the geographic space grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on the longitude and latitude;
[0077] The object R-tree storage module 402 is used to store, for each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and store the geospatial object across the initial regional grids in the region-shared R-tree;
[0078] The dense grid division module 403 is used for re-dividing the initial regional network at least one level when it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and updating the geographic space grid map based on the re-divided initial regional network;
[0079] The R-tree object indexing module 404 is used to receive a geospatial object indexing instruction, determine a target area grid in the current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and use the regional shared R-tree and the current latest area-specific R-tree corresponding to the target area grid in parallel to query and return the target geospatial object corresponding to the index selection area, wherein the geospatial object indexing instruction is triggered when the user performs an index area selection operation in the geospatial grid map.
[0080] Optionally, the dense grid division module 403 is further used to:
[0081] For any initial regional grid, determine the grid state of the initial regional grid based on the region-specific R-tree corresponding to the initial regional grid, wherein the grid state includes a dense state and a sparse state;
[0082] If the depth of the region-specific R-tree corresponding to the initial region grid is greater than or equal to a preset depth threshold, the initial region grid is determined to be in a dense state;
[0083] If the depth of the region-specific R-tree corresponding to the initial region grid is less than a preset depth threshold, the initial region grid is determined to be in a sparse state.
[0084] Optionally, the R-tree object index module 404 is further used to:
[0085] Based on the index frame selection area corresponding to the geospatial object index instruction, a target area grid having an overlapping portion with the index frame selection area is determined.
[0086] Optionally, each initial regional grid corresponds to a regional code, and starting from the initial regional grid, each level of regional grids shares the regional code of the directly superior regional grid as a prefix, and regional grids in the same level correspond to different suffixes. The R-tree object index module 404 is further used to:
[0087] In the R-tree address storage table, for any target area grid, based on the area code of the target area grid, the current latest target area exclusive R-tree address corresponding to the target area grid is queried, and based on the current latest target area exclusive R-tree address, the current latest target area exclusive R-tree corresponding to the target area grid is determined, wherein the R-tree address storage table stores the area codes of each latest area grid in the current latest geographic space grid map, and the current latest target area exclusive R-tree address corresponding to each area code, and multiple current latest target area exclusive R-tree addresses corresponding to the same area code are stored under the same area code.
[0088] Optionally, the R-tree object index module 404 is further used to:
[0089] The region-shared R-tree and the current latest region-specific R-tree corresponding to the target region grid are used in parallel to query and return candidate geographic spatial objects corresponding to the index-selected region.
[0090] Optionally, the R-tree object index module 404 is further used to:
[0091] Determine the target R-tree set based on the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid;
[0092] For any target R tree in the target R tree set, starting with the root node of the target R tree, and in accordance with the recursive order of the target R tree, performing a recursive search on the nodes of each recursive branch layer in turn, wherein the target R tree includes a plurality of recursive branch layers, each recursive branch layer includes a plurality of nodes, each node stores a minimum bounding rectangle of a plurality of geographic spatial objects;
[0093] Search for the recursive branch layer where the minimum bounding rectangle that contains the overlapping part with the index frame selection area is located, and based on the minimum bounding rectangle in the index frame selection area in the recursive branch layer, obtain the candidate geographic spatial objects of the target R tree, and return the candidate geographic spatial objects of each target R tree.
[0094] Optionally, the type of the geospatial object includes vector data and raster image. When the type of the geospatial object is a raster image, the longitude and latitude information of the contour points of the geospatial object includes the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates on the raster image corresponding to the geospatial object. The bounding rectangle determination module 401 is further used to:
[0095] For any type of geographic space object of vector data, traverse the longitude and latitude information of the contour points on the boundary range of the geographic space object to obtain the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates of the geographic space object;
[0096] In the geospatial grid map, the minimum bounding rectangle of each geospatial object is determined based on the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates corresponding to each geospatial object.
[0097] Furthermore, the present application embodiment provides another geospatial object indexing device, such as Fig.10 As shown, the device comprises:
[0098] The bounding rectangle determination module 401 is used to obtain multiple geographic space objects and the longitude and latitude information of the contour points of each geographic space object, and in the geographic space grid map, for any geographic space object, determine the minimum bounding rectangle of the geographic space object based on the longitude and latitude information of the contour points of the geographic space object, wherein the geographic space grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on the longitude and latitude;
[0099] The object R-tree storage module 402 is used to store, for each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and store the geospatial object across the initial regional grids in the region-shared R-tree;
[0100] The dense grid division module 403 is used for re-dividing the initial regional network at least one level when it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and updating the geographic space grid map based on the re-divided initial regional network;
[0101] The R-tree object indexing module 404 is used to receive a geospatial object indexing instruction, determine a target area grid according to an index box selection area corresponding to the geospatial object indexing instruction in the current latest geospatial grid map, and query and return a target geospatial object corresponding to the index box selection area by using a regional shared R-tree and a current latest area-specific R-tree corresponding to the target area grid in parallel, wherein the geospatial object indexing instruction is triggered when a user performs an index area box selection operation in the geospatial grid map;
[0102] The object fine screening module 405 is used to determine the longitude and latitude information of the edge points of the index frame selection area in the geospatial grid map, and among the candidate geospatial objects, determine and return the target geospatial object in the index frame selection area based on the longitude and latitude information of the contour points of each candidate geospatial object and the longitude and latitude information of the edge points of the index frame selection area.
[0103] Optionally, the dense grid division module 403 is further used to:
[0104] For any initial regional grid, determine the grid state of the initial regional grid based on the region-specific R-tree corresponding to the initial regional grid, wherein the grid state includes a dense state and a sparse state;
[0105] If the depth of the region-specific R-tree corresponding to the initial region grid is greater than or equal to a preset depth threshold, the initial region grid is determined to be in a dense state;
[0106] If the depth of the region-specific R-tree corresponding to the initial region grid is less than a preset depth threshold, the initial region grid is determined to be in a sparse state.
[0107] Optionally, the R-tree object index module 404 is further used to:
[0108] Based on the index frame selection area corresponding to the geospatial object index instruction, a target area grid having an overlapping portion with the index frame selection area is determined.
[0109] Optionally, each initial regional grid corresponds to a regional code, and starting from the initial regional grid, each level of regional grids shares the regional code of the directly superior regional grid as a prefix, and regional grids in the same level correspond to different suffixes. The R-tree object index module 404 is further used to:
[0110] In the R-tree address storage table, for any target area grid, based on the area code of the target area grid, the current latest target area exclusive R-tree address corresponding to the target area grid is queried, and based on the current latest target area exclusive R-tree address, the current latest target area exclusive R-tree corresponding to the target area grid is determined, wherein the R-tree address storage table stores the area codes of each latest area grid in the current latest geographic space grid map, and the current latest target area exclusive R-tree address corresponding to each area code, and multiple current latest target area exclusive R-tree addresses corresponding to the same area code are stored under the same area code.
[0111] Optionally, the R-tree object index module 404 is further used to:
[0112] The region-shared R-tree and the current latest region-specific R-tree corresponding to the target region grid are used in parallel to query and return candidate geographic spatial objects corresponding to the index-selected region.
[0113] Optionally, the R-tree object index module 404 is further used to:
[0114] Determine the target R-tree set based on the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid;
[0115] For any target R tree in the target R tree set, starting with the root node of the target R tree, and in accordance with the recursive order of the target R tree, performing a recursive search on the nodes of each recursive branch layer in turn, wherein the target R tree includes a plurality of recursive branch layers, each recursive branch layer includes a plurality of nodes, each node stores a minimum bounding rectangle of a plurality of geographic spatial objects;
[0116] Search for the recursive branch layer where the minimum bounding rectangle that contains the overlapping part with the index frame selection area is located, and based on the minimum bounding rectangle in the index frame selection area in the recursive branch layer, obtain the candidate geographic spatial objects of the target R tree, and return the candidate geographic spatial objects of each target R tree.
[0117] Optionally, the type of the geospatial object includes vector data and raster image. When the type of the geospatial object is a raster image, the longitude and latitude information of the contour points of the geospatial object includes the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates on the raster image corresponding to the geospatial object. The bounding rectangle determination module 401 is further used to:
[0118] For any type of geographic space object of vector data, traverse the longitude and latitude information of the contour points on the boundary range of the geographic space object to obtain the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates of the geographic space object;
[0119] In the geospatial grid map, the minimum bounding rectangle of each geospatial object is determined based on the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates corresponding to each geospatial object.
[0120] It should be noted that for other corresponding descriptions of the functional units involved in the geospatial object indexing device provided in the embodiment of the present application, reference can be made to Figure 1 , Figure 5 and Figure 8 The corresponding description in the method will not be repeated here.
[0121] Based on the above Figure 1 , Figure 5 and Figure 8 The method shown in the embodiment of the present application is accordingly provided with a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 , Figure 5 and Figure 8 The geospatial object indexing method shown.
[0122] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0123] Based on the above Figure 1 , Figure 5 and Figure 8 The method shown, and Fig. 9 and Fig.10In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 , Figure 5 and Figure 8 The geospatial object indexing method shown.
[0124] Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
[0125] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0126] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or by hardware implementation, for each initial regional grid, the geographic spatial object corresponding to the minimum circumscribed rectangle located in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geographic spatial object spanning the initial regional grid is stored in the regional shared R-tree; when any initial regional grid is in a dense state, the initial regional grid is re-divided until the divided regional grid is in a sparse state; in the current latest geographic spatial grid map, the target regional grid is determined according to the index box selection area corresponding to the geospatial object index instruction, and the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid are used in parallel to query and return the target geographic spatial object corresponding to the index box selection area. By reducing the density of the grid and then using the R-tree to store objects, the efficiency of subsequent object indexing can be improved.
[0128] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0129] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A geospatial object indexing method, characterized in that: The method comprises: Acquire multiple geospatial objects and longitude and latitude information of contour points of each geospatial object, and determine, for any geospatial object in a geospatial grid map, a minimum bounding rectangle of the geospatial object based on the longitude and latitude information of contour points of the geospatial object, wherein the geospatial grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geospatial space based on longitude and latitude; For each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid is stored in the regional exclusive R-tree corresponding to the initial regional grid, and the geospatial object spanning the initial regional grids is stored in the regional shared R-tree; When it is determined that the initial regional grid is in a dense state based on the region-specific R-tree corresponding to any initial regional grid, the initial regional network is re-divided into at least one level until it is determined that any level of regional network is in a sparse state based on the region-specific R-tree corresponding to any level of regional network divided, and the geographic space grid map is updated based on the re-divided initial regional network; Receive a geospatial object indexing instruction, determine a target area grid in a current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and use a regional shared R-tree and a current latest area-specific R-tree corresponding to the target area grid in parallel to query and return a target geospatial object corresponding to the index selection area, wherein the geospatial object indexing instruction is triggered when a user performs an index area selection operation in a geospatial grid map.
2. The method according to claim 1, characterized in that When it is determined based on the region-specific R-tree corresponding to any initial region grid that the initial region grid is in a dense state, before re-dividing the initial region network at least one level, the method further includes: For any initial regional grid, determine the grid state of the initial regional grid based on the region-specific R-tree corresponding to the initial regional grid, wherein the grid state includes a dense state and a sparse state; If the depth of the region-specific R-tree corresponding to the initial region grid is greater than or equal to a preset depth threshold, the initial region grid is determined to be in a dense state; If the depth of the region-specific R-tree corresponding to the initial region grid is less than a preset depth threshold, the initial region grid is determined to be in a sparse state.
3. The method according to claim 1, characterized in that The step of selecting an index box area corresponding to the geospatial object index instruction and determining a target initial area grid includes: Based on the index frame selection area corresponding to the geospatial object index instruction, a target area grid having an overlapping portion with the index frame selection area is determined.
4. The method according to claim 1, characterized in that: Each initial regional grid corresponds to a regional code, and starting with the initial regional grid, each level of regional grids shares the regional code of the directly superior regional grid as a prefix, and regional grids in the same level correspond to different suffixes; before the parallel use of the regional shared R tree and the current latest target region-specific R tree corresponding to the target regional grid to query and return the target geographic space object corresponding to the index box selection area, the method also includes: In the R-tree address storage table, for any target area grid, based on the area code of the target area grid, the current latest target area exclusive R-tree address corresponding to the target area grid is queried, and based on the current latest target area exclusive R-tree address, the current latest target area exclusive R-tree corresponding to the target area grid is determined, wherein the R-tree address storage table stores the area codes of each latest area grid in the current latest geographic space grid map, and the current latest target area exclusive R-tree address corresponding to each area code, and multiple current latest target area exclusive R-tree addresses corresponding to the same area code are stored under the same area code.
5. The method according to claim 1, characterized in that The method of using the regional shared R-tree and the current latest region-specific R-tree corresponding to the target regional grid in parallel to query and return the target geographic spatial object corresponding to the index frame selected region includes: Using the regional shared R-tree and the latest regional exclusive R-tree corresponding to the target regional grid in parallel, querying and returning the candidate geospatial objects corresponding to the index frame selected area; In the geospatial grid map, the longitude and latitude information of the edge points of the index frame selection area of the index frame selection area is determined, and among the candidate geospatial objects, based on the longitude and latitude information of the contour points of each candidate geospatial object and the longitude and latitude information of the edge points of the index frame selection area, the target geospatial object within the index frame selection area is determined and returned.
6. The method according to claim 5, characterized in that The method of using the regional shared R-tree and the current latest region-specific R-tree corresponding to the target region grid in parallel to query and return the candidate geospatial object corresponding to the index frame selected region includes: Determine the target R-tree set based on the regional shared R-tree and the current latest regional exclusive R-tree corresponding to the target regional grid; For any target R tree in the target R tree set, starting with the root node of the target R tree, and in accordance with the recursive order of the target R tree, performing a recursive search on the nodes of each recursive branch layer in turn, wherein the target R tree includes a plurality of recursive branch layers, each recursive branch layer includes a plurality of nodes, each node stores a minimum bounding rectangle of a plurality of geographic spatial objects; Search for the recursive branch layer where the minimum bounding rectangle that contains the overlapping part with the index frame selection area is located, and based on the minimum bounding rectangle in the index frame selection area in the recursive branch layer, obtain the candidate geographic spatial objects of the target R tree, and return the candidate geographic spatial objects of each target R tree.
7. The method according to any one of claims 1 to 6, characterized in that The types of the geospatial objects include vector data and raster images. When the type of the geospatial object is a raster image, the longitude and latitude information of the contour points of the geospatial object includes the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates on the raster image corresponding to the geospatial object. In the geospatial grid map, for any geospatial object, based on the longitude and latitude information of the contour points of the geospatial object, determining the minimum circumscribed rectangle of the geospatial object includes: For any type of geographic space object of vector data, traverse the longitude and latitude information of the contour points on the boundary range of the geographic space object to obtain the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates of the geographic space object; In the geospatial grid map, the minimum bounding rectangle of each geospatial object is determined based on the maximum longitude point coordinates, the minimum longitude point coordinates, the maximum latitude point coordinates and the minimum latitude point coordinates corresponding to each geospatial object.
8. A geospatial object indexing device, characterized in that: The device comprises: A bounding rectangle determination module is used to obtain multiple geographic space objects and the longitude and latitude information of the contour points of each geographic space object, and in a geographic space grid map, for any geographic space object, determine the minimum bounding rectangle of the geographic space object based on the longitude and latitude information of the contour points of the geographic space object, wherein the geographic space grid map includes multiple initial area grids, and the initial area grids are obtained by dividing the geographic space based on the longitude and latitude; An object R-tree storage module is used to store, for each initial regional grid, the geospatial object corresponding to the minimum circumscribed rectangle in a single initial regional grid in the region-specific R-tree corresponding to the initial regional grid, and store the geospatial object across the initial regional grids in the region-shared R-tree; A dense grid division module, configured to, when it is determined based on the region-specific R-tree corresponding to any initial region grid that the initial region grid is in a dense state, re-divide the initial region network at at least one level, until it is determined based on the region-specific R-tree corresponding to any level of the divided region network that the region networks at any level are in a sparse state, and update the geographic space grid map based on the re-divided initial region network; The R-tree object indexing module is used to receive a geospatial object indexing instruction, determine a target area grid in the current latest geospatial grid map according to an index selection area corresponding to the geospatial object indexing instruction, and use the regional shared R-tree and the current latest area-specific R-tree corresponding to the target area grid in parallel to query and return the target geospatial object corresponding to the index selection area, wherein the geospatial object indexing instruction is triggered when the user performs an index area selection operation in the geospatial grid map.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for geospatial object indexing according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method for geospatial object indexing according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Three-dimensional adaptive grid R + tree hybrid index construction, maintenance and query method
CN113901156A
Mechanism and apparatus of spatial encoding enabled multi-scale context join
US20180032597A1