[postgis-users] Problem in Polygon-to-Polygon Intersection

Myunghwa Hwang mhwang4 at uiuc.edu
Wed Feb 14 19:07:46 PST 2007


Hi, list!

I have a problem in the results of intersection function.
I have two polygon boundary of a same area for 1990 and 2000,
and what I want to get is not just an common part but 1990 boundary  
whose polygons are split by 2000 Boundary,
like the result of ArcToolbox's Union.

I used the following query:
Create Table tb_name with oids as
select intersection(a.the_geom, b.the_geom)
from bnd_1990 a, bnd_2000 b
where intersects(a.the_geom, b.the_geom);

The problem is the results is missing some minor parts, generating  
holes in the entire boundary.
Through some tests, I figured out the missing parts are type of  
geomertycollection.
I tried to get right intersected polygon by using GeometryN().
But some geometries in a geomertycollection were line, not polygon.

Anybody can tell me how I can get the result from ArcToolbox's Union?
or how I can avoid the geometrycollection problem?

Thank you in advance.

from Myunghwa Hwang 



More information about the postgis-users mailing list