[Gdal-dev] dgn file creation
Frank Warmerdam
warmerdam at pobox.com
Thu Mar 2 00:46:03 EST 2006
stradivarius at centrum.cz wrote:
> Hi Frank,
> thanks for your reply. I´m using the usual map of the world from
> http://www.cipotato.org/DIVA/data/misc/world_adm0.zip.
> I tried to add columns with the names of types generic attributes in pg
> and exported it back to shape. If you want it is at
> http://blaunit.com/extras/mundo.zip.
>
> ogr2ogr -select TYPE,LEVEL,COLORINDEX,WEIGHT,STYLE -f "DGN" mundo_ogr.dgn
> mundo.shp
> I have 5 times ERROR 6: CreateField() not supported by this layer.
Karel,
I was able to do the translation but had a few problems.
1) Only the first geometry in a multipolygon was being written.
I have modified the writer so it will now write each component
of any kind of geometry collection as essentially a distinct
feature in the DGN file. That means there is now a separate
SHAPE for each island of multi-island nations.
2) The default seed file is a poor choice for lat/long coordinates.
I used the following command to get a better origin:
ogr2ogr -f DGN -dsco ORIGIN=-180,90,0 -dsco UOR_PER_SUB_UNIT=1000
-dsco SUB_UNITS_PER_MASTER_UNIT=1000 out2.dgn mundo.shp
3) interior rings in polygons (ie. lakes) are ignored by the writer.
I can't fix this (easily). Basically there is no easy way to
represent polygons with holes in DGN.
4) Northern Ireland is treated as part of Ireland, and not the United
Kingdom in your source file. That seems pretty politically dangerous!
> furthermore, Is there some possibility to link external dbase file (i.e. the very same .dbf from the shp:-) into dgn element definition?
> best regards, Karel
I do not believe there is currently any way to write database linkages
through OGR. If you really need to do this you will basically need to
write a program directly on top of Shapelib.
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 | President OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list