Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-08 Thread Tamas Szekeres
Added a ticket with the proposed implementation patch. Let me know how you like it. http://trac.osgeo.org/gdal/ticket/5021 Best regards, Tamas 2013/3/2 Even Rouault > Le vendredi 01 mars 2013 20:57:43, Tamas Szekeres a écrit : > > 2013/3/1 Even Rouault > > > > > There's even a 4th option t

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-02 Thread Even Rouault
Le vendredi 01 mars 2013 20:57:43, Tamas Szekeres a écrit : > 2013/3/1 Even Rouault > > > 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

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-01 Thread Chaitanya kumar CH
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 wrote: > > > 2013/3/1 Even Rouault > >> >> There's even a 4th option that doesn't require any code change.

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-01 Thread Tamas Szekeres
2013/3/1 Even Rouault > > 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 fi

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-03-01 Thread Even Rouault
Le lundi 25 février 2013 19:53:22, Tamas Szekeres a écrit : > So we seem to have 3 divergent options to provide a work around: > > 1. Expose fieldmap setting to let the user decide the order of the fields > to be copied. > 2. Modify GetFieldIndex to provide the name based lookup by the truncated >

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-02-25 Thread Tamas Szekeres
So we seem to have 3 divergent options to provide a work around: 1. Expose fieldmap setting to let the user decide the order of the fields to be copied. 2. Modify GetFieldIndex to provide the name based lookup by the truncated name (for the shape driver specifically) 3. Provide an option to instru

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-02-25 Thread Chaitanya kumar CH
Can we expect the fields to remain in the same order every time? Hi All, Related to issue #3247 we experienced, that if we use ogr2ogr to append source data to a shapefile destination (by using the -append flag) and field name truncation is taking place, th

Re: [gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-02-25 Thread Even Rouault
Le lundi 25 février 2013 16:57:08, Tamas Szekeres a écrit : > Hi All, > > Related to issue #3247 we > experienced, that if we use ogr2ogr to append source data to a shapefile > destination (by using the -append flag) and field name truncation is taking > pl

[gdal-dev] ogr2ogr with append fails to convert truncated fields

2013-02-25 Thread Tamas Szekeres
Hi All, Related to issue #3247 we experienced, that if we use ogr2ogr to append source data to a shapefile destination (by using the -append flag) and field name truncation is taking place, the corresponding values are not copied. This is because when sett