Home | Docs | Issue Tracker | FAQ | Download | |
Note
DGN files typically use white as a color for their features and therefore are not visible on maps with white backgrounds.
Using ogrinfo on a single DGN file:
> ogrinfo /data/dgn/0824t.dgn
Had to open data source read-only.
INFO: Open of `0842t.dgn'
using driver `DGN' successful.
1: elements
Note
No geometry/feature type for the layer is identified because it can be multiple types.
DGN files are not really GIS data files. They evolved from drafting formats used by computer aided drafting/design (CADD) programs.
They carry a few key attributes which are usually consistent across all DGN files. Most of the attributes relate to graphical styling of features for map presentation, such as ColorIndex, Style, etc.
Spatial reference system information is not always encoded into DGN files. This can be a major problem when trying to adequately reference the DGN data in another mapping program.
Measurement units can be a problem. In some cases the features could be located in kilometres or feet even though it is not obvious from the output of ogrinfo. Sometimes the only way to identify or correct a problem with units is to open the file in Microstation software.
Using ogrinfo to examine the structure of the file/layer:
> ogrinfo -summary /data/dgn/0824t.dgn elements
INFO: Open of '0824t.dgn'
using driver 'DGN' successful.
Layer name: elements
Geometry: Unknown (any)
Feature Count: 22685
Extent: (-513183.050000, 150292.930000) - (-224583.220000, 407463.360000)
Layer SRS WKT:
(unknown)
Type: Integer (2.0)
Level: Integer (2.0)
GraphicGroup: Integer (4.0)
ColorIndex: Integer (3.0)
Weight: Integer (2.0)
Style: Integer (1.0)
EntityNum: Integer (8.0)
MSLink: Integer (10.0)
Text: String (0.0)
Map File Example:
LAYER
NAME dgn
TYPE LINE
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION "dgn/0824t.dgn"
STYLEITEM "AUTO"
CLASS
END
END # Layer