|
||||||
Java based demonstration of spatial indexesUsage (Parameters for this applet):The applet handles the parameters:
For explanations on the principles behind the applet, read the following text :
If you want to find more about the technical details (Source code etc.) - Click Here IntroductionSpatial indexing is one of the bases of spatial databases. They are
commonly used in computerised systems that use a spatial databases -
such as CAD systems and Geographic Information Systems (GIS). The current
applet demonstrates several data structures for indexing spatial data. Spatial indexing - generalSimple GridA grid is a regular decomposition of space. By applying a grid of squares
with a regular height and width. Every grid cell is a "bucket"
that hold the spatial entities which are located inside its boundaries.
The cell holds 0,1 or more entities - this is it's main disadvantage,
since it is not efficient way for accessing the data. The grid cell
size for this applet is defined as (
Spatial Indexing - PointsPR K-d Tree (Orenstein, 1982)The PR K-d Tree is a regular decomposition of space. Decomposition
occurs whenever a bucket overflows. In the current implementation the
bucket size is 4. The decomposition is done by splitting the bucket
into 2 equal buckets. The decomposition is done in different directions:
the first one horizontally, then vertically and so on.
PR Quadtree (Orenstein)The PR Quadtree is a regular decomposition of space. Decomposition
occurs whenever a bucket overflows. In the current implementation the
bucket size is 4. The decomposition is done by splitting the bucket
into 4 equal buckets. The PR Quadtree is useful when the domain of data
points is finite. The maximum level of decomposition depends on the
minimum separation between two points, but it is bounds by the minimum
cell size (
Point Quadtree (Finkel/Bentley, 1974)The point quadtree is a marriage between a uniform grid and a binary search tree. Decomposition occurs whenever a bucket overflows. In the current implementation the bucket size is 4. The decomposition is done by splitting the bucket into 4 buckets along the x and y coordinates of the lowest order point in this bucket (the point that was inserted first to the bucket).
K-D Tree (Bentley, 1975)The K-D tree is another example for a marriage between a uniform grid and a binary search tree. Decomposition occurs whenever a bucket is overflow. In the current implementation the bucket size is 4. The decomposition is done by splitting the bucket into 2 buckets along the x or y coordinates of the lowest order point in this bucket (the point that was inserted first to the bucket). The decomposition is done in different directions: the first one horizontally, then vertically and so on.
Spatial Indexing - LinesSimple Edges GridA grid is a regular decomposition of space, by applying a grid of squares
with a regular height and width. Every grid cell is a "bucket"
that hold the spatial entities which are located inside its boundaries.
The cell holds 0,1 or more entities - this is its main disadvantage,
since it is not efficient way for accessing the data. The grid cell
size is defined as ( MX Quadtree (Hunter)The MX Quadtree is a regular decomposition of space. Decomposition
occurs whenever a bucket is overflow. On the current implementation
the bucket size is 1. The decomposition is done by splitting the bucket
into 4 equal buckets. The criteria for overflow is the existence of
a segment that crosses the "bucket" boundaries. The edges
are represented by "black" pixels. This quadtree is also useful
for simple digitised polygons - with no intersecting edges. The maximum
level of decomposition depends on the minimum cell size ( PMR QuadtreeThe PMR Quadtree is a regular decomposition of space. Decomposition
occurs whenever a bucket overflows. In the current implementation the
bucket size is 2. The decomposition is done by splitting the bucket
into 4 equal buckets. The criteria for overflow is that at least two
segments are crossing the "bucket" boundaries. The maximum
level of decomposition depends on the minimum cell size ( Links for more information on spatial indexesThis applet is based on outlines and principles that were taught in the course "Geographical Information Systems: A technical approach" (held in winter semester 1995) by Prof. Hanan Samet and Prof. Catriel Beery. Note about computing: When this applet was written, we wrote " The number of nodes can be between 2-40. The limit is due to the intensive calculation that this applet does. On high numbers (>30) the amount of CPU consumed by it is amazingly high." Within 6 years, it was possible to add a complex algorithm (Convex Hull) and to increase the number of nodes to 100. The original was written for a high-end Sun workstation, the updated version can run on my 333Mhz P-II. Moore's low and all that jazz... More information is available in Hanan Samet site . This applet was Written by: Muki Haklay & Sabina Gertz. The Source code: |
||||||
|
||||||
This page was last updated on August 2001
Information maintained by Muki Haklay
Please read all the above information in conjunction with the Disclaimer.