On 1 February 2011 00:55, Randall, Eric <erand...@eriecountygov.org> wrote: > I guess what I meant was: > > select st_difference(streets,st_intersection(streets,forests)) as streets > from streets, forests > where st_intersects(streets,forests) > union > select streets > from streets, forests > where not st_intersects(streets,forests) >
Isn't it something like: select st_difference( streets.geometry, st_intersection( streets.geometry, forests.geometry)) as streets from streets, forests where st_intersects(streets.geometry,forests.geometry) UNION select streets.geometry from streets where streets.gid not in (select streets.gid from streets, forests where st_intersects(streets.geometry,forests.geometry)); Otherwise, the negation of st_intersects in the second query returns false positives Nicolas _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users