[gdal-dev] OGR is not able to determine PostGIS table SRS
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 7 18:28:04 EDT 2009
Sorokine, Alexandre wrote:
> Folks,
>
> I am trying to determine an SRS for a table in PostGIS database but I am
> getting NULL. I have a table that in PostGIS that has SRID defined:
>
> usa=# select ST_SRID(the_geom) from census.counties;
> st_srid
> ---------
> 4326
> 4326
>
Alexandre,
OGR doesn't look at the SRID of individual geometries, only at the SRID of
the table as registered in the srid column of the geometry_columns table
for that target table. Perhaps you didn't set the SRID in the geometry_columns
table? Or perhaps there is a problem looking up the composite name
census.counties?
You might try running ogrinfo with the --debug on commandline switch to see
some details of what is going on internally.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list