On 18 July 2012 09:46, Mike Toews <mwto...@gmail.com> wrote:
> with data as (select 'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry AS geom1,
> 'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0, 1 0, 1 1, 0 1, 0 0))'::geometry AS geom2)
> select st_isvalid(geom1), st_area(geom1),
>        st_isvalid(geom2), st_area(geom2)
> from data;

Hmm, on further analysis, valid geometries shouldn't matter as much
for ST_Intersection:

with data as (select 'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry AS geom1,
'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0, 1 0, 1 1, 0 1, 0 0))'::geometry AS geom2)
select
 st_isvalid(st_intersection(geom1, geom1)),
 st_area(st_intersection(geom1, geom1))
from data;

-MIke
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to