Kennett
Kennett

Reputation: 467

Custom Images as map

http://macwright.org/2012/08/13/images-as-maps.html

I am studying about this link and i got trouble

"This is a Python script: download it as a raw file, name it togeo.py. You’ll need GDAL for it to work – not necessarily the ‘python bindings’, but make sure that, in your terminal, gdal_translate and gdalinfo are present."

I dont know how to make "gdal_translate and gdalinfo are present in terminal", can anyone help me about that?

here is the error msg when i run "python togeo.py eso1119a.jpg":

Janes-MacBook-Pro:desktop kennett$ python togeo.py eso1119a.jpg
Traceback (most recent call last):
  File "togeo.py", line 7, in <module>
    info_output = subprocess.Popen(['gdalinfo', infile], stdout=subprocess.PIPE).communicate()[0]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Upvotes: 0

Views: 252

Answers (1)

Curt
Curt

Reputation: 1414

Basically you just need to install gdal and make sure that the executables are on your PATH environment variable. If you can, it's probably easiest if you can get it from a package manager. How you do this is platform specific. Otherwise, you can always install from source. The source code is available from http://www.gdal.org/

Upvotes: 2

Related Questions