Fiona
Fiona copied to clipboard
Avoid passing encoding creation option to format drivers that don't support it
See https://github.com/Toblerity/Fiona/issues/468#issuecomment-344111416: the GeoJSON driver warns that ENCODING isn't supported.
@mattayes the warning is harmless but we can avoid it.
I can't see any way to ask GDAL which creation options are supported by a driver/dataset/layer. Do we need to build our own list for the drivers we support?
According to http://www.gdal.org/gdal_8h.html#aec318ffe797555656fe678558c576b23 GDALValidateCreationOptions
will validate options, and there's a hint about a GDAL_DMD_CREATIONOPTIONLIST
driver metadata item.
Still, I think the immediate thing for me to do is to eliminate the encoding option in the GeoJSON case.
Warning 6: driver MapInfo File does not support creation option ENCODING
Looks like MapInfo is the same.
KML driver as well
not recognized as a supported file format. driver KML does not support creation option ENCODING
Done!