Skip to main content

overlaps

Returns true if geometries a and b spatially overlap.

Geometry a overlaps geometry b if both geometries have some, but not all points in common, they have the same dimension and the intersection of their interiors has the same dimension as the geometries themselves.

warning

Do not use this function with invalid geometries. You will get unexpected results.

Parameters

NameTypeDescription
aGeometry | Prepared<Geometry>First geometry
bGeometrySecond geometry

Returns

boolean

true if geometry a overlaps geometry b

Throws

  • GEOSError on unsupported geometry types (curved)

See also

  • prepare improves performance of repeated calls against a single geometry

Examples

overlaps: true
overlaps: false