Problem with ogr2ogr
Frank Warmerdam
warmerdam at POBOX.COM
Thu Oct 14 07:48:06 PDT 2004
Elstermann, Mike wrote:
> Hi MapServers,
>
>
> I have a problem with OGR2OGR.
> I try to convert DGN-Files in ESRI-Shape-Files with this usage:
>
> /usr/local/bin/ogr2ogr -skipfailures -f "ESRI Shapefile" -nlt POLYGON
> /susepool2/xxxpolygon /test.dgn
>
> Many polygons were converted, but app. 50% were not converted. I've got only
> Error-Messages for POINT and LINESTRING, but not for POLYGON.
Mike,
DGN files can contain a variety of geometry types in one layer. Shapefiles
can only have one geometry type in a file. You will need to do a translation
for each type of geometry you want to capture. Something like:
/usr/local/bin/ogr2ogr -skipfailures -f "ESRI Shapefile" -nlt POLYGON \
/susepool2/xxxpolygon.shp /test.dgn
/usr/local/bin/ogr2ogr -skipfailures -f "ESRI Shapefile" -nlt LINESTRING \
/susepool2/xxxline.shp /test.dgn
/usr/local/bin/ogr2ogr -skipfailures -f "ESRI Shapefile" -nlt POINT \
/susepool2/xxxpoint.shp /test.dgn
PS. this is really an OGR question and would be better addressed to the
gdal-dev mailing list.
Good luck,
--
---------------------------------------+--------------------------------------
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 MapServer-users
mailing list