[gdal-dev] Mapinfo --> postgis db using ogr2ogr, failing to overwrite

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Aug 18 08:59:19 EDT 2011


Christian,

Using the -overwrite option and -lco SCHEMA will not work in ogr2ogr.
Refer to http://www.gdal.org/ogr/drv_pg.html for details.

On Thu, Aug 18, 2011 at 5:07 PM, Chrishelring <christianhelring at gmail.com>wrote:

> Hi list,
>
> I´m trying to upload a Mapinfo table (grundejerforeninger.tab) to our
> postgis db using ogr2ogr. The tabel should be located in the schema
> "rk_test" and could exist (e.g. the table should be replaced with the new
> one). I´m using ogr2ogr with the following:
>
> ogr2ogr.exe -overwrite -f "PostgreSQL" -s_srs EPSG:25832 -lco PRECISION=NO
> -lco DIM=2 -lco LAUNDER=YES -lco SCHEMA=rk_test -nlt GEOMETRY -t_srs
> EPSG:25832 "PG:user=k175_test password=k175_test dbname=k175_test
> host=webgis.roedovre.local port=5432" grundejerforeninger.tab
>
> Resulting in,
>
> ERROR 1: CREATE TABLE "rk_test"."grundejerforeninger" ( OGC_FID SERIAL,
> CONSTRAI
> NT "grundejerforeninger_pk" PRIMARY KEY (OGC_FID) )
> ERROR:  relation "grundejerforeninger" already exists
>
> ERROR 1: Terminating translation prematurely after failed
> translation of layer grundejerforeninger (use -skipfailures to skip errors)
>
> What am I doing wrong?
>
> Christian
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Mapinfo-postgis-db-using-ogr2ogr-failing-to-overwrite-tp6699039p6699039.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110818/b797ab21/attachment.html


More information about the gdal-dev mailing list