[gdal-dev] Updating shapefile "fields" name with ogr2ogr

Emmanuel Séguin emmanuel.seguin at ign.fr
Wed Jun 20 09:41:40 PDT 2012


Hi,

This may be very easy but I did not find a way to use ogr2ogr to change 
a shapefile field (attribute) name.
I've tried something like this : ' ogr2ogr -f "ESRI Shapefile" -sql 
"ALTER TABLE CHEMIN RENAME COLUMN prec_alti TO foo" CHEMIN2.shp 
CHEMIN.shp ' but I get the following error "ERROR 6: Can't alter field 
definition on a read-only shapefile layer." (I've tried to use the 
"AlterFieldDefn=TRUE" layer option with no success whatsoever)

Thanx for any help,

Manu

-- 
Emmanuel Séguin
SIEL - Pôle technique du Géoportail
Institut Géographique National
2/4, avenue Pasteur - 94165 Saint Mandé Cedex
Phone : +33 1.43.98.83.54
http://fr.linkedin.com/in/emmmanuelseguin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120620/69ca91c0/attachment.html>


More information about the gdal-dev mailing list