[postgis-users] Possible for ST_Intersects to not include the perimeter?

Christopher Swingley cswingle at swingleydev.com
Wed Jan 21 15:58:23 PST 2015


Joseph,

On Wed, Jan 21, 2015 at 2:34 PM, Joseph Spenner <joseph85750 at yahoo.com> wrote:
>   I have NWS polygons describing Thunderstorm Warnings, which are made up of
> counties within the state.  Some of those counties might be on the edge of
> the state.  I want to query my database to show me all Warnings which are in
> a supplied state.  However, if I query the adjacent state which borders the
> counties from the first state, I get those Warnings because they share the
> same parimeter points.

What about finding the states that intersect thunderstorm warnings
where the intersection area is greater than some small threshold?
Something like:

ST_Intersects(warning_geom, state_geom) AND
ST_Area(ST_Intersection(warning_geom, state_geom)) > 1000

Cheers,

Chris
-- 
Christopher Swingley
Fairbanks, Alaska
http://swingleydev.com/
cswingle at swingleydev.com


More information about the postgis-users mailing list