Reducing index size for multi-level grid indexes
View Patent ↗The number of index entries in a grid index for indexing geometric shapes is reduced by establishing a pool storage area for geometric shapes, selecting a threshold number of grid cells which a geometric shape may overlap, storing the shape in the grid index if a geometric shape overlaps a number of grid cells not exceeding the threshold number, and storing the shape in the pool storage area if the geometric shape overlaps a number of grid cells which exceeds the threshold number.
1. A computer-implemented method of reducing a number of index entries for use in an index associated with an object, comprising:
determining whether a number of grid cells the object overlaps is more than a defined limit number of grid cells at successively coarser levels of a multilevel grid index until it is determined that the number of grid cells that the object overlaps at one of the levels of the multilevel grid index does not exceed the defined limit number of grid cells or it is determined that the number of grid cells that the object overlaps exceeds the defined limit number of grid cells at a coarsest level;
in response to determining that the number of grid cells that the object overlaps at one of the levels of the multilevel grid index does not exceed the defined limit number of grid cells, using that level of the multilevel grid index for grid indexing;
in response to determining that the object overlaps more than the defined limit number of grid cells at the coarsest level,
determining a number of index entries for the object;
if the number of index entries does not exceed a threshold number, storing the index entries in the multilevel grid index using the coarsest level of the multilevel grid index for grid indexing; and
if the number of index entries exceeds the threshold number, storing an indicator of the object in a pool storage area.
2. The computer-implemented method of claim 1 , wherein the object is a geometric shape, and said determining a number of index entries is based on how many cells the object overlaps.
3. The computer-implemented method of claim 2 , further comprising
selecting the threshold number of grid cells that a geometric shape may overlap; and
establishing the pool storage area for storing indicators of geometric shapes overlapping the number of grid cells exceeding the threshold number.
4. The computer-implemented method of claim 2 , wherein the geometric shapes are from a database of geometric shapes.
5. The computer-implemented method of claim 4 , wherein an indicator for each geometric shape in the database that overlaps a number of grid cells exceeding the threshold number is stored in the pool storage area.
6. The computer-implemented method of claim 2 , wherein the multilevel grid index includes a data structure and if one of said geometric shapes is placed in the pool storage area, an identifier representative of such geometric shape is placed in the data structure of the multilevel grid index.
7. The computer-implemented method of claim 2 , wherein the threshold number of grid cells is related to the coarsest level of the multilevel grid index.