GIS, Cartographic and Spatial Analysis Tools: Python

This guide provides an overview of geographic software, libraries and tools supported by or recommended by RDS staff.

Python is an open-source, interpreted programming language that has been broadly adopted in the geospatial community.  For new Python users we recommend installing via Anaconda,  an easy-to-install free package manager, environment manager, Python distribution, and collection of over 720 open source packages offering free community support. 

Python in GIS platforms

ESRI:

The full suite of ArcGIS geoprocessing tools are available in python through the ArcPy library.  Unlike the other libraries on this page, ArcPy is proprietary and not available for free.  You can access ArcPy in RDS or at any of the other computer labs on campus that offer ArcGIS pro. You can also get an educational license through the GIS Service Center at CIESIN.  Note, users who are still using ArcGIS 10.x or earlier will need to install Python 2.7 to use ArcPy.  ArcGIS Pro is compatible with Python 3.x

ArcPy can be run outside of ArcGIS, but is often most useful when used in ModelBuilder, ESRI's visual programming language for building geoprocessing workflows. External Python packages can be integrated into ArcGIS workflows using the Python Package Manager.

As of the version 2.5 of ArcGIS Pro you can write and execute Python code using ArcGIS Notebooks which are built on top of Jupyter Notebooks.

QGIS

Python can be used in QGIS though a python console and API.  See the PyQGIS Developer Codebook for more information.

Python Packages

GeoPandas may be the most important library for working with vector based geospatial data in Python.  It builds on the geometric operations in Shapely and the datatypes in Pandas.

GDAL is a translator library for a wide variety of raster and vector data formats. 

PyProj is the Python interface to the PROJ cartographic projections and coordinate transformations library.

PySAL The Python Spatial Analysis library provides tools for spatial data analysis including cluster analysis,  spatial regression, spatial econometrics as well as exploratory analysis and visualization. 

Matplotlib is a popular library for plotting and interactive visualizations including maps.  Built on top of NumPy 

RSGISLib is the Remote Sensing and GIS Software library for working with remote sensing and imagery data. Variety of raster based tools including image calibration and classification. 

Geopy - geocoding client for several popular geocoding web services including Nominatim and Google.