[GRASS-user] v.external with a postgresql view

Maria Elena Martinotti mariaelena.martinotti at hotmail.it
Tue Dec 15 03:03:29 PST 2015


Dear all,
I have a problem connecting to a PG db with v.external. I created a view on the db (sanfgrass_rain2h) which has a geometry column and grass is able to see it, but when I try to execute v.external it gives me an error about the geometry. See attached lines.
It seems that the layer is correctly detected but no geometry is imported, even if more tha 3000 points are provided by the view. Moreover I have checked that the view is correctly shown in the geometry_columns view.
There is an alert concerning the primary key but, AFAIK, it is not possible to define it in a view .

Thanks for any help,
Mary

db.connect driver=pg database="XXX,dbname=YYY,port=5432";
v.external input="PG:host=XXX user=postgres dbname=YYY"  -lt;
PostGIS database <YYY> contains 64 feature tables:
anagrafica,point,0,the_geom
...
sanfgrass_rain2h,geometry,0,the_geom
...v.external input="PG:host=XXX user=postgres dbname=YYY" layer=sanfgrass_rain2h;
ATTENZIONE: No key column detected.
ATTENZIONE: Feature table <sanfgrass_rain2h> has no primary key defined.
            Unable to define DB links.
Si sta ricreando la topologia per il vettore <sanfgrass_rain2h at test_4>...
Numero di nodi: 0
Numero di primitive: 0
Numero di punti: 0
Numero di linee: 0
Numero di confini: 0
Numero di centroidi: 0
Numero di aree: -
Numero di isole: -
v.external completo. Link to vector map <sanfgrass_rain2h> created.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20151215/ad55d5fa/attachment-0001.html>


More information about the grass-user mailing list