I recently installed OSGEO (http://download.osgeo.org/) which included python and gdal. I just realised however that there are many gdal libraries that were not included in this package for example gdal_merge. How can I install them into the osgeo environment?

  • gdal_merge isn't a library, but rather an application. You should just be able to download it and use it without installation if you want though. Did you try that? – BradHards Feb 27 '14 at 10:37

gdal_merge is a python script. It may get installed by default with GDAL, but it won't work without the GDAL-python libraries which may not be installed by default or you may not have selected if you were doing things manually.

Check to see that you have the OSGeo gdal-python package installed. For the windows installer, it's listed under the libs section.

  • I have installed python 2.7 64bit, GDAL 64 bit core and set the environment path. Python is installed ok and gdal_info can be started within the command line....But when I go into python from the command line, gdal_merge.py throws the error "NameError: name 'gdal_merge' is not defined" – Robert Buckley Feb 27 '14 at 13:18
  • @RobertBuckley gdal_merge is a python script that can be run like the other gdal utilites (i.e. from a shell prompt). You don't need to run it from within python. You do, however, need to make sure you have the GDAL python bindings installed (not just python and GDAL-core). – Evil Genius Feb 27 '14 at 13:26
  • I have installed the bindings but still get "C:\Program Files\GDAL>gdal_merge Der Befehl "gdal_merge" ist entweder falsch geschrieben oder konnte nicht gefunden werden." in the command promt. "from osgeo import gdal" also reports no error....but I can´t start gdal_merge from the command line – Robert Buckley Feb 27 '14 at 13:54
  • I have got it to work now. Thanks for the help. I can´t explain why this now works...the only thing I did was to put the gdal environment variable at the beginning of PATH. – Robert Buckley Feb 27 '14 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.