Hi, Have you ever been frustrated about shapefiles mixing polygons/multipolygons (or linestrings/multilinestrings) in the same layer and issues when converting them to PostGIS ?
I was, until a few minutes ago, where I've just added in GDAL trunk "-nlt PROMOTE_TO_MULTI" as an accepted option of ogr2ogr. The effect of this option is that when a layer is of type Polygon, it will be converted in the target format as MultiPolygon, and any Polygon feature in the layer will be promoted to MultiPolygon (existing MultiPolygons will be left untouched). The same for LineString / MultiLineString. Other geometry types will be left untouched (i.e. Point will not be converted to MultiPoint (they are identified as separate types in shapefiles). This option works for any source or target datasource, so the shapefile -> PostGIS is just one particular (but typical) use case. Previously you could use -nlt MULTIPOLYGON or -nlt MULTILINESTRING but that couldn't be used when doing a mass conversion of shapefiles that mixed different types of geometries. Best tregards, Even _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
