[Proj] Using EPSG codes with cs2cs

Frank Warmerdam warmerdam at pobox.com
Tue Oct 5 19:06:42 EST 2010


R.Vives wrote:
> Sorry, I should have tell you, I work on Windows XP.
> 
> I managed to modify the environment variable just like you said and when I
> enter my command
> 
> I have the following new message: "pj_open_lib(epsg): call
> fopen(C:PROJSHARE\epsg) - failed"
> 
> "C:\gdal_ogr>cs2cs +init=epsg:4326 +to +init=epsg:32632
> pj_open_lib(epsg): call fopen(C:PROJSHARE\epsg) - failed
> Using from definition: init=epsg:4326
> Rel. 4.7.1, 23 September 2009
> <cs2cs>:
> projection initialization failure
> cause: Unknown error
> program abnormally terminated"
> 
> In fact, I don't have any PROJSHARE folder on C:, so I guess this is what is
> wrong.

Rafael,

I'm not sure where you got your cs2cs.exe binary, but hopefully that also
came with the "epsg" file somewhere in the tree.  If you set the PROJ_LIB
environment variable to point to the directory containing the epsg init
file then things will hopefully work.

eg.

set PROJ_LIB=C:\PROJ\NAD
cs2cs.exe ...

If you need to you can grab a recent epsg init file from:

   http://svn.osgeo.org/metacrs/proj/trunk/proj/nad/epsg

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