[gdal-dev] StringList and Esri Shapefile

Martin Landa landa.martin at gmail.com
Tue Oct 14 09:28:06 PDT 2014


Hi,

2014-10-14 11:35 GMT+02:00 Even Rouault <even.rouault at spatialys.com>:
> Paul indeed identified the issue. If you use SetFrom(), it will not manage to
> match the target field names with the source ones, because CreateField() has
> done the field name truncation. ogr2ogr builds an integer map from the source
> field index to the target field index and uses SetFromWithMap(). You can have a
> look at swig/python/samples/ogr2ogr.py.
> In the simple case (for drivers that don't have compulsory fields already
> created at layer creation), the map is the identity, i.e. panMap[i] = i with i
> from 0 to nFieldCount - 1.

thanks a lot! It helped... Martin

-- 
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa


More information about the gdal-dev mailing list