drvsupport // enabled drivers


Magnus Hoffmann
 

Hey all,

i have been trying to open NAS - ALKIS files for a while now. It's been a headache and i ended up working with gdal directly, which is fine for the moment. But not as neat and nimble as could be. Jorisvandenbosche from geopandas (god bless him) drew my attention to master/fiona/drvsupport.py (https://github.com/Toblerity/Fiona/blob/master/fiona/drvsupport.py#L94). That shows NAS - ALKIS is in fact a supported file format (makes sense as OGR offers a driver). However it is commented out, so working with geopandas directly or "vanilla" Fiona, NAS is not supported.

Jorisvandenbosche had the idea to change the supported drivers on runtime like so & it works like charm:

import fiona
fiona.supported_drivers["NAS"] = "raw"

geopandas.read_file(..., driver="NAS")

The ALKIS community is scratching their head how to work with this file format in Python. The answer is beautifully simple but a bit hidden for the average ALKIS/Python user. So my questions are:

1. Why are some of the supported drivers (assuming they are supported based on the filename) commented out making them unavailable.

2. Can we get this info, how to change it on runtime out in the open? Maybe an addition to the Fiona documentation Or even open an issue/pull request to have it available in "vanilla" Fiona?

Cheers & thanks in advance. Really appreciate your work.

RadMagnus

Join main@fiona.groups.io to automatically receive all group messages.