On 30/10/07 18:28, Gustavo Martinez wrote:
El Monday 29 October 2007 12:53:20 escribió:
Moritz,
the result of v.db.connect monitoreo -p is:
Vector map <monitoreo> is connected by:
layer <1> table <monitoreo> in database <PG:host=localhost
dbname=pesca-new user=postgres> through driver <ogr> with key <>
There's the problem: 'with key <>'. GRASS does not know how to link the
geographical data (the map) to the attribute data. This is where the
SELECT FROM comes from, i.e., nothing to select.
As I said, I'm not sure that a map linked into GRASS with v.external can
be used for database queries. Also don't know what the ogr driver supports.
You could try to relink the map directly to the postgresql table with
something like
v.db.connect -o map=monitoreo driver=pg database="host=localhost
dbname=pesca-new" table=monitoreo key=XXX
where XXX is the column that contains the identifiers of the
geographical objects in your map.
Moritz
I've tried the following command:
v.db.connect -o map=monitoreo driver=pg database=pesca-new table=monitoreo
key=idmonitoreo layer=1
and it gave me the following:
pg driver: column 'fecha', type 1184 is not supported
pg driver: column 'fch_local', type 1184 is not supported
pg driver: PostGIS column 'geom', type 'geometry' will not be converted
pg driver: column 'fecha', type 1184 is not supported
pg driver: column 'fch_local', type 1184 is not supported
pg driver: PostGIS column 'geom', type 'geometry' will not be converted
The table <monitoreo> is now part of vector map <monitoreo> and may be deleted
or overwritten by GRASS modules
However, if I tgry again
v.db.connect monitoreo -p the key field is still empty.
What is the output of v.db.connect -p ?
I'm not sure I can help you any further, but my guess would be that
there is a difference in the handling of maps linked via v.external
compared to maps which are imported into GRASS...
Moritz
_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser