Basic Spatial Types
SpatialIndexing.SpatialIndex
— TypeBase abstract class for spatial indexing of elements of type V
in N
-dimensional space with dimensions of type T
.
SpatialIndexing.SpatialElem
— TypeSimple N
-dimensional spatial data element that stores values of type V
and could be referenced by the id
of type K
(if K
is not Nothing
).
Supports HasMBR{Rect{T,N}}
and HasID{K}
(if K
is not Nothing
) traits.
SpatialIndexing.HasMBR
— TypeType trait for checking mbr()
method support. If type V
has this trait (mbrtype(V)
returns HasMBR{Rect{T,N}}
), then mbr(v::V)
should return a minimal bounding rectangle (MBR) Rect{T,N}
that contains v
. If V
doesn't have this trait, mbrtype(V)
returns HasNoMBR
.
SpatialIndex{T,N,V}
requires that V
provides mbr()
method that returns Rect{T,N}
.
SpatialIndexing.HasID
— TypeType trait for checking id()
method support. If type V
has this trait (idtype(V)
returns HasID{K}
), then id(v::V)
should return a unique identifier for v
of type K
. If V
doesn't have this trait, idtype(V)
returns HasNoID
.
If available, SpatialIndex{T,N,V}
uses unique identifiers of V
alongside spatial indexing.
SpatialIndexing.SpatialIndexException
— TypeSpatialIndex
-related exception raised within Julia
SpatialIndexing.subtract!
— Functionsubtract!(tree::RTree, reg::Region)
Subtracts the region
from the tree
, i.e. removes all elements within region
.
SpatialIndexing.load!
— Functionload!(tree::RTree{T,N,V}, data::Any;
convertel = identity, method = :OMT,
leaf_fill = capacity(Leaf, tree),
branch_fill::Tuple{Integer, Integer} = omt_branch_fill(tree)) where {T,N,V}
Bulk-load data
into tree
.
tree
: an empty R-tree for storing elements of typeV
data
: iterable container with the elements to put intotree
convertel
: function to convert elements ofdata
to typeV
method
: bulk-loading methodleaf_fill
: the average number of elements to store in R-tree leaves (1-level nodes)branch_fill
: the tuple of the number of slices and the number of subtrees per slice in the R-tree nodes (level ≥ 1).
The supported bulk-loading methods are:
:OMT
: Overlap Minimizing Top-down method by Taewon Lee and Sukho Lee