[GRASSLIST:9675] GRASS-PostGIS-QGIS problem

Leonardo Lami lami at faunalia.it
Fri Dec 30 07:39:48 EST 2005


Hi all.
I'm getting confused about how does SRID works.

First, I create a Gauss-Boaga location in GRASS; I can do that either:

1. manually: proj_info file is
 name: Transverse Mercator
 datum: rome40
 datumparams: towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
 proj: tmerc
 ellps: international
 a: 6378388.0000000000
 es: 0.0067226700
 f: 297.0000000000
 lat_0: 0.0000000000
 lon_0: 9
 k_0: 0.9996000000
 x_0: 1500000.0000000000
 y_0: 0.000000000

2. automagically, through EPSG code; choosing 26591 (the same SRID PostGIS 
uses) I obtain the following proj_info:
 name: Transverse Mercator
 proj: tmerc
 datum: rome40
 towgs84: -104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
 a: 6378388
 es: 0.006722670022333322
 lat_0: 0
 lon_0: -3.45233333333333
 k: 0.999600
 x_0: 1500000
 y_0: 0
 pm: rome
 no_defs: defined

The two are different, and this is obviously not good.

If I download points from GPS with v.in.garmin I get right placement with the 
first location, but slightly wrong with the second one.

If I export GRASS vectors to PostGIS, I obtain a SRID 32767 (unknown); the 
geometry column is called wkb_geometry, whereas it usually is "the_geom" (no 
problem is apparent from this).

Moreover, it does not seem possible to write the table in a schema other than 
public.

Then, if I try to load the PostGIS layer in QGIS, in both cases the layer is 
not loaded; QGIS says:
"The table has not primary key nor oid column"

Trying the whole sequence with a new location from EPSG code:
UTM:  32632 +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
I get the same results (SRID 32767 in PostGIS, QGIS error).

Does anybody have a hint to help us understand (and possibly solve) all this?

All best wishes.




More information about the grass-user mailing list