[postgis-users] Join variation

RAVI KUMAR ravivundavalli at yahoo.com
Thu Sep 13 05:16:47 PDT 2007


Hi Andreas and Regina,
I have used the following to get a result which will have polygons that do not overlap.
But failed. 
Pl help me and correct the following query.
All I want is that after UNION of two layers, the polygons must split and have both the attributes of source layers. (NO PLace for overlapping polygons)

drop table abc;
create table abc (code smallint, info smallint, geometry geometry) with oids;

insert into abc (select a.code, b.info,(geomunion(a.geometry,
 b.geometry)) AS abc FROM b inner JOIN a ON (a.geometry && b.geometry AND  intersects(a.geometry, b.geometry)));

I can actually send two small shape files 'a' and 'b' If U want to private mail Ids..
Along with the result I wish to get..

Cheers
Ravi Kumar

       
---------------------------------
Got a little couch potato? 
Check out fun summer activities for kids.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070913/d975ff9f/attachment.html>


More information about the postgis-users mailing list