[Gdal-dev] Tiger Polygons

Frank Warmerdam warmerdam at pobox.com
Mon Mar 3 00:04:49 EST 2003

Thomas Hargrove wrote:
> Hello,
> I am building a Tiger map server that uses the shapefiles provided on
> ESRI.com.  As it turns out, getting the ESRI files is pretty tedious, so a
> few people and I are trying to generate similar shapefiles using the US
> Census files and ogr2ogr.  The lines come out just fine (Road, Rail,
> Rivers), but we can not get any Polys to work (County00, Water, Urban Areas,
> Landmark Polys).  Is this going to be possible with ogr2ogr, or are we going
> to need to buy tgr2shp or manifold.
> Also, if ogr2ogr does not support it, roughly how much work would be
> required for someone to add it?


I think you might find generating shapefiles for all the tiger coverages using
OGR and related tools somewhat tedious too.  In any event, the short answer
is that "ogr2ogr" will not take care of forming the polygons from tiger data
for you.  I am not entirely clear on why the polygons are that useful.

However, I have juiced up an earlier example script I wrote for building
polygons from edges for the TIGER/Line case.

If you pick up the CVS snapshot of GDAL/OGR on Monday you should find a
gdal/pymod/samples/tigerpoly.py script that builds a shapefile of polygons
from a tiger coverage.  It depends on a variety of fixes and improvements
elsewhere in gdal/ogr so please rebuild from the new source distribution.

Currently the polygon shapefile file created has only the POLYID attribute.
Let me know if you want all the attributes.

Best regards,

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