Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

ogr2ogr update failing to update shapefile int PostGIS

$
0
0

I have a bunch of shapefiles that I am looping in with a bash script to load and update files but the ogr2ogr fails. I am running gdal 1.92 on ubuntu 14.04.

for file in `ls *.shp`;do ogr2ogr -progress -append -update -skipfailures -a_srs "EPSG:4326" -nlt MULTIPOLYGON -f "PostgreSQL" PG:"dbname=data_test" $file -sql "SELECT gid,name,id from ${file%.*}" -lco SCHEMA=test;done

ERROR 1: Layer test.boundary already exists, CreateLayer failed.Use the layer creation option OVERWRITE=YES to replace it.


Viewing all articles
Browse latest Browse all 397

Trending Articles