Hello list,

I'm having a problem with st_difference, where two overlapping geometries will return an empty geometrycollection, as if the do not overlap. However, if I use st_difference on the same geometries, but converted to EWKT, then back, then using st_difference yields the expected output. Basically, this is what I'm getting (minus the output coords):

# select st_astext(st_difference(g1,g2)), st_astext(st_difference(st_asewkt(g1),st_asewkt(g2))) from temp;
        st_astext         |  st_astext
--------------------------+-------------------------------
 GEOMETRYCOLLECTION EMPTY | POLYGON(( .... ))
(1 row)


The resulting (correct) polygon is very small (a total area of 0.00048828125, using UTM coordinates), so maybe there's a problem with that? The result of st_overlaps(g1,g2) is true for the same data that cause this problem.

I could email someone the geometries if that would help.

Regards,
Mike
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to