Table of Contents

Class SpatialPredicates

Namespace
EncDotNet.S100.Datasets.Pipelines.Geometry
Assembly
EncDotNet.S100.Datasets.Pipelines.dll

Static spatial predicates shared by every tool that accepts a GeoQuery. All predicates operate in planar lat/lon space and treat bounding-box edges as inclusive.

public static class SpatialPredicates
Inheritance
SpatialPredicates
Inherited Members

Methods

Contains(BoundingBox, GeoPoint)

Returns true when box contains point. Used by point-style queries where the query bbox collapses to the point itself.

public static bool Contains(BoundingBox box, GeoPoint point)

Parameters

box BoundingBox
point GeoPoint

Returns

bool

ContainsPoint(IReadOnlyList<GeoPoint>, GeoPoint)

Returns true when point lies inside the polygon ring, using a planar ray-casting test. Points on the ring boundary are reported as inside.

public static bool ContainsPoint(IReadOnlyList<GeoPoint> ring, GeoPoint point)

Parameters

ring IReadOnlyList<GeoPoint>
point GeoPoint

Returns

bool

Intersects(BoundingBox, GeoQuery)

Returns true when box intersects (or touches) query's coarse bounding box.

public static bool Intersects(BoundingBox box, GeoQuery query)

Parameters

box BoundingBox
query GeoQuery

Returns

bool

Remarks

A GeoQuery.Polyline is tested segment by segment: box must touch the bounding box of at least one segment, inflated by the corridor half-width. Testing against the envelope of every vertex instead would match anything inside the route's overall extent — kilometres off a bending track — whatever the corridor width.