Open egorf opened 7 years ago
@egorf you are right, there is currenty no support in Fiona for tuple or list properties. The work arounds are to explode these tuples into three separate properties or to encode them in a string using a microformat specific to your application.
The blocker for Fiona is that the GDAL/OGR libraries lack support for arbitrary Python collections. In the list at http://www.gdal.org/ogr__core_8h.html#a787194bea637faf12d61643124a7c9fc you'll see there is no support for dicts or heterogeneous lists or tuples, only array-like lists. Supporting arrays of a single element type would not be very hard, though we might find that they are not supported in certain data formats.
Ok, I see. Theoretically, there may be check, that all data inside the list is the right type, then create an OFTList, raise ValueError otherwise. I will look into this
Expected behavior and actual behavior.
Instead of writing a triplet property, I get the following exception:
I can see this data type is not supported, nor the lists are mentioned in
FIELD_TYPES_MAP
andFIELD_TYPES
. Is there a potential way to work around this problem?Steps to reproduce the problem.
Operating system
Mac OS X 10.12.3
Fiona version and provenance
Fiona==1.7.5, installed as a pip dependency to geopandas