OpensourceGIS: Usages, Experiences and Challenges
Wednesday, August 23, 2017
OpensourceGIS: Usages, Experiences and Challenges: GDAL/python: How to install python binding for gda...
OpensourceGIS: Usages, Experiences and Challenges: GDAL/python: How to install python binding for gda...: I was having problem of installing gdal for my windows and with python versions. I have faced several issues during installation and it tak...
Friday, January 27, 2017
OpensourceGIS: Usages, Experiences and Challenges: GDAL/python: How to install python binding for gda...
OpensourceGIS: Usages, Experiences and Challenges: GDAL/python: How to install python binding for gda...: I was having problem of installing gdal for my windows and with python versions. I have faced several issues during installation and it tak...
Thursday, September 29, 2016
GDAL/python: How to install python binding for gdal in windows? Essential Tips and Links collected.
I was having problem of installing gdal for my windows and with python versions. I have faced several issues during installation and it takes me three days to work it out.
Important isuues was finding proper links of downloading windows binaries. It was missing some elements from folder.
The requirements for geting gdal with python:
Check the python installation versions: Start>python 27>IDL(Python GUI)>Run>Python Shell
Take a look on the screen shot of Python Shell. It contains important information [MSC v.1500 32 bit (Intel)] on win32 what you need to download for your Computer.
Links to dowload GDAL and python binding for Gdal. Click the picture to access to the the link.
Note that you have to download GDAL and python binding for GDAL from same folder. Other wise it will not be sucessful at the end.
I have windows7 and I have python 2.7.10: I need to download from first links.
Then I have Downloaded the following files:
System Path Variable:
The installation is not only the core thing, you must have to change /add or update your sytem path to let python recognize Gdal packages.
How to change or add in System Path?
Sytem variable to work:
Example:
path=C:\Python27\ArcGIS10.4\Lib;C:\Program Files (x86)\GDAL (change to add this to location more)
You have to locate python lib folder in PYTHONPATH system variable. I am using python with ArcGIS. So for me it look like the following:
PYTHONPATH=C:\Python27\ArcGIS10.4\Lib
It is very important to add GDALDATA system variable to make sure gdal work properly.
Here for my case gdal data:
GDALDATA= C:\Program Files (x86)\GDAL\gdal-data
After completing installation you will get a osgeo folder in your site-packagesfolder.
Example:
C:\Python27\ArcGIS10.4\Lib\site-packages\osgeo
To check gdal is properly installed run the folowing lines in your python shell:
from osgeo import ogr
from osgeo import osr
from gdalconst import *
from osgeo import gdal
If it works properly you are done!!!! Otherwise recheck the process.....
Online helpful Tutorials/discussions:
How to Install Gdal in Windows Machine
Install gdal on windows
stackexchange helpful question and answers
https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows
Important isuues was finding proper links of downloading windows binaries. It was missing some elements from folder.
The requirements for geting gdal with python:
Check the python installation versions: Start>python 27>IDL(Python GUI)>Run>Python Shell
Take a look on the screen shot of Python Shell. It contains important information [MSC v.1500 32 bit (Intel)] on win32 what you need to download for your Computer.
Links to dowload GDAL and python binding for Gdal. Click the picture to access to the the link.
Note that you have to download GDAL and python binding for GDAL from same folder. Other wise it will not be sucessful at the end.
I have windows7 and I have python 2.7.10: I need to download from first links.
Then I have Downloaded the following files:
- gdal-111-1500-oracle.msi
- GDAL-1.11.4.win32-py2.7.msi---> this file contains your python version.
System Path Variable:
The installation is not only the core thing, you must have to change /add or update your sytem path to let python recognize Gdal packages.
How to change or add in System Path?
Sytem variable to work:
- path
- PYTHONPATH
- GDALDATA
Example:
path=C:\Python27\ArcGIS10.4\Lib;C:\Program Files (x86)\GDAL (change to add this to location more)
You have to locate python lib folder in PYTHONPATH system variable. I am using python with ArcGIS. So for me it look like the following:
PYTHONPATH=C:\Python27\ArcGIS10.4\Lib
It is very important to add GDALDATA system variable to make sure gdal work properly.
Here for my case gdal data:
GDALDATA= C:\Program Files (x86)\GDAL\gdal-data
After completing installation you will get a osgeo folder in your site-packagesfolder.
Example:
C:\Python27\ArcGIS10.4\Lib\site-packages\osgeo
To check gdal is properly installed run the folowing lines in your python shell:
from osgeo import ogr
from osgeo import osr
from gdalconst import *
from osgeo import gdal
If it works properly you are done!!!! Otherwise recheck the process.....
Online helpful Tutorials/discussions:
How to Install Gdal in Windows Machine
Install gdal on windows
stackexchange helpful question and answers
https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows
Subscribe to:
Posts (Atom)