Skip to main content

touches

Returns true if the only points in common between geometry a and b are on their boundaries.

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 a intersect with b, but their interiors do not intersect

Throws​

  • GEOSError on unsupported geometry types (curved)

See also​

  • prepare improves performance of repeated calls against a single geometry

Examples​

touches: true
touches: false