[gdal-dev] ogr2ogr with append fails to convert truncated fields
Chaitanya kumar CH
chaitanya.ch at gmail.com
Fri Mar 1 12:00:26 PST 2013
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 <szekerest at gmail.com> wrote:
> 2013/3/1 Even Rouault <even.rouault at mines-paris.org>
>> There's even a 4th option that doesn't require any code change. Create a
>> 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
> 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
> or with the previous fieldmap approach
> ogr2ogr -append -f "ESRI Shapefile" -fieldmap "default" destination.shp
> Best regards,
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev