Name

Microstation Design Files (DGN)

Synopsis

These are also known as DGN files.

File listing

Data is encapsulated in a single file, usually with the suffix .dgn; for example: 0824t.dgn.

Data access/connection method

  • Access is available in MapServer through OGR.

  • The CONNECTIONTYPE OGR parameter must be used.

  • The path to the dgn file is required; file extension is needed.

  • All types of features in a DGN file are held in one "layer" of data. The layer is called elements and is the first and only layer.

  • The type of feature to be read from the DGN depends on the TYPE parameter in the map file.

  • DGN files typically contain POINT, LINE, POLYGON, and ANNOTATION feature types.

  • DGN files contain "styling" information, i.e., how to color and present the data. This is used, optionally, by specifying the STYLEITEM "AUTO" parameter.

    Warning

    DGN files typically use white as a color for their features and therefore aren't visible on maps with white backgrounds.

ogrinfo examples

Using ogrinfo on a single DGN file

Note that no geometry/feature type for the layer is identified because it can be multiple types.

                     > ogrinfo /data/dgn/0824t.dgn
    Had to open data source read-only.
    INFO: Open of '0842t.dgn'
    using driver 'DGN' successful.
    1: elements

Using ogrinfo to examine the structure of the file/layer

DGN files aren't really GIS data files. They evolved from drafting formats used by computer-aided drafting/design (CADD) programs.

They carry a few key attributes that are usually consistent across all DGN files. Most of the ...

Get Web Mapping Illustrated now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.