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.
Implements
Section titled “Implements”Val
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”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.
Parameters
Section titled “Parameters”readonly GeoPointValue[]
Ring positions, ending with a repetition of the first position.
Returns
Section titled “Returns”GeoPolygonValue
Properties
Section titled “Properties”
readonlyring: readonlyGeoPointValue[]
Ring positions in counterclockwise order, ending with the first position.
Methods
Section titled “Methods”contains()
Section titled “contains()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
convertToNative()
Section titled “convertToNative()”convertToNative(
typeDesc?):unknown
Returns this value for its own native type and rejects other conversions.
Parameters
Section titled “Parameters”typeDesc?
Section titled “typeDesc?”unknown
Returns
Section titled “Returns”unknown
Implementation of
Section titled “Implementation of”Val.convertToNative
convertToType()
Section titled “convertToType()”convertToType(
typeValue):Val
Converts only to this opaque CEL type or CEL’s type value.
Parameters
Section titled “Parameters”typeValue
Section titled “typeValue”Type
Returns
Section titled “Returns”Val
Implementation of
Section titled “Implementation of”Val.convertToType
equal()
Section titled “equal()”equal(
other):Val
Compares ring positions in order.
Parameters
Section titled “Parameters”Val
Returns
Section titled “Returns”Val
Implementation of
Section titled “Implementation of”Val.equal
type()
Section titled “type()”type():
Type
Returns the opaque CEL type of this ring.
Returns
Section titled “Returns”Type
Implementation of
Section titled “Implementation of”Val.type
value()
Section titled “value()”value():
unknown
Returns the GeoJSON coordinates of this ring.
Returns
Section titled “Returns”unknown
Implementation of
Section titled “Implementation of”Val.value