[gdal-dev] How to add more than one column to a shapefile using ogrinfo
jmckenna at gatewaygeomatics.com
Sun May 1 04:51:22 PDT 2016
On 2016-05-01 5:20 AM, aborruso wrote:
> I have no problem to add a column to a shapefile with:
> ogrinfo myfile.shp -sql "ALTER TABLE myfile ADD fieldX integer"
> But if I use, the second column is not added to the file.
> ogrinfo myfile.shp -sql "ALTER TABLE myfile ADD fieldX integer(3), fieldY
> The shell gives me only
> INFO: Open of `myfile.shp'
> using driver `ESRI Shapefile' successful.
> What's wrong in my syntax?
I think you have to use 2 ogrinfo statements.
MapServer Consulting and Training Services
More information about the gdal-dev