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

Created on 16 Nov 2017  路  4Comments  路  Source: Toblerity/Fiona

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.

bug

All 4 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

huevosabio picture huevosabio  路  8Comments

dazza-codes picture dazza-codes  路  3Comments

sgillies picture sgillies  路  4Comments

sgillies picture sgillies  路  4Comments

culebron picture culebron  路  4Comments