[Gdal-dev] tigerpoly.py - how to use it?

Frank Warmerdam warmerdam at pobox.com
Mon Nov 24 15:57:50 EST 2003


Jack Twilley wrote:
> shpdump tells me that this shapefile is of type polygon and contains
> 14293 shapes.  When I examined the output with the rendering tool I
> normally use for shapefiles, it appears to have all the possible
> layers jammed together.  I see water polygons, land boundaries, major
> roads, minor roads, water features, everything all together.
> 
> Is there a way to generate individual shapefiles for each layer
> instead of one shapefile containing everything?  I read through the
> script and didn't see any way to set options to only output a single
> layer per file or anything.  If I'm missing something. please let me
> know as this would be terribly useful.

Jack,

I am somewhat embarrassed to admit I don't know enough about the meaning
of the various fields in the tiger dataset to really figure out which
boundaries are for things like water boundaries.  Basically, in TIGER/Line
all the lines are in one big heap, and if you want to split it into layers
you need to do so based on the various attributes on the edges and/or
polygons.

I have successfully work out country and stateboundaries before mostly by
only extracting edges for which the left and right county or state id were
different.

I would encourage you to download and review the TIGER/Line manual to
understand the data model better.  However, you might find it easier to
utilize one of the "predigested" tiger datasets from folks like ESRI
(shapefile format) or Manifold (in their own format).

Good luck,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list