[Gdal-dev] ogr2ogr Default Output SRS

Frank Warmerdam warmerdam at pobox.com
Fri Dec 8 16:55:21 EST 2006


Martin Spott wrote:
> This is how I'm proceeding. In the result table of the first try
> (postgresql-8.1.4/postgis-1.1.3) the CONSTRAINT
> enforce_srid_wkb_geometry is tied to EPSG 4326, in the second try
> (postgresql-8.2.0/postgis-1.1.6) it ready EPSG 32767 and both tables
> actually _do_ cointain the expected data. How is such behaviour
> triggered !?
...
> Any ideas ? I could revert to using PostgreSQL-8.1.4/PostGIS-1.1.3 but
> I guess the same should work with PostgreSQL-8.2.0/PostGIS-1.1.6 as
> well ?

Martin,

There are some "sensitivities" in how ogr2ogr identifies which SRID to use
in postgis.  If it doesn't find a match then it creates a new SRID at the
"top" of the table, which I suspect did for the 32767 case.

It may be that the spatial_ref_sys tables in your different versions of
postgis are slightly different in the formatting of the WKT entries and
this is in one SRID 4326 gets used and in the other it doesn't.  There
were also some fixes in this general area recently in OGR - it wasn't clear
what GDAL/OGR you were using (ok, perhaps you said, but I've already clipped
it away, and I'm in a hurry).

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list