Fiona icon indicating copy to clipboard operation
Fiona copied to clipboard

Avoid passing encoding creation option to format drivers that don't support it

Open sgillies opened this issue 6 years ago • 4 comments

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.

sgillies avatar Nov 16 '17 03:11 sgillies

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?

snorfalorpagus avatar Jan 20 '18 12:01 snorfalorpagus

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.

sgillies avatar Jan 22 '18 04:01 sgillies

Warning 6: driver MapInfo File does not support creation option ENCODING

Looks like MapInfo is the same.

snorfalorpagus avatar Apr 10 '18 20:04 snorfalorpagus

KML driver as well

not recognized as a supported file format. driver KML does not support creation option ENCODING

kurt-rhee avatar Dec 16 '19 22:12 kurt-rhee

Done!

sgillies avatar Jan 26 '23 20:01 sgillies