Guilhain,

On mercredi 16 décembre 2020 21:52:41 CET Guilhain Averlant wrote:
> I wrote a ticket on gis.stackexchange.combut I didn't get a satisfactory
> answer, so I ask my question here.
> 
> I'm trying to create a memory layer with gdal/ogr python that contains a
> Binary Field.
> 
> But I didn't succeed, where am I wrong?

Probably nothing. I'm not sure why we don't have an override for this. Perhaps 
because OFTBinary is rather exotic and nobody strongly needed it before. 
Perhaps some (past) Python2/3 dilemna too

You can use f.SetFieldBinaryFromHexString(field_name,
                                                                                
                  binary_as_hex_string)

where e.g. binary_as_hex_string = binascii.hexlify(b'hello world')

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to