[GRASS-user] writing MicroStatioin DGN files
Markus Neteler
neteler at osgeo.org
Fri Jan 12 09:13:40 PST 2024
On Fri, Jan 12, 2024 at 10:12 AM gisfisch--- via grass-user
<grass-user at lists.osgeo.org> wrote:
>
> Hello list,
>
> I try to write MicroStation V7 DGN files in GRASS 7.8.7. using v.out.ogr.
>
> The same has been working for me without problems since years in GRASS 7.0.
>
> Now I get the following messages:
>
> v.out.ogr -s input=mymap at tempwork output=C:\Users\Documents\mydgn.dgn format=DGN
>
> ERROR 6: CreateField() not supported by this layer.
> ERROR: Unable to create column <Type>
>
> The DGN file is created, but there are no data written to it.
>
> Please help, because writing those files is critical for my workflow.
>
I have made a test with the North Carolina sample dataset:
GRASS nc_spm_08_grass7/user1:~ >
v.out.ogr input=roadsmajor type=line output=/tmp/roadsmajor.dgn format=DGN --o
ERROR 6: CreateField() not supported by this layer.
ERROR: Unable to create column <cat>
==> so, add -s flag to supress "cat".
v.out.ogr input=roadsmajor type=line output=/tmp/roadsmajor.dgn
format=DGN --o -s
ERROR 6: CreateField() not supported by this layer.
ERROR: Unable to create column <MAJORRDS_>
Apparently that column is also disliked.
Googling shows:
https://lists.osgeo.org/pipermail/gdal-dev/2006-February/008089.html
"The CreateField() messages are expected with DGN output. The
DGN format has a fixed schema and doesn't support user defined
fields.
"
Looking further in the OGR DGN driver docs shows:
https://gdal.org/drivers/vector/dgn.html
"Creation Issues
2D DGN files may be written with OGR with significant limitations:
- Output features have the usual fixed DGN attributes. Attempts to
create any other fields will fail.
- ...
- A seed file must be provided (or if not provided,
$PREFIX/share/gdal/seed_2d.dgn will be used). Many aspects of the
resulting DGN file are determined by the seed file, and cannot be
affected via OGR, such as initial view window.
- ...
"
I assume that in your case the attribute table names need to follow
this fixed DGN attributes scheme.
HTH,
Markus
--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://neteler.org/blog
More information about the grass-user
mailing list