GIS Grid Index algorithm

Source: Internet
Author: User
GIS Grid index algorithm

In the above several articles, simply introduced the GIS system in the grid index, this article will simply introduce the GIS grid index algorithm step.

(1) Create: A grid scale is computed by the statistical characteristics of the data, and each entity is decomposed by a grid, and the entity record is appended to all the meshes it falls into, until all the entities have been processed.

(2) Rebuilding the index: as the entities in the data table are edited, added, and deleted, the data is recalculated and a new grid scale is obtained to reconstruct the grid index.

(3) Query: The query operation of the grid index is the process of retrieving the original spatial data using the grid index, it can be divided into two steps, that is, the rough query process and the precise query process. By differentiating the query area, we retrieve all the meshes that are covered by the query area and contain the entity, and realize the first rough query, and then, based on the result set of the rough query, the records that do not satisfy the query request are eliminated by precise comparison.

(4) Insert: When inserting a spatial entity, according to the size of each lattice, the rule calculates that the entity spans those grids, calculates the grid encoding of the spatial features, and then records the data items of the entity in those lattices of the grid structure Index table.

(5) Delete and update: Delete the entity record, and this reaction to the grid index is more complex, you need to delete all the entity corresponding index record, in the relational database, by the Index table in the Entity Number field index, can greatly improve the performance of this operation. GIS Grid Index coding (1) Traditional simple GIS grid index coding

In the establishment of the map database, a square mathematical grid, which is parallel to the axis, is used to cover the entire database value space, and the latter is discretized into a dense raster collection to establish the spatial position relationship between the cartographic objects. It is usually a square grid that divides the entire database value space into 32x32 (or 64x64), creating another inverted file-the raster index. Each grid has an index entry (record) in the raster index, which registers all keywords in or across the grid, and can be implemented using variable-length pointers or bitmap methods.

(2) Improved simple GIS Grid index coding

The improved cell grid index converts the traditional encoding from 1 to 2 dimensions, into the X-and Y-direction encoding, the identification of spatial features, the encoding of the X and Y directions of the grid in which spatial features reside, and the outsourced envelopes for spatial features as a database record store. If a spatial feature spans multiple meshes, multiple records are also stored.

I add: For the improved grid index algorithm, we can also use the Z-curve or Hilbert to fill the grid, so that the grid can be reduced, and stored in this way is conducive to spatial proximity query.


Z Curve fill Hilbert curve fill

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.