[Gdal-dev] dgn file creation

Frank Warmerdam warmerdam at pobox.com
Tue Feb 28 15:12:15 EST 2006


stradivarius at centrum.cz wrote:
> Hi list,
> I´m really sorry for this question, but how can I create dgn from another supported format?
> my command:
> ogr2ogr -skipfailures -f "DGN" -lco "SEED=/usr/local/gdal/share/gdal/seed_2d.dgn 3D=NO" mundo_ogr.dgn mundo.shp
> I get:
> ERROR 6: CreateField() not supported by this layer.

Karel,

If you want to pass multiple layer creation options, you need to
include multiple -lco switches.

eg.
ogr2ogr -skipfailures -f DGN -lco SEED=/usr/local/gdal/share/gdal/seed_2d.dgn
  -lco 3D=NO mundo_ogr.dgn mundo.shp

The CreateField() messages are expected with DGN output.  The
DGN format has a fixed schema and doesn't support user defined
fields.  I just tried a similar command (without the seed or
3D layer creation options) and was able to create a DGN file
from a simple polygon file.

Of course, the polygons were all reduced to simple line strings.

> When I try a postgis connection, I get for each element:
> 
> ERROR 1: Features with empty, geometry collection geometries not
> supported in DGN format.
> 
> Commands create empty dgn file. Shp creating works.

Could you perhaps make your mundo.shp available for me to try?

Best regards,
-- 
---------------------------------------+--------------------------------------
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 Gdal-dev mailing list