Interface IVectorSpatialIndex
A spatial index built once over an IVectorSource's features and queried by extent. Implementations are expected to answer Query(BoundingBox) in time sub-linear in Count for typical dataset densities.
public interface IVectorSpatialIndex
Remarks
The index is queried by axis-aligned BoundingBox
overlap on each feature's geometry MBR. That matches the semantics
of the pre-existing linear IntersectsExtent scan in
S101VectorSource for
point features, and — because the feature MBR is the axis-aligned
hull of the vertex list — includes any feature whose geometry
crosses the query edge, matching real-world "features intersecting
this viewport / pick-box" semantics.
Properties
Count
Number of indexed features.
int Count { get; }
Property Value
Extent
Union MBR of all indexed feature geometries; null if empty.
BoundingBox? Extent { get; }
Property Value
Methods
All()
Enumerates every indexed feature in insertion order.
IReadOnlyList<Feature> All()
Returns
Build(IReadOnlyList<Feature>, string?)
Builds an index over features. The concrete
implementation is a
STR-packed R-tree (private) —
callers depend only on this interface.
public static IVectorSpatialIndex Build(IReadOnlyList<Feature> features, string? productTag = null)
Parameters
featuresIReadOnlyList<Feature>Features to index.
productTagstringOptional value for the
s100.producttag attached to build/query telemetry emitted through EncDotNet.S100.Diagnostics.PipelineMetrics.
Returns
Query(BoundingBox)
Returns every indexed feature whose geometry MBR overlaps
extent. Edge-touching MBRs are included
(closed-interval intersection).
IReadOnlyList<Feature> Query(BoundingBox extent)
Parameters
extentBoundingBox