Python Libraries for Geospatial Analysis

There are many Python packages and libraries that you can use in geospatial analysis. The following are some of the examples:

  • Fiona: a library that can read and write real-world data using multi-layered GIS formats, zipped and in-memory virtual file systems, from files on your hard drive or in cloud storage.
  • GeoPandas: an open source project to make working with geospatial data in python easier. GeoPandas builds on pandas to allow spatial operations on geometric types.
  • Shapely: a library used for manipulation and analysis of planar geometric objects. It is using the widely deployed open-source geometry library GEOS.
  • Rasterio: a library that reads and writes GeoTIFF and other formats. These formats are useful in organizing and storing gridded raster datasets such as satellite imagery and terrain models.
  • Pyproj: Python interface to PROJ (cartographic projections and coordinate transformations library). PROJ is a coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another.
  • Folium: this library builds on the data wrangling capabilities of the Python environment and the mapping strengths of the leaflet.jslibrary.
  • OSMnx: OSMnx is a Python package that leverages data from OpenStreetMap and model, project, visualize, and analyze real-world street networks.

This list is partly inspired by the article by Abhinaba Banerjee. Check the article here for more in-depth description of the libraries and some code examples.