These are the joining instructions for the Geospatial Python Analytics – February 26th 2020 at HR Wallingford. For any further information on joining instructions please email Andrew firstname.lastname@example.org
To really get the value from this day course it would be good to have
a) had 1-2 years experience with Python. and
b) some experience with Geospatial Python
If you cannot write for loops, understand data types, conditional statements etc then this course will not be suitable for you.
I understand and appreciate that everyone has their own unique computer setup. This is something that can cause Python users some problems. It can be confusing.
Because of this I recommend you install Anaconda. However you can use your own setup if you prefer.
Recommended Python Set up (Windows)
Important please check before course starts
I recommend using Anaconda https://www.anaconda.com/download/ This course is for Python 3
You may need to open the Anaonda Prompt as an Administrator, by doing this it should remove any permission errors. Right click and select Run As Administrator.
If you can type ‘python’ into a the anaconda prompt then you should be good to go
type exit() to leave the Python environment and return to the command prompt. It will look like
(base) your directory (eg C:/users/…)
To install gdal (the most critical step).
conda install -c conda-forge gdal
It may take a while eventually you will get a prompt asking whether you wish to install, select Y (for yes) and press enter.
Please also install the following packages
conda install -c conda-forge opencv=3.3.1
Depending on your Python version you may need to install opencv=4.2.0
We will not be relying the following libraries but I recommend installing them as default and they are useful, and may aid your learning.
conda install -c anaconda scikit-learn
conda install -c anaconda scikit-image
raster stats install
conda install -c conda-forge rasterstats
conda install -c anaconda scipy
conda install -c anaconda rasterio
conda install -c conda-forge geopandas
Shapely install (we will not be using this on this course, but it is well worth installing)
conda install -c conda-forge shapely
Open an anaconda prompt and check that gdal is installed
from osgeo import gdal,ogr
type exit() to leave the Python environment
Anaconda comes pre cooked with jupyter notebook
type (you might wish to change directory, for example, to the root of D: first –
into the command prompt and it should open up a web browser within your directory of all your folder/files and notebooks.
I have written two detailed blog posts that should be of help if you have any issues
I will cover Jupyter Notebooks in this course, so you don’t need to read this post.
Further useful software
A note on Mac installation.
I run this course on a Windows 10 machine. If you need to install gdal on a Mac then I have been told that the following commands work:
conda install -c conda-forge/label/cf201901 gdal
I think that ensures gdal is correctly installed.
To check I had gdal on the system
conda install krb5
Apparently this is a dependency of gdal but isn’t installed by default.
I don’t have access to a Mac so please let me know if this doesn’t work (I am not sure what will work if it doesn’t)
Please attempt to install gdal prior to attending the course, it is not fair on the other attendees if you don’t have a working installation and we have to spend time getting you setup.
I run the course through a folder on my computer. I suggest you create a folder on your machine
Please download the course data (60mb) data_package_analytics
Extract this to
I will make the course code available at the start of the afternoon. I would like you to try and follow the examples as we go, but don’t worry about mistakes this is all good practice.
Throughout the course as our learning progresses I have created a couple of challenges. These are to aid your learning, help you practice. The aim is to experiment try new things.
We will cover
- Loading and plotting images
- Colour Transforms and thresholding
- Interactive opencv
- Example of counting objects
We will start at 1:30pm and finish at 4:30pm
Please contact me with any questions email@example.com