[GRASS-user] v.external and POSTGIS

Hello all,

I'm starting with POSTGIS and GRASS and I have some problems with v.external.
My computer is running Debian 'testing' AMD64 with GRASS 6.2.0, Postgresql 8.1 and Postgis 1.1.6, all from debian packages.
On Postgres, I have a table named vms with column geometry storing POINTS. If I connect from GRASS to the database the connection is successful:

db.tables driver=pg database=host=localhost,dbname=pesca
  public.geometry_columns
  public.spatial_ref_sys
  public.vms

When I use v.external:

v.external dsn='PG:host=localhost user=gumartin dbname=pesca' output=pp layer=vms

  Cannot open data source

Can anybody help me with this? What am I doing wrong?
Thanks

--
Lic. Gustavo Martínez
Sub Secretaría de Pesca de la Nación
Paseo Colón 922 Of. 329
Tel: (54) 11 43492165
Buenos Aires, República Argentina

“Que la tierra se vaya haciendo camino ante tus pasos,
que el viento sople siempre a tus espaldas,
que el sol brille cálido sobre tu cara,
que la lluvia caiga suavemente sobre tus campos y,
hasta tanto volvamos a encontrarnos,
que Dios te lleve en la palma de su mano.”

Hello Gustavo,

Gustavo Martínez <gumartin@mecon.gov.ar>, [20070215 - 12:11:13]

Hello all,

I'm starting with POSTGIS and GRASS and I have some problems with
v.external.
My computer is running Debian 'testing' AMD64 with GRASS 6.2.0,
Postgresql 8.1 and Postgis 1.1.6, all from debian packages.
On Postgres, I have a table named vms with column geometry storing
POINTS. If I connect from GRASS to the database the connection is
successful:

db.tables driver=pg database=host=localhost,dbname=pesca
  public.geometry_columns
  public.spatial_ref_sys
  public.vms

When I use v.external:

v.external dsn='PG:host=localhost user=gumartin dbname=pesca'
output=pp layer=vms

  Cannot open data source

Can anybody help me with this? What am I doing wrong?

This are 2 pairs of shoes. db.tables uses GRASS pg-driver while
v.external uses the OGR-based postgresql-driver.

So it seems that you build grass with postgresql-support, but not your
underlaying gdal/ogr-library?!

You could check if your ogr is linked against postgresql by typing
ogrinfo --formats|grep -i postgres

HTH

  Stephan

--
Stephan Holl <stephan.holl@intevation.de>, http://intevation.de/~stephan
Tel: +49 (0)541-33 50 8 32 | Intevation GmbH | AG Osnabrück - HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

Hello Stephan,

I've already verified that and v.in.ogr lists PostgreSQL as one of the available formats and also the command you suggested.

Gustavo

En Thu, 15 Feb 2007 12:40:42 -0300, Stephan Holl <stephan.holl@intevation.de> escribió:

Hello Gustavo,

Gustavo Martínez <gumartin@mecon.gov.ar>, [20070215 - 12:11:13]

Hello all,

I'm starting with POSTGIS and GRASS and I have some problems with
v.external.
My computer is running Debian 'testing' AMD64 with GRASS 6.2.0,
Postgresql 8.1 and Postgis 1.1.6, all from debian packages.
On Postgres, I have a table named vms with column geometry storing
POINTS. If I connect from GRASS to the database the connection is
successful:

db.tables driver=pg database=host=localhost,dbname=pesca
  public.geometry_columns
  public.spatial_ref_sys
  public.vms

When I use v.external:

v.external dsn='PG:host=localhost user=gumartin dbname=pesca'
output=pp layer=vms

  Cannot open data source

Can anybody help me with this? What am I doing wrong?

This are 2 pairs of shoes. db.tables uses GRASS pg-driver while
v.external uses the OGR-based postgresql-driver.

So it seems that you build grass with postgresql-support, but not your
underlaying gdal/ogr-library?!

You could check if your ogr is linked against postgresql by typing
ogrinfo --formats|grep -i postgres

HTH

  Stephan

--
Lic. Gustavo Martínez
Sub Secretaría de Pesca de la Nación
Paseo Colón 922 Of. 329
Tel: (54) 11 43492165
Buenos Aires, República Argentina

“Que la tierra se vaya haciendo camino ante tus pasos,
que el viento sople siempre a tus espaldas,
que el sol brille cálido sobre tu cara,
que la lluvia caiga suavemente sobre tus campos y,
hasta tanto volvamos a encontrarnos,
que Dios te lleve en la palma de su mano.”

Hello,

I forgot to mention that I've tried QGIS from inside GRASS and I had no problem in accessing the same data.

Gustavo

Gustavo Martínez <gumartin@mecon.gov.ar>, [20070215 - 12:11:13]

Hello all,

I'm starting with POSTGIS and GRASS and I have some problems with
v.external.
My computer is running Debian 'testing' AMD64 with GRASS 6.2.0,
Postgresql 8.1 and Postgis 1.1.6, all from debian packages.
On Postgres, I have a table named vms with column geometry storing
POINTS. If I connect from GRASS to the database the connection is
successful:

db.tables driver=pg database=host=localhost,dbname=pesca
  public.geometry_columns
  public.spatial_ref_sys
  public.vms

When I use v.external:

v.external dsn='PG:host=localhost user=gumartin dbname=pesca'
output=pp layer=vms

  Cannot open data source

Can anybody help me with this? What am I doing wrong?

--
Lic. Gustavo Martínez
Sub Secretaría de Pesca de la Nación
Paseo Colón 922 Of. 329
Tel: (54) 11 43492165
Buenos Aires, República Argentina

“Que la tierra se vaya haciendo camino ante tus pasos,
que el viento sople siempre a tus espaldas,
que el sol brille cálido sobre tu cara,
que la lluvia caiga suavemente sobre tus campos y,
hasta tanto volvamos a encontrarnos,
que Dios te lleve en la palma de su mano.”