I am writing the geoinformation using the gdal_edit
command using python in Jupyter notebook. Below is the syntax.
!gdal_edit -a_ullr -1.149576 85.247405 -92.762859 88.022318 -a_srs "+proj=Stere +datum=D_Moon_Spheroid +no_defs" Input.tif Output.tif
I am getting the following error after I run the above line
'gdal_edit' is not recognized as an internal or external command, operable program or batch file.
After two days of searching on Google, I was still unable to find the answer. Can you help me?
Below is the link for input image for which I want to add geoinformation https://drive.google.com/file/d/1KPhnJSrV7xK3oz8OgQXeDQGcKznW3G8q/view?usp=sharing
1 Answer 1
If the gdal is installed in conda, then the "gdal_edit.py" is found at
~/.conda/envs/<conda env>/bin/gdal_edit.py
If we assume gdal is installed in the "space_sci" conda environment then, "gdal_edit.py" in Jupiter notebook can be executed in one of the following ways:
! ~/.conda/envs/space_sci/bin/gdal_edit.py
! python ~/.conda/envs/space_sci/bin/gdal_edit.py
! gdal_edit.py
! ~/.conda/envs/space_sci/bin/gdal_edit.py -a_ullr -1.149576 85.247405 -92.762859 88.022318 -a_srs "+proj=Stere +datum=D_Moon_Spheroid +no_defs" Input.tif Output.tif
Explore related questions
See similar questions with these tags.
gdal_edit.py
orpython gdal_edit.py
?gdalinfo --version
? What version do you have? Notice that gdal_edit is a python script gdal.org/programs/gdal_edit.html and you should have file gdal_edit.py somewhere. In some environmentsgdal_edit
is configured to work as an alias togdal_edit.py
.