[GRASSLIST:3716] v.in.ogr and v.out.ogr

Hi all grass users,

Firstly thanks to Radim for clearing up for me the fact that I (obviously)
have to compile gdal-ogr with pg support if I want to use it for postgis
import/export.

I am using a lot the new module v.out.ogr and v.in.ogr to import export
postgis: I came up with the following observations:

the following command gave me an error:
v.out.ogr input=MA_finale dsn="PG:host=localhost dbname=EvA" layer=mamma
field=1 format=PostgreSQL

ERROR 1: AddGeometryColumn failed for layer mamma, layer creation has failed.
ERROR: Cannot create layer

If I IMPORT from a valid postgis database everything goes fine but the
attributes are not editable... is that normal??

Thanks,
Francesco Pirotti

--
CIRGEO
Interdepartment Center of Geomatics
University of Padova
cel. +39 328/2126861
tel. +39 049/8272522
fax. +39 049/8272686

On Saturday 19 June 2004 01:36, cirgeo_admin wrote:

Hi all grass users,

Firstly thanks to Radim for clearing up for me the fact that I (obviously)
have to compile gdal-ogr with pg support if I want to use it for postgis
import/export.

I am using a lot the new module v.out.ogr and v.in.ogr to import export
postgis: I came up with the following observations:

the following command gave me an error:
v.out.ogr input=MA_finale dsn="PG:host=localhost dbname=EvA" layer=mamma
field=1 format=PostgreSQL

ERROR 1: AddGeometryColumn failed for layer mamma, layer creation has
failed. ERROR: Cannot create layer

Is it valid PostGIS database? Can you create table with geometry in psql?:
create table test (geom geometry);

If I IMPORT from a valid postgis database everything goes fine but the
attributes are not editable... is that normal??

In d.what.vect? Did you notice -e flag?

Radim

At 09.41 19/06/2004 +0200, Radim Blazek wrote:

On Saturday 19 June 2004 01:36, cirgeo_admin wrote:
> Hi all grass users,
>
> Firstly thanks to Radim for clearing up for me the fact that I (obviously)
> have to compile gdal-ogr with pg support if I want to use it for postgis
> import/export.
>
> I am using a lot the new module v.out.ogr and v.in.ogr to import export
> postgis: I came up with the following observations:
>
> the following command gave me an error:
> v.out.ogr input=MA_finale dsn="PG:host=localhost dbname=EvA" layer=mamma
> field=1 format=PostgreSQL
>
> ERROR 1: AddGeometryColumn failed for layer mamma, layer creation has
> failed. ERROR: Cannot create layer

Is it valid PostGIS database? Can you create table with geometry in psql?:
create table test (geom geometry);

I can create postGIS layers from shapes and viceversa using the shp2pg and pg2shp program provided by compiling postgis si I figure it is fine;
could it be a bad version of ogr? I had some trouble compiling GDAL-OGR in my PC so I compiled it on another PC (running the same version of LINUX Mandrake) and then I copied the binaries to my pc..... it is just a mystery fo me how can something get a compile error on one PC and not on an identical PC... boh?!

I'll give it more tries and I'll let you know.
  Thanks
Francesco Pirotti