ST_CoveredBy — Tests if a Geometry A is covered by Geometry B.
boolean ST_CoveredBy(
bytea GeomA, bytea GeomB)
;
Tests if a Geometry A is covered by Geometry B, returns TRUE if so.
Geometry A is covered by Geometry B iff every point of A is a point of B.
The DE-9IM Intersection Matrix for the two geometries is [T*F**F***] or [*TF**F***] or [**FT*F***] or [**F*TF***]
The reverse function of ST_Covers is ST_CoveredBy [ST_Covers(A,B) =ST_CoveredBy[B,A] |
This method does not support GeometryCollection arguments |
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
- | - | - | - |
SELECT ST_CoveredBy(Polygon,Line) as CoveredByPolygon_Line, ST_CoveredBy(Line,Polygon) CoveredByLine_Polygon, ST_Covers(Polygon,Line) as CoversPolygon_Line FROM (SELECT ST_GeomFromText('POLYGON ((10 30, 0 10, 30 20, 30 30, 20 40, 10 30))') as Polygon, ST_GeomFromText('LINESTRING (12 22, 16 25, 13 29, 13 29)') as Line) as foo; coveredbypolygon_line | coveredbyline_polygon | coverspolygon_line -----------------------+-----------------------+-------------------- f | t | t