[Gdal-dev] gdal 1.2.6 and postgis 0.9.2 OK - gdal 1.3.1 and postgis
1.1.3 KO
Arlo
arlo.borras at dryade.net
Wed Jul 19 12:37:22 EDT 2006
Hi All,
I'm dealing now with a big issue on my project.
I use GDAL in my c++ code to connect to a custom database wich contains
a few geometrics data like this
CREATE TABLE arc
(
id_arc int8 NOT NULL,
...
geo_general geometry,
geo_sectoriel geometry,
geo_troncon geometry,
geo_modele geometry,
CONSTRAINT arc_pkey PRIMARY KEY (id_arc),
....
CONSTRAINT enforce_geotype_geo_general CHECK
(geometrytype(geo_general) = 'LINESTRING'::text OR geo_general IS NULL),
CONSTRAINT enforce_geotype_geo_modele CHECK (geometrytype(geo_modele)
= 'LINESTRING'::text OR geo_modele IS NULL),
CONSTRAINT enforce_geotype_geo_sectoriel CHECK
(geometrytype(geo_sectoriel) = 'LINESTRING'::text OR geo_sectoriel IS NULL),
CONSTRAINT enforce_geotype_geo_troncon CHECK
(geometrytype(geo_troncon) = 'LINESTRING'::text OR geo_troncon IS NULL),
CONSTRAINT enforce_srid_geo_general CHECK (srid(geo_general) = -1),
CONSTRAINT enforce_srid_geo_modele CHECK (srid(geo_modele) = -1),
CONSTRAINT enforce_srid_geo_sectoriel CHECK (srid(geo_sectoriel) = -1),
CONSTRAINT enforce_srid_geo_troncon CHECK (srid(geo_troncon) = -1)
)
WITH OIDS;
Everything works fine as long as i used gdal 1.2.6 and postgis 0.9.2,
but i need to install my project on a new platform which contains
postgis 1.1.3.
My first try with a updated postgis was'nt sucessful. My c++ code fail
on getting the geometry of my feature (feature->GetGeometryRef() = NULL)
I thought that gdal 1.2.6 isn't compatible with postgis >= 1 (new
postgresql binary stockage of geometry ?), so i try gdal 1.3.2 without
more success
Symtoms are :
* the new orginfo (1.3.1) are silent about the two databases i test
(postgis 0.9.2 and 1.1.3 ). It just say
./ogrinfo -al "PG:dbname=...host=192.168.0.129 user=...password=..."
INFO: Open of `PG:dbname=...host=192.168.0.129 user=sytadin password=...'
using driver `PostgreSQL' successful.
with orginfo (1.2.6) i got tons of info displayed .
* got NULL when i try to OGRSFDriverRegistrar::Open(
PG:dbname=...host=192.168.0.129 user=...password=...",FALSE ) in
my c++ program
If anyone has an idea on whats going wrong... ?
Arlo from France
More information about the Gdal-dev
mailing list