[Gdal-dev] OGR: TIGER/Line polygons

Curt Mills archer at eskimo.com
Thu Oct 28 00:42:13 EDT 2004


On Wed, 20 Oct 2004, Frank Warmerdam wrote:

> Curt, WE7U wrote:
> >
> > 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.

Thanks!  I've implemented that now, plus added a nice generic set of
hash table functions to use while recombining the Tiger data sets
into polygons that I can draw.

As always, once I get into the code, more questions arise.

When I implemented direct Shapelib support before, I implemented
support for filled polygons w/holes.  I rewrote portions of that
slightly for the OGR part of our code.

With the Tiger polygons it appears that the filled polygons and the
hole polygons are not necessarily connected in the files.  Might I
need sort the polygons somehow before drawing, then try to merge the
filled polygon geometries with the hole polygon geometries before
attempting to draw them?

What appears to be happening right now is that I sometimes pass
filled polygons to the draw routine, sometimes filled w/holes, and
sometimes hole polygons.  It's that last type that doesn't end up
getting drawn.  I assume that they should be somehow merged with one
of the other two types before any drawing occurs.

-- 
Curt, WE7U.				archer at eskimo dot com
http://www.eskimo.com/~archer
  Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"




More information about the Gdal-dev mailing list