Skip to main content
Return true if A is fully contained by B ST_Within returning true ST_Within returning false

Signatures

ST_Within (A: Geometry, B: Geometry)

Parameters

A
Geometry
required
The input geometry.
B
Geometry
required
The second geometry.

Return type

Returns true or false.

Example

SELECT ST_Within(ST_GeomFromWKT('POLYGON((0 0,3 0,3 3,0 3,0 0))'), ST_GeomFromWKT('POLYGON((1 1,2 1,2 2,1 2,1 1))'))
false