Table of Contents

Interface IVectorSpatialIndex

Namespace
EncDotNet.S100.Pipelines.Vector.Spatial
Assembly
EncDotNet.S100.Core.dll

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

int

Extent

Union MBR of all indexed feature geometries; null if empty.

BoundingBox? Extent { get; }

Property Value

BoundingBox

Methods

All()

Enumerates every indexed feature in insertion order.

IReadOnlyList<Feature> All()

Returns

IReadOnlyList<Feature>

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

features IReadOnlyList<Feature>

Features to index.

productTag string

Optional value for the s100.product tag attached to build/query telemetry emitted through EncDotNet.S100.Diagnostics.PipelineMetrics.

Returns

IVectorSpatialIndex

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

extent BoundingBox

Returns

IReadOnlyList<Feature>