[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
>> 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

Best regards,
Chaitanya kumar CH.

17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130302/8a296ae0/attachment.html>

More information about the gdal-dev mailing list