Indexing of Spatial Data
Indexing of Spatial Data
In each node, approximately half of the points stored in the sub-
tree fall on one side and half on the other.
Partitioning stops when a node has less than a given maximum
number of points.
The k-d-B tree extends the k-d tree to allow multiple child nodes
for each internal node; well-suited for secondary storage.
Each line in the figure (other than the outside box) corresponds to
a node in the k-d tree
the maximum number of points in a leaf node has been set to 1.
The numbering of the lines in the figure indicates the level of the
tree at which the corresponding node appears.
Leaf nodes have between zero and some fixed maximum number of points (set to 1
in example).
MBR = {(L.x,L.y)(U.x,U.y)}
Note that we only need two points to describe an MBR, we
typically use lower left, and upper right.
6
Deni Suwardhi
3D-ModIS Clustering Points
We can group clusters of datapoints
into MBRs
Can also handle line-segments, rectangles,
polygons, in addition to points
R1 R4
We can further recursively
R group MBRs into larger
2 R5
MBRs….
R3 R6
R9
R7
R8
7
Deni Suwardhi
3D-ModIS R-Tree Structure
R10 R11
R10 R11
R12
R1 R2 R4 R5 R7 R8
R3 R6 R9
Can be very inefficient in worst case since multiple paths may need to be
searched
but works acceptably in practice.
Q
R10 R11
R10 R11
R12
R1 R2 R4 R5 R7 R8
R3 R6 R9
MINDIST(Q,MBR)
if L.x < x < U.x and L.y < y < U.y then 0
elseif L.x < x < U.x then min( abs(L.y -y) , abs(U.y -y) )
elseif ….
13
Deni Suwardhi – Spatial Database Lecture
3D-ModIS MBR: Distance Example
14
Deni Suwardhi – Spatial Database Lecture
3D-ModIS
MBR: Distance Bounds
Distance bounds on bounding boxes
Suppose we have a query point Q and one known point R
Could any of the points in the MBR be closer to Q than R
is?
R = (1,7)
Q=
(3,5)
MBR = {(6,1),(8,4)}
15
Deni Suwardhi – Spatial Database Lecture
SPATIAL
PREDICATE
RV-2018
DE-9IM
The Dimensionally Extended nine-Intersection
Model (DE-9IM) is a topological model and a
standard used to describe the spatial relations of two
regions (two geometries in two-dimensions, R2), in
Geometry, Point-set topology, Geospatial topology,
and fields related to computer spatial analysis. Since
the spatial relations expressed by the model are
topological they are invariant to rotation, translation
and scaling transformations.
The matrix provides an approach for classifying
geometry relations. Roughly speaking, with a
true/false matrix domain, there are 512 possible 2D
topologic relations, that can be grouped into binary
classification schemes. For English speakers, there
are about 10 schemes (relations) that have a name
that reflects their semantics (e.g. "Intersects",
"Touches", "Equals", and others.) When testing two
geometries against a scheme, the result of this test is
a spatial predicate named by the scheme.
Matrix Model
The DE-9IM model is based on a 3×3 intersection matrix with the
form:
Illustration