On Tuesday 14 October 2014 11:28:19 Martin Landa wrote: > Hi, > > 2014-10-14 11:22 GMT+02:00 Paul Meems <[email protected]>: > > For ESRI shapefiles to max size of fieldnames is 10, so it is truncated.
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. > > I know. I am referring to something different - missing values. > > Input: > > KmenoveCislo (Integer) = 162 > > Output (Esri Shapefile): > > KmenoveCis (Integer) = (null) > > Martin -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
