[gdal-dev] Renaming a column's name in a Shapefile
Ralf Suhr
Ralf.Suhr at itc-halle.de
Fri Oct 28 08:52:54 EDT 2011
Hi António,
one underscore was missing.
ogrinfo print the needed words:
Layer name: GPS_Project
ele: Real (19.15)
time: String (80.0)
magvar: Real (19.15)
geoidheigh: Real (19.15)
name: String (80.0)
cmt: String (80.0)
desc_: String (80.0)
src: String (80.0)
-sql "SELECT ele, time AS t, magvar, geoidheigh, name, cmt, desc_, src FROM
GPS_Project"
Gr
Ralf
On Freitag 28 Oktober 2011 14:38:43 António Rocha wrote:
> Hi Ralf
> Thanks for the feedback but it did not work.
> I tried:
> ogr2ogr -f "esri shapefile" -sql "SELECT ele, time AS t,
> magvar,geoidheigh, name, cmt, desc, src FROM GPS_Project" new.shp
> GPS_Project.shp
> And I got:
> ERROR 1: SQL Expression Parsing Error: syntax error
>
> Even I tried:
> ogr2ogr -f "esri shapefile" -sql "SELECT ele, magvar,geoidheigh, name,
> cmt, desc, src FROM GPS_Project" new.shp GPS_Project.shp
> And I got:
> ERROR 1: SQL Expression Parsing Error: syntax error
> Any other suggestion?
> Thanks
> Antonio
>
> Ralf Suhr wrote:
> > ogr2ogr -f "esri shapefile" -sql "SELECT ele, time AS t, magvar,
> > geoidheigh, name, cmt, desc, src FROM GPS_Project" new.shp
> > GPS_Project.shp
> >
> > Gr
> > Ralf
> >
> > On Freitag 28 Oktober 2011 13:54:37 António Rocha wrote:
> >> ogr2ogr -sql "SELECT [ele AS ele, time AS t, magvar AS magvar,
> >> geoidheigh AS geoidheigh, name AS name, cmt AS cmt, desc_ AS desc_, src
> >> AS src] FROM GPS_Project.shp", new.shp GPS_Project.shp
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 6582 (20111028) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
More information about the gdal-dev
mailing list