Patrick Gray (patrick.c.gray at duke) - https://github.com/patrickcgray
Adapted from https://github.com/ceholden/open-geo-tutorial
Tutorial of basic remote sensing and GIS methodologies using the open source python geospatial ecosystem
What kind of python libraries make up a modern geospatial workflow? This is just a sample of what we consider to be the basic building blocks and what will be covered here:
shapely
for geometric analysisfiona
for reading in vector formatsrasterio
for reading in and working with raster formatsGeoPandas
to extend pandas
to work with geo formatsnumpy
and the python scientific computing stack for efficient computationmatplotlib
for general plotting and visualizationfolium
for advanced and interactive plottingscikit-learn
for machine learning based data exploration, classification, and regressionPython is an actual programming language with a large standard library
Scientific Python provides very well documented and easy to use interfaces to pre-existing numeric methods
Large community with innumerable examples on blogs, StackOverflow, Github, etc.
Develop Python plugins for QGIS
Script analyses in QGIS or ArcMap
Open-source!!!
There are many resources for doing remote sensing and GIS with Python on the web, but here are some of the better ones:
This tutorial will try to target Python 3.5 and greater. To ensure you're using a compatible version of Python, you can run the following:
! python --version
Python 3.8.10
at the command line.
Python 3 has many great new features (more informative stack traces, better unicode handling, asyncio
, matrix algebra notation using @
, and more) and is the future of the language. Unfortunately, some scientific packages (QGIS, for example) have not yet completed the transition away from Python 2. Unless you have good reason to use Python 2 (like if you're writing a QGIS plugin in Python), the general concensus is to recommend using Python 3.