coveredBy
Returns true if geometry a lies in geometry b.
Geometry a is covered by geometry b if all points of a are in the
interior or at the boundary of b.
If either geometry is empty, returns false.
coveredBy is the converse of covers: coveredBy(a, b) === covers(b, a).
warning
Do not use this function with invalid geometries. You will get unexpected results.
Parameters
| Name | Type | Description |
|---|---|---|
a | Geometry | Prepared<Geometry> | First geometry |
b | Geometry | Second geometry |
Returns
boolean
true if geometry a is covered by geometry b
Throws
GEOSErroron unsupported geometry types (curved)
See also
coversconverse ofcoveredBywithinless inclusivecoveredByprepareimproves performance of repeated calls against a single geometry
Examples
differences with 'within'