ClearSKY FaviconClearSKY Polygon Tools
Back to Glossary

Contains (spatial predicate)

True if geometry A completely contains geometry B (B is inside A, not just touching the edge).

Category: Topology · Also known as: ST_Contains, contains predicate

Definition (expanded)

Contains is a boolean spatial relationship commonly used in GIS and PostGIS. Many definitions treat boundary-only contact as NOT contained (strict contains). If you want boundary-inclusive behavior, some systems use Covers instead.

Examples

PostGIS contains

SQL

SELECT ST_Contains(a.geom, b.geom) FROM a, b;

Common mistakes