[postgis-users] ST_Difference (again)
woodbri at swoodbridge.com
Sun May 11 21:25:34 PDT 2008
Why don't you do something like:
select country_name, ST_Difference(buffer(the_geom, dist), the_geom) from A;
Dylan Lorimer wrote:
> Hi All,
> 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.
> Any ideas?
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users