Wednesday, January 11, 2017

GIS programming in "pure Python" Vs "GIS-software"

Hello there,
Thank you for stopping by to read about "Python GIS programming" on my blog!

Basically, Python GIS programming is either done in "pure Python" or "GIS-software". By saying "pure Python" I mean using python GIS modules/packages such as the once listed below. And by saying "GIS-software", I am referring to software that supports python GIS scripting such as ArcGIS - ArcPy, QGIS - PyQGIS, etc.


List of python GIS modules/packages:

  • GDAL –> Fundamental package for processing vector and raster data formats (many modules below depend on this). Used for raster processing.
  • Geopandas –> Working with geospatial data in Python made easier, combines the capabilities of pandas and shapely.
  • Shapely –> Python package for manipulation and analysis of planar geometric objects (based on widely deployed GEOS).
  • Fiona –> Reading and writing spatial data (alternative for geopandas).
  • Pyproj –> Performs cartographic transformations and geodetic computations (based on PROJ.4).
  • Pysal –> Library of spatial analysis functions written in Python.
  • Geopy –> Geocoding library: coordinates to address <-> address to coordinates.
  • GeoViews –> Interactive Maps for the web.
  • Networkx –> Network analysis and routing in Python (e.g. Dijkstra and A* -algorithms), see this post.
  • Cartopy –> Make drawing maps for data analysis and visualization as easy as possible.
  • Scipy.spatial –> Spatial algorithms and data structures.
  • Rtree –> Spatial indexing for Python for quick spatial lookups.
  • Rasterio –> Clean and fast and geospatial raster I/O for Python.
  • RSGISLib –> Remote Sensing and GIS Software Library for Python.



These modules/packages provide support for Python GIS scripting in the areas of Data analysis & visualization:

  • Numpy –> Fundamental package for scientific computing with Python
  • Pandas –> High-performance, easy-to-use data structures and data analysis tools
  • Scipy –> A collection of numerical algorithms and domain-specific toolboxes, including signal processing, optimization and statistics
  • Matplotlib –> Basic plotting library for Python
  • Bokeh –> Interactive visualizations for the web (also maps)
  • Plotly –> Interactive visualizations (also maps) for the web (commercial - free for educational purposes)
  • Seaborn -> a data display library in Python based on matplotlib. The idea of Seaborn is that data scientists have an interface to create attractive and explanatory statistical graphs: the goal is to display complex data easily and draw conclusions.
  • Pygal -> primarily used for creating graphics in SVG format, which is common for creating interactive displays for digital projects. It also makes it possible to download graphics in image format, specifically in .png, but the dependencies that allow it must be installed.

List of GIS software that support python scripting:

  • ArcGIS - ArcPy
  • QGIS - PyQGIS
  • GRASS - wxPython


Advantages and Disadvantages of Python GIS programming in "pure Python" or "GIS-software"

Advantages:
1) Using pure python GIS packages, gives you freedom to code on any platform.

2) Using pure python GIS packages, eliminates the cost of purchasing an expensive licences such as ESRI ArcGIS.

3) Using pure python GIS packages, you don't have to install a heavy duty GIS software engine.

4) You can create standard alone software and you can easily share your script (as .py or .exe files) to others who don't have GIS software installed on their PC.

5) Using Python supports open source softwares/codes and open science by making it possible for everyone to reproduce your work, free-of-charge.



Disadvantages:
1) Steep learning curve as you have to learn both Python and the GIS software you are working with.

2) Another drawback is that Python GIS modules are created by different developers. This means that you need to familiarize yourself with many different modules (and their documentation), whereas in using ArcGIS or QGIS, everything is packaged under a same module called ArcPy or PyQGIS respectively.


Happy coding.

No comments:

Post a Comment