[Gdal-dev] Tiger Polygons
ciagon at yourmom.sh
Tue Mar 4 22:45:04 EST 2003
> I think you might find generating shapefiles for all the tiger coverages
> OGR and related tools somewhat tedious too. In any event, the short
> is that "ogr2ogr" will not take care of forming the polygons from tiger
> 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
> Let me know if you want all the attributes.
> Best regards,
Thanks for the response. I got the newest CVS of GDAL and installed it.
I had to add "#include <assert.h>" to gdal_wrap.c to get python 1.5 to
This is the error I get with either python 1.5 or 2.2:
[root at localhost ogr]# python tigerpoly.py in/ out/
Traceback (innermost last):
File "tigerpoly.py", line 98, in ?
ds = ogr.Open( infile, update = 0 )
File "/usr/lib/python1.5/site-packages/ogr.py", line 107, in Open
ds_o = _gdal.OGROpen( filename, update, None )
TypeError: OGROpen, argument 3: expected string, None found
More information about the Gdal-dev