[Proj] EPSG CS not supported, but the epsg file contains the correct definition

Frank Warmerdam warmerdam at pobox.com
Thu Oct 7 11:49:51 EST 2010


SAEZ Laurent - SG/SPSSI/CPII/DOM/ETER wrote:
> When I call a GetMap using EPSG:4559 the image rendered is "wrong". 
> EPSG:4559 and EPSG:2989 are almost identical and the images should be 
> approximately similar.
> So, I test my EPSG code with testepsg.
> 
> If I don't specify the epsg file location ('/opt/mapserver/bin/testepsg' 
> EPSG:4559), I have :
> "ERROR 6: EPSG PCS/GCS code 4559 not found in EPSG support files.  Is 
> this a valid
> EPSG coordinate system?

Laurent,

PROJ.4 looks up epsg definitions from the epsg init file.

GDAL normally looks them up in the gcs.csv and pcs.csv files
though it does have fallback logic to look in the PROJ.4 epsg
init file.  So the error you see is "testepsg" (from GDAL) not
finding the coordinate system in the pcs.csv file and not able
to find the epsg init file because it is in an usual place.

> It seems that sometimes it is not sufficient to add a definition in the 
> file EPSG...
> I have read this thread ("Unsupported SRS but available in epsg file") :
> http://www.mail-archive.com/gdal-dev@lists.osgeo.org/msg04926.html
> 
> My GDAL_DATA environnement variable is well defined. I tried to add the 
> definition in cubewerx_extra.wkt without success.
> Any idea ?
> 
> I send this message on this list but I can't know what application is at 
> issue: GDAL or PROJ?

At the start you mentioned that the GetMap result is wrong. How wrong is it?
Just off by a bit or things in completely unrelated places or missing?

Mostly MapServer uses the PROJ.4 epsg init file, so I'm surprised your
change didn't work.  There are a few places that might actually ask
GDAL/OGR for the definition in which case it would be important either
for GDAL/OGR to also be able to find the epsg init file, or for you to
add the definitions to pcs.csv and gcs.csv which might be messy.  I'm
not sure what is going wrong.

To give you the option, the pcs.csv and gcs.csv definitions are:

pcs.csv
4559,"RRAF 1991 / UTM zone 
20N",9001,4558,16020,9807,1,0,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,

gcs.csv
4558,RRAF 1991,1047,Reseau de Reference des Antilles Francaises 
1991,1047,9122,7019,8901,1,0,6422,4560,0,9603,0,0,0,,,,

the latest gcs.csv and pcs.csv files from GDAL trunk have these
and should be safe to superinpose on older versions of GDAL.

   http://svn.osgeo.org/gdal/trunk/gdal/data

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 Proj mailing list