[Gdal-dev] OGR: TIGER/Line polygons

Curt Mills archer at eskimo.com
Thu Oct 28 01:01:28 EDT 2004


On Thu, 28 Oct 2004, Frank Warmerdam wrote:

> I'm afraid you lost me here.   The OGR Shapefile driver should sometimes
> return polygon geometries which would be an outer ring and zero or more
> inner rings (holes).  It can also return Multipolygons, which is a list
> of polygons.  So one feature with a multipolygon geometry is essentially a
> set of islands.
>
> I don't know how you would get into a situation where you have just "holes"
> unless you are taking about the polygons that belong inside the holes of
> other polygons which aren't strictly holes in the sense I think of them.
>
> Perhaps you could provide a shapefile that demonstrates the issue?

Sorry, I think I led you astray.  I talked about implementing the
"holey" polygons using direct Shapelib support, then talked about
porting that code over to the OGR driver, and using it on TIGER/Line
data.  SDTS and Shapefiles appear to work just fine with OGR right
now.  It's the TIGER polygons that I'm working on now, which require
a bit more... finesse.

So... I'm snagging a bunch of the TIGER layers:  Polygon/ PIP/
AreaLandmarks/ Landmarks/ CompleteChain/PolyChainLink.  I combine
all of the pieces together, create a geometryCollection just like
tigerpoly.py does, then call BuildPolygonFromEdges.  I pass that off
to my Polygon draw routine for OGR that I used for SDTS and
Shapefiles, but again I'm passing TIGER polygons this time, not
Shapefile polygons.  I get these three types passed into the
routine:

    Filled polygons
    Filled polygons w/holes
    Hole polygons

I handle the first two cases just fine, but something tells me that
I missed a step somewhere and shouldn't be finding that third type.

-- 
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