isValidOrThrow
Asserts whether the geometry is valid.
Same as isValid but when geometry is not valid instead
of returning false throws an error with the reason of invalidity
and with the XY location of the point at which the error occurred.
When geometry is valid, it does nothing.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
geometry | Geometry | The geometry to check | |
options? | object | Optional options object | |
options.isInvertedRingValid? | boolean | false | Sets how to treat a polygon with self-touching rings. If set to true the following self-touching conditions are treated as being valid (ESRI SDE model):
false the above conditions, following the OGC SFS standard, are treated as not valid. |
Returns
void
Throws
GEOSErroron unsupported geometry types (curved)TopologyValidationErroron invalid geometry