[postgis-users] ST_Difference (again)
edylan at google.com
Sun May 11 18:56:32 PDT 2008
So just as I thought I understood ST_Difference, I'm again confounded
with some bizarre behaviour I can't figure out.
I have a bunch of polygons all over the world that I've successfully
grouped by country name. So for example, in India I have a single
geometry that is a multipolygon, that consists of probably around 3000
random shaped polys in India. That is table A.
I took those polygons and buffered them all by some amount. This
produced...buffered polygons, as expected. That is table B.
What I want to do now is remove the original polygons from the
buffered poygons, and keep everything grouped by country, thereby
leaving me the bit that I buffered by without the original.
Here's what I tried:
SELECT A. country_name, ST_Difference(A.buffered_geom,
B.buffered_geom) from A,B GROUP by A;
What I get as the return value is A. Nothing more, nothing less.
More information about the postgis-users