[GRASS-user] Rename multiple sqlite columns at once
nikos.alexandris at felis.uni-freiburg.de
Tue Nov 18 19:53:23 EST 2008
On Tue, 2008-11-18 at 15:12 +0100, Nikos Alexandris wrote:
> On Sat, 2008-11-15 at 23:53 -0800, Hamish wrote:
> > Hi,
> > I haven't really been following this thread (or know much about it), but
> > I spotted this tip on the gdal site, maybe it helps:
> > http://www.gdal.org/ogr/drv_gpx.html
> > # Use of -sql option to remap field names to the ones allowed by the GPX schema !
> > ogr2ogr -f GPX output.gpx input.shp -sql "SELECT field1 AS name, field2 AS desc FROM source_layer"
> > Hamish
> sorry for not following up. I've tried your suggestion and there was
> some error. I can't provide details now (working in another machine).
> I'll do so later... :-)
# trying with a grass-vector
##(following the example & terminology used in the page "drv_gpx.html")
ogr2ogr -f "ESRI Shapefile"
befliegung_test.shp /geo/grassdb/rlp_fgaps/gk2_opt6_test/PERMANENT/vector/befliegung/head -sql "select AREA AS area, PERIMETER AS perimeter from /geo/grassdb/rlp_fgaps/gk2_opt6_test/PERMANENT/vector/befliegung/head"
ERROR 1: SQL: Missing comma after column AREA in SELECT statement.
## I don't think that a comma is required after the "field" name
I get the same ERROR when trying on a shapefile.
More information about the grass-user