[gdal-dev] Why have I got SRS 900914 in my PostGIS table after ogr2ogr alimentation ?

SAEZ Laurent - SG/SPSSI/CPII/DOM/ETER/PNE IG Laurent.Saez at developpement-durable.gouv.fr
Tue Oct 23 03:57:26 PDT 2012


Hi,

I used to populate my PostGIS databases using ogr2ogr (GDAL 1.9.0, 
released 2011/12/29 compiled by myself on Bedian).
It's the first time I've got this behavior: SRS isn't which I expect. 
It's replaced by code 900914 in my table definition :
CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 900914

I don't understand why...
This issue occured with EPSG:4467.

PostgreSQL 9.1.2, PostGIS 1.5.3, GDAL 1.9.0 run on the same server.

If I do : gdalsrsinfo "EPSG:4467"
It returns :
PROJ.4 : '+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 
+units=m +no_defs '

OGC WKT :
PROJCS["RGSPM06 / UTM zone 21N",
     GEOGCS["RGSPM06",
         DATUM["Reseau_Geodesique_de_Saint_Pierre_et_Miquelon_2006",
             SPHEROID["GRS 1980",6378137,298.257222101,
                 AUTHORITY["EPSG","7019"]],
             TOWGS84[0,0,0,0,0,0,0],
             AUTHORITY["EPSG","1038"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4463"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",-57],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AXIS["Easting",EAST],
     AXIS["Northing",NORTH],
     AUTHORITY["EPSG","4467"]]

It's correct !!! But at this point, I don't know from where comes this 
OGC WKT definition ?

This is one of my ogr2ogr commands :
ogr2ogr -f "PostgreSQL" -append -nln "mytable" -nlt MULTILINESTRING -lco 
GEOMETRY_NAME=the_geom -lco FID=gid -lco OVERWRITE=no -a_srs EPSG:4467 
PG:"dbname='MyDataBase' host=localhost port='5432' user='MyUser' 
password='MyPassword'" MyMIFMIDFile

Usually it works ;-(

I have verified some files :
- Proj.4 epsg file : /MyFolder/share/proj/epsg :
It contains the following line :
<4467> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m 
+no_defs

- GDAL pcs.csv : /MyFolder/share/gdal/pcs.csv
It contains the following line :
4467,"RGSPM06 / UTM zone 
21N",9001,4463,16021,9807,1,0,4400,8801,0,9102,8802,-57,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,

- spatial_ref_sys from my database :
4467;"EPSG";4467;"PROJCS["RGSPM06 / UTM zone 
21N",GEOGCS["RGSPM06",DATUM["Reseau_Geodesique_de_Saint_Pierre_et_Miquelon_2006",SPHEROID["GRS 
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1038"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4463"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4467"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]";"+proj=utm 
+zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs "

I have also try to add -a_srs EPSG:4467 to my ogr2ogr command but 
without success !

Any idea ?

Regards
Laurent


More information about the gdal-dev mailing list