sql - POSTGIS ST_Intersects returns contained polygons but not enclosing polygons -


i have postgresql table called parks in database postgis extensions has column named perimeter data type geography.

if issue query clause like:

where st_intersects(   parks.perimeter,   st_geogfromtext('polygon((-122.31755953233409 47.61300937889849, ...))') )  

i see results parks partially overlap query polygon , parks entirely contained within query polygon bit not see park contains query polygon.

the documentation st_intersects says:

st_intersects — returns true if geometries/geography "spatially intersect in 2d" - (share portion of space)

by definition should see result if parks.perimeter encloses query polygon.

i solve second st_contains slow down time critical query , should unnecessary.

does have explanation why seeing behavior , can fix without second clause?

thanks.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -