[postgis-users] Intersection and contains

Rod Taylor pg at rbt.ca
Mon May 9 21:13:16 PDT 2005


I've been playing around with various regions, and noticed that my
Ontario and Toronto boundaries were a little different (Toronto extended
into the water). So I took the intersection of them but the result of
the intersection is not contained within either of the original geoms. I
find this to be rather odd, but I really don't have any experience with
GIS.

Thanks!


bric=# select contains(geomontario, intersection(geomontario,
geomtoronto)) from tab;
 contains
----------
 f
(1 row)

bric=# select area(intersection(geomontario, intersection(geomontario,
geomtoronto))) from tab;
        area
--------------------
 0.0686349223828984
(1 row)

bric=# select area( intersection(geomontario,  geomtoronto)) from tab;
        area
--------------------
 0.0686349223828984
(1 row)

bric=# select intersects(geomontario, intersection(geomontario,
geomtoronto)) from tab;
 intersects
------------
 t
(1 row)

bric=# select issimple( intersection(geomontario,  geomtoronto)) from
tab;
 issimple
----------
 t
(1 row)

bric=# select isempty( intersection(geomontario,  geomtoronto)) from
tab;
 isempty
---------
 f
(1 row)

-- 




More information about the postgis-users mailing list