Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL missing gcs.csv #221

Closed
kapadia opened this issue Dec 4, 2014 · 7 comments
Closed

GDAL missing gcs.csv #221

kapadia opened this issue Dec 4, 2014 · 7 comments

Comments

@kapadia
Copy link

kapadia commented Dec 4, 2014

Anaconda's version of GDAL doesn't work as expected. Normally programs such as gdalwarp just work. In the case of Anaconda's, the installation is either missing, or hiding some important data files.

This is resolved by following the instructions in the error (export GDAL_DATA=/path/to/gcs.csv), but it becomes cumbersome when creating multiple conda environments, all requiring a manual tweak to work correctly.

> gdalwarp -t_srs epsg:3857 in.tif out.tif
ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 1: Translating source or target SRS failed:
epsg:3857

Is there a way to include gcs.csv in the Anaconda distribution without having to manually define GDAL_DATA?

@kapadia
Copy link
Author

kapadia commented Dec 8, 2014

Running gdal-config --datadir shows where GDAL searches for gcs.csv. In the case of a conda installed GDAL in an environment called "gdal", the result is:

$HOME/anaconda/envs/gdal/share/gdal

which does not exist.

@jgomezdans
Copy link

This can be easily solved by Continuum by adding a couple of lines to the build.sh recipe, see e.g. the last three lines in this file. Then you don't need to set up a variable.

@tswicegood tswicegood self-assigned this Apr 11, 2015
@kpurdon
Copy link

kpurdon commented Apr 12, 2015

@tswicegood thanks for talking with me today at PyCon I got some great information from you guys.

I'd love to find a solution (and test @jgomezdans proposed solution) for this and submit it (ideally as a PR to the actual recipe).

  • Am I missing the source of the recipe for this?

If I cant get the source recipe why would I not just try and fix the recipe here and always use the "conda" channel? What is the relationship between Anaconda, binstar(defaults), and binstar(conda)?

@groutr
Copy link

groutr commented May 14, 2015

GDAL has been repackaged into libgdal and gdal (the python bindings).
These changes were introduced for gdal 1.11.2 build number >= 2 on windows and >= 1 on unix.
This repackaging should resolve all outstanding issues that I've seen for anaconda's gdal. If there are other problems, please open a new issue.

I will eventually work on updating the recipes in conda-recipes to reflect this new packaging of gdal.

@groutr groutr closed this as completed May 14, 2015
quintusdias added a commit to quintusdias/glymur that referenced this issue Dec 26, 2015
Issues on anaconda, the package may be built incorrectly.  This appears
to be addressed at
ContinuumIO/anaconda-issues#221 but that issue
is closed.  There also seems to be trouble loading proj4 library, which
should not be the case.  Skip the test on Anaconda platform for now.

Closes-Issue: #379
@ivanmeyer
Copy link

ivanmeyer commented Mar 2, 2017

To fix this error do the following steps.

  • go to the activate.d folder of your conda env, this should be something like:

C:\ProgramData\Anaconda2\envs\ ENV_NAME \etc\conda\activate.d

  • Then create a new bat file with the next text:
if not defined GDAL_DATA (
  set GDAL_DATA=%~dp0..\..\..\Library\share\gdal
  set _CONDA_SET_GDAL_DATA=1
)

This new bat file will replace the text with double quotation marks and a slash after dp0, that is shown as follow

if not defined GDAL_DATA (
  set GDAL_DATA="%~dp0**\**..\..\..\Library\share\gdal"
  set _CONDA_SET_GDAL_DATA=1
)

bye!

@AgilentGCMS
Copy link

GDAL 3.0.2 is missing a bunch of EPSG csv files such as gcs.csv, coordinate_axis.csv, etc. My GDAL_DATA dir is set correctly, but those csv files are simply not there. I compiled GDAL from source, and those files are not in the source tarball either.

@mmann1123
Copy link

Yes still having trouble here with GDAL 3.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants