[FWTools] [gdal-dev] converting shp to dgn

Frank Warmerdam warmerdam at pobox.com
Fri Nov 19 12:55:03 EST 2010


Travis Kirstine wrote:
> Is it possible to set DNG attributes using ogr2ogr and write values to
> the Text field for non point features.  If this is not possible with
> ogr2ogr can it be done with the api (write values to the text field
> for polygon features).

Travis,

It is embarrassing how much the dgnlib stuff has faded in my memory.

First, the OGR DGN writing code is quite restrictive and does not give
access to all the write capabilities of dgnlib by some ways.  On quick
review the only way to write text through OGR is as a feature with a point
feature which is turned into a DGNTextElem element associating the text
with a point.

I'm not aware of other normal mechanisms of writing display text in a
DGN file.  I would *assume* that the normal way to associate text with
a polygon is to create a group containing the polygon and a normal
text object.  This would need to be done with direct dgnlib calls -
OGR does not support doing this.

I'm a bit vague on the details of DGN attributes anymore.  I believe
there is fine grained control available from the dgnlib api though I don't
know that I have done complicated stuff with it.

I think the database linkages are stored in the attribute data for the
elements, and there is some support in OGR for writing linkage information
back to dgn files.  There may be more capabilities in this regard than
is evident from the drv_dgn.html docs.  For instance I notice in the code
stuff about a DGN_LINK_FORMAT configuration option.

I hope that helps a bit.  You might get better answers on dgnlib issues
on the dgnlib mailing list.  Some of the folks there seem to know more about
the library than I do!

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 FWTools mailing list