On Wed, Jul 6, 2011 at 5:51 PM, Even Rouault
<even.roua...@mines-paris.org>wrote:

> It is just that CreateLayer() will declare the geometry as being Polygon,
> but
> insert MultiPolygon sometimes. That's one of the caveats with the shapefile
> format/driver that will report a layer as being of type wkbPolygon but can
> return geometries that might actually be POLYGON or MULTIPOLYGON.
>
> Clearly, CreateLayer() is a simplistic implementation that doesn't have all
> the subtelties and options of ogr2ogr... With ogr2ogr, you would typically
> workaround this by using the -nlt MULTIPOLYGON option that would convert
> polygons to multipolygons before passing them to the PG driver.
>

Well isn't that embarrassing ... this caveat is the third paragraph of the
ESRI shapefile driver page. Thanks for your time, Even.

I'm looking at the shapefile driver now; out of curiosity, is there a
benefit to having SHPT_POLYGON shapefiles return wkbPolygon instead of
wkbMultiPolygon as their GeomType or SHPT_ARC shapefiles return
wkbLineString instead of wkbMultiLineString? Would having the driver return
the "Multi" geometry flavor instead cause a catastrophic failure somewhere?
Or is it a performance issue?

Is there a discussion thread I could read to catch up on this?

-----
Luke Peterson
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to