[GRASS-user] PostgreSQL append

Markus Neteler neteler at osgeo.org
Sun Aug 2 16:25:26 EDT 2009


On Sun, Aug 2, 2009 at 9:43 PM, Pavel Iacovlev<iacovlev.pavel at gmail.com> wrote:
> Good day all,
>
> 1.
> I have a vector grass file and I want to append it's data to a
> PostgreSQL table, atm I use the following command:
>
> v.out.ogr input=flood_vect type=area 'dsn=PG:host=localhost
> dbname=gisdb user=gis password=*' olayer=flood layer=1
> format=PostgreSQL lco='OVERWRITE=YES'
>
> This command overwrites the postgis table, I want to append the data.
> If I remove the lco='OVERWRITE=YES' I just get and error that the
> table already exists.

The OGR tools support is:
ogr2ogr -update -append ..

but I am afraid that v.out.ogr does currently not.


> 2. When I export vector data to a PostgreSQL table it sets the wrong SRID
>> g.region -p
> projection: 3 (Latitude-Longitude)
> zone:       0
> datum:      wgs84
> ellipsoid:  wgs84
> north:      47:04:48.37738N
> south:      46:55:11.265564N
> west:       28:44:44.481812E
> east:       28:58:20.944519E
> nsres:      0:00:02.885559
> ewres:      0:00:02.885027
> rows:       200
> cols:       283
> cells:      56600
>
> the SRID of the geometry is 900917,

Do you mean 900913 (the unofficial outdated Google Mercator EPSG code)
?

> I expect it to be 4326 (wgs84) what am I doing wrong ?

It should be like that. I currently have no PostGIS installed for
a test. Maybe someone else in this list...

Markus


More information about the grass-user mailing list