ST_Within(geometry A, geometry B) checks whether every point of geometry A lies completely inside geometry B. In PostGIS, it supports containment queries such as finding parks inside a larger theme-park boundary or attractions inside a specific park. section 10.5.2
Find theme parks inside Walt Disney World
Select candidate polygons and join them to the Walt Disney World boundary with ST_Within(p.way, d.boundaries). Filter for theme parks and exclude the containing polygon with NOT ST_Equals. The query returns six distinct parks, including EPCOT and Magic Kingdom.
