Handling file extensions and drivers


hannes-fiona.groups.io@...
 

For a Fiona-based command line tool I am wondering how to best to handle user-selected output file formats and drivers.

Is there a ready-to-use way to select the driver based on the file extension? Maybe via a mapping of driver -> file extension?

E.g. if a user specified "out.geojson", the driver should be GeoJSON, if "out.shp" then use "ESRI Shapefile", etc.

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