bounding polygon

Norman Vine nhv at CAPE.COM
Sat Nov 27 20:37:30 EST 2004


Tyler Mitchell writes:
>
> Thomas Chesky wrote:
> >
> > Is there a tool out there to create a shapefile containing one polygon,
> > which is the combined boundary of another shapefiles's shapes?
> >
>
> You could do it a few ways.  The one I'm most familiar with is to load the
> shapefile into PostGIS and then use an SQL query to aggregate/combine the
> features.  Then export it back into a shapefile.
> 
> The other way is to use the OGR libraries and write a small script in Python.
>  
> Sorry for no simple answer, I'd love to hear about other ways of doing this
> that are simpler.  Anyone have a python script to do this already?

If I understand the question correctly this should be fairly easy todo
by exploiting the fact that all interior boundaries will be represented
twice in the original shapefile whereas the exterior boundaries will
only be represented once.  

Note the interior boundaries will probably be represented in inverse order  

i.e a line segment ptA -> ptB in poly1 will most likely be represented
     as a line segment ptB - > ptA in poly2

HTH

Norman



More information about the mapserver-users mailing list