Bug#845321: cs2cs: epsg-file lookup problem

Bas Couwenberg sebastic at xs4all.nl
Tue Nov 22 12:52:26 UTC 2016


Control: tags -1 unreproducible moreinfo

Hi Tobias,

On 2016-11-22 13:36, Tobias Megies wrote:
> for me, `cs2cs` from package `proj-bin` fails to lookup the EPSG file
> `/usr/share/proj/epsg` from package `proj-data` because it seems that 
> that path
> is not tried when searching for the epsg file:
> 
> ```
> $ cs2cs +init=epsg:4326 +to +init=epsg:2975
> Using from definition: init=epsg:4326
> Rel. 4.9.2, 08 September 2015
> <cs2cs>:
> projection initialization failure
> cause: no system list, errno: 2
> 
> program abnormally terminated
> ```

Please help troubleshoot this issue by setting PROJ_DEBUG=3, i.e.:

  PROJ_DEBUG=3 cs2cs +init=epsg:4326 +to +init=epsg:2975

You should see the path cs2cs is trying to open, e.g.:

  pj_open_lib(epsg): call fopen(/usr/share/proj/epsg) - succeeded

Please also ensure that PROJ_LIB is not set to a custom path by your 
.bashrc or similar:

  echo $PROJ_LIB

> With some intuition and some internet searches, this problem can be 
> fixed
> rather easily by setting `PROJ_LIB` env variable:
> 
> ```
> $ export PROJ_LIB=/usr/share/proj
> $ echo "12 34" | cs2cs +init=epsg:4326 +to +init=epsg:2975
> -3790598.80     14838998.02 0.00
> ```
> 
> However I believe the user should not need to manually set the lookup 
> path,
> this should be handled internally by packaging. It was definitly not 
> necessary
> to manually set this path in older package versions as I was using 
> "cs2cs" in
> the same way on earlier Debian distributions (certainly in Debian 
> squeeze, not
> 100% sure about Debian wheezy).

The user doesn't need to set the PROJ_LIB path, it is correct by 
default. It seems something in your environment is overriding the 
default PROJ_LIB path.

I cannot reproduce this issue on my jessie system where it uses 
/usr/share/proj by default correctly.

Kind Regards,

Bas



More information about the Pkg-grass-devel mailing list