Hi guys,
I just wanted to use wradlib.georef.reproject to do some coordinate transformations.
I do
scoo = wradlib.georef.reproject(my_coords, wradlib.georef.get_default_projection(), wradlib.georef.proj4_to_osr(wradlib.georef.create_projstr('dwd-radolan')))
Then I get a really crazy error (I’m sparing you this one).
On the notebook server console, I get the following – a bit more informative – output:
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 6: Unable to load PROJ.4 library (libproj.so), creation of
OGRCoordinateTransformation failed.
The setup on the machine, where I’m doing this is a 64bit Linux with a user specific anaconda installation, so there might be specialties due to this.
I also do not ‘install’ wradlib but import directly from the source directory (so no requirements checking was done on this install ever).
So I don’t expect anyone to go into details here, but just wanted to ask, if anybody got similar problems, or if gdal comes with proj.4 and data files bundled in other installations.
Do you have the GDAL_DATA environment variable set?
If not, where is your copy of gcs.csv?
Best regards
Thomas
--
Dr.-Ing. Thomas Pfaff
Lehrstuhl für Hydrologie und Geohydrologie
Institut für Wasser- und Umweltsystemmodellierung
Pfaffenwaldring 61
D-70569 Stuttgart
Tel: +49 (711) 685-69099
So we may have to add some hints on this in the setup-documentation….
A few more notes for those who might use several python installations on one machine.
My current setup is roughly as follows:
Windows7x64
Python(x,y) 2.7.6.0 full install (so all modules) with python at C:\python27
Anaconda 2.7.6 x64 in a local appdata directory (so no global install)
When I used the Anaconda install, imported wradlib and tried to use wradlib.georef.reproject, I got errors indicating that python tried to load some DLLs from the C:\python27 directory.
The solution to this was, that there is an environment variable called GDAL_DRIVER_PATH which pointed to a directory below C:\python27\lib\site-packages. (got the hint from here http://trac.osgeo.org/gdal/ticket/5110)
Unsetting this environment variable before launching the Anaconda python interpreter solved that problem.
You might also have the GDAL_DATA variable pointing to the anaconda install (a folder in the osgeo package containing csv-files etc.), but it may work out, if the individual gdal versions are not that different.
Also, to be honest, I tried a lot of different installation procedures (conda install gdal, pip install GDAL, easy_install GDAL and finally easy_install with the binary from Christoph Gohlke’s pythonlib), because none seemed to work. It turned out that I had a bug in my call to reproject, so actually one of the earlier methods might have worked too, but so far I can say that
- pip install won’t work at all (most probably because it does a source install and then tries to compile)
- the Gohlke binary works (if the paths above are properly (re-)set). You can just pass it as an argument to easy_install and it will install properly.
Hope that may be of help to someone someday
Cheers
Thomas