I'm trying to open a DGN file with Python.
I've tried with OGR:
driver = ogr.GetDriverByName("DGN")
file = driver.Open("C:\path_to_dgn\example.dgn")
which returns a NoneType
object.
I've tried with Fiona:
fiona.open("C:\path_to_dgn\example.dgn")
which returns this error:
fiona.errors.DriverError: 'C:\path_to_dgn\example.dgn' not recognized as a supported file format.
The DGN is a Microstation v8 file, I'm not sure if that changes anything.
driver=ogr.GetDriverByName("DGNv8")
instead. Find more info on gdal.org/drivers/vector/dgnv8.html#vector-dgnv8driver=ogr.GetDriverByName("DGNv8")
returnsNone
, doesn't look like its an OGR supported driverMicrostation DGN files from Microstation versions predating version 8.0 are supported for reading
. What's your DGN version?