[Gdal-dev] Dissolving internal boundaries

Curt, WE7U archer at eskimo.com
Tue Oct 24 09:09:20 EDT 2006


FYI (see below response from Tom).  Tom knows a whole lot more about
this stuff than I do.  I apologize if I wasted a bit of Matt's time.
--Curt


On Mon, 23 Oct 2006, Tom Russo wrote:

> On Mon, 23 Oct 2006 11:49:37 -0700 (PDT), Mr. Richard Fayler of Fort Lee, New Jersey <"Curt, WE7U" <archer at eskimo.com>> writes:  Dear Roseanne Rosannadanna:
>
> > On Mon, 23 Oct 2006 matt.pettis at thomson.com wrote:
> >> Is there any way with gdal/ogr tools to join polygons into a single
> >> polygon based upon a .dbf attribute and dissolve the interior boundaries
> >> of constituent shapefile polygons?  I created an ascii visual at the
> >> bottom to describe what I want if the verbage is not clear.
>
> > We did such a thing using a modified Python script, processing
> > Tiger/Line files into Shapefiles for our project.  The original
> > script we started with was "tigerpoly.py" from GDAL/OGR, and our
> > modified version is "xastir/scripts/Xastir_tigerpoly.py".
>
> > So yes, it's possible, and there are a couple of pointers for you!
>
> [Not posted to the GDAL list, coz I'm not actually subscribed and only
> read it via the gmane mail-to-news interface--- you can forward it if you
> like]
>
> Those pointers are a bit of a bum steer, I'm sorry to say.
>
> tigerpoly.py doesn't start from a shapefile with dbf attributes.  It starts
> from the TIGER/Line data, which is a topological storage format (i.e. each
> line that is a polygon boundary carries with it information about the two
> polygons it is a boundary between), and constructs a shapefile from that.  I
> was able to hack it to dissolve polygons only because of the topological
> format of the input data -- knowing that a given line has two polygons with
> equal attributes as left and right polygon makes it easy -- you simply tweak
> the topological information and don't count those lines as boundary lines.
> There's no similar information in a general shapefile, which has no
> topological information like that.
>
> Dissolving a general polygon shapefile (one in which topological data isn't
> stored in the DBF file to augment the "simple features" so you could fake it)
> would require a lot more work.  If OGR provides such a capability, it's going
> to be more involved than the task "Xastir_tigerpoly" had before it.
>
> --
> Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
> Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
> "And, isn't sanity really just a one-trick pony anyway? I mean all you get is
>  one trick, rational thinking, but when you're good and crazy, oooh, oooh,
>  oooh, the sky is the limit!"  --- The Tick




More information about the Gdal-dev mailing list