Hi Teresa, I'm struggeling with the translation of the union (analysis) tool of ArcGIS into PostGIS myself since a while. The problem is, that in PostGIS, you always compare one row of the first data set with one row of the second data set. That means, that interaction of more than 2 polygons is always a problem... I try to solve it by using loops written with pl/pgsql. They loop through all polygons of one data set and compare every single polygon with all polygons of the other data set. All polygons of the second data set that intersect with the reviewed polygon of the first data set are written into a new table. As for the difference part they are bundled with st_union and then st_difference is performed with the polygon of the first data set. Regarding the intersection part, st_intersection is performed for all combinations of polygon (data set 1) and the intersecting polygons of data set 2. Then the resulting polygons have to be intersected again in a loop until no new intersections occur.
If you are interested, I could share the current state of my experimentation with you... But don't expect too much - as Ralf already said, allocation of attributes (and not only that) is very difficult. But, unfortunately, most datasources, I have to use, contain overlapping polygons. Therefore, I have to deal with that situation somehow as you may have to do, too. Regards, Birgit. > Hi Teresa, > > you can't get a intersection from more then two polygons at a time. Think > about the attributes you get. The attributes are from poly1 and or poly2. The > solution is to use only datasources with non overlaping polygons. > > Gr > Ralf > > Am Donnerstag 08 Juli 2010, 09:27:06 schrieb Teresa Fazio: > >> > The solution you propose is valid to get polygons describing >> > intersections between two polygons, but I cannot figure out how to >> > obtain polygons describing intersections between more than two polygons >> > like the central polygon drawn in the shape TEST_Union. >> > I repeat that the TEST_Union shapefile was simply obtained using the >> > "union (analysis)" tool in ESRI ArcGIS. >> > >> > Any other help? >> > Thank you. >> > >> > _______________________________________________ >> > postgis-users mailing list >> > postgis-users@postgis.refractions.net >> > http://postgis.refractions.net/mailman/listinfo/postgis-users >> > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users