A simple temporary fix is to use the -sql option and use the AS keyword to set the alias of the original field name into the truncated name.
On Sat, Mar 2, 2013 at 1:27 AM, Tamas Szekeres <szeker...@gmail.com> wrote: > > > 2013/3/1 Even Rouault <even.roua...@mines-paris.org> > >> >> There's even a 4th option that doesn't require any code change. Create a >> OGR >> VRT file that renames the source fields to the truncated shapefile field >> names (or >> the reverse : creates a OGR VRT that renames the truncated shapefile >> field names >> to the original field names, since OGR VRT now supports since a few >> versions >> CreateFeature()) >> > > > This may probably work, but doesn't seem to be very user friendly. > Actually I would prefer to include at least a flag to indicate that ogr2ogr > should provide mapping the fields in the same order (don't lookup field > index by name) for example: > > ogr2ogr -append -f "ESRI Shapefile" -nofieldreorder destination.shp > [source] > > or with the previous fieldmap approach > > ogr2ogr -append -f "ESRI Shapefile" -fieldmap "default" destination.shp > [source] > > Best regards, > > Tamas > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev