[Gdal-dev] OGR: TIGER/Line polygons

Frank Warmerdam warmerdam at pobox.com
Wed Oct 20 15:47:33 EDT 2004


Curt, WE7U wrote:
> Have a sample invocation that works for you?  Unfortunately I'm not
> familiar with Python or I'd figure it out myself.  I'll still try to
> anyway.

Curt,

warmerda at gdal2200[226]% ~/gdal/pymod/samples/tigerpoly.py . poly.shp
OGR: Tiger Version Code=1102, Classified as TIGER_2002
OGR: OGROpen(.) succeeded (0xa1804f8).
ERROR 1: poly.shp does not appear to be a file or directory.
Got 31883 lines in 1 modules.
Processed 31883 links.
Built 10608 polygons.
warmerda at gdal2200[227]% rm poly.*
warmerda at gdal2200[228]% ~/gdal/pymod/samples/tigerpoly.py TGR06047.RT2
OGR: Tiger Version Code=1102, Classified as TIGER_2002
OGR: OGROpen(TGR06047.RT2) succeeded (0x955e7a8).
ERROR 1: poly.shp does not appear to be a file or directory.
Got 31883 lines in 1 modules.
Processed 31883 links.
Built 10608 polygons.

> 
> That will solve one problem we're having, which is the missing
> polygons from TIGER 2003 data that's been converted to Shapefiles
> for our project.
> 
> I still need to solve a second problem, which is how to display
> polygons directly from raw TIGER data (not the shapefiles).  I'm
> working on that one.

You can write C++ code that does essentially the same thing as the tigerpoly.py.
In particular, there is a C and C++ analog to the ogr.BuildPolygonFromEdges()
call used by that script.

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