# Package org.apache.lucene.spatial.prefix.tree

This package is about SpatialPrefixTree and any supporting classes. A SpatialPrefixTree supports spatial indexing by index-time tokens where adding characters to a string gives greater resolution.

Potential Implementations include:

- http://en.wikipedia.org/wiki/Quadtree
- http://en.wikipedia.org/wiki/Geohash
- http://healpix.jpl.nasa.gov/

- Interface Summary
  Interface | Description
  --- | ---
  Cell | Represents a grid cell.
  CellCanPrune | Grid cells that share nothing with other cells when calling `Cell.getNextLevelCells(Shape)` might implement this interface.
  NumberRangePrefixTree.NRShape | Base interface for `Shape`s this prefix tree supports.
  NumberRangePrefixTree.UnitNRShape | A unit value Shape implemented as a stack of numbers, one for each level in the prefix tree.
  S2ShapeFactory | Shape factory for Spatial contexts that support S2 geometry.

- Class Summary
  Class | Description
  --- | ---
  CellIterator | An Iterator of SpatialPrefixTree Cells.
  DateRangePrefixTree | A PrefixTree for date ranges in which the levels of the tree occur at natural periods of time (e.g.
  GeohashPrefixTree | A `SpatialPrefixTree` based on Geohashes.
  GeohashPrefixTree.Factory | Factory for creating `GeohashPrefixTree` instances with useful defaults
  LegacyCell | The base for the original two SPT's: Geohash and Quad.
  NumberRangePrefixTree | A SpatialPrefixTree for single-dimensional numbers and number ranges of fixed precision values (not floating point).
  PackedQuadPrefixTree | Uses a compact binary representation of 8 bytes to encode a spatial quad trie.
  PackedQuadPrefixTree.Factory | Factory for creating `PackedQuadPrefixTree` instances with useful defaults.
  QuadPrefixTree | A `SpatialPrefixTree` which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.
  QuadPrefixTree.Factory | Factory for creating `QuadPrefixTree` instances with useful defaults
  S2PrefixTree | Spatial prefix tree for S2 Geometry.
  S2PrefixTree.Factory | Factory for creating `S2PrefixTree` instances with useful defaults
  SpatialPrefixTree | A spatial Prefix Tree, or Trie, which decomposes shapes into prefixed strings at variable lengths corresponding to variable precision.
  SpatialPrefixTreeFactory | Abstract Factory for creating `SpatialPrefixTree` instances with useful defaults and passed on configurations defined in a Map.