Skip to content

GeoPolygonValue

CEL runtime value for one closed, convex, counterclockwise polygon ring.

Ring edges are geodesics, which is the edge interpretation that every bound target applies to a WGS 84 polygon. The constructor rejects a ring that is open, degenerate, clockwise, or not convex, because containment in such a ring is target-specific.

  • Val

new GeoPolygonValue(ring): GeoPolygonValue

Creates one validated ring.

Throws when the ring is not closed, holds fewer than four positions, holds more positions than the library’s bound, repeats a position consecutively, or is not a convex counterclockwise ring.

readonly GeoPointValue[]

Ring positions, ending with a repetition of the first position.

GeoPolygonValue

readonly ring: readonly GeoPointValue[]

Ring positions in counterclockwise order, ending with the first position.

contains(point): boolean

Reports whether a position lies inside this ring or on its boundary.

Containment is closed, because a position on the ring is the only boundary result that every bound target reproduces. A position whose distance from an edge plane is within the library’s tolerance counts as on the ring, so that a stored ring vertex does not depend on rounding.

GeoPointValue

boolean


convertToNative(typeDesc?): unknown

Returns this value for its own native type and rejects other conversions.

unknown

unknown

Val.convertToNative


convertToType(typeValue): Val

Converts only to this opaque CEL type or CEL’s type value.

Type

Val

Val.convertToType


equal(other): Val

Compares ring positions in order.

Val

Val

Val.equal


type(): Type

Returns the opaque CEL type of this ring.

Type

Val.type


value(): unknown

Returns the GeoJSON coordinates of this ring.

unknown

Val.value