homecloud computingcloud data Processingcloud of thingsclound of networks
cloud data processing

PostGIS Python Programming

Duration: 5 Days

Course Background

This course is aimed at PostGIS and QGIS application developers and geographic data analysts who wish to learn how to use Python scripting to develop and automate POstGIS and QGIS tasks and to extend the data analytical capabilities of PostGIS via Python scripting.

Course Prerequisites and Target Audience

Attendees are assumed to have a working knowledge of PostGIS / QGIS and some knowledge of programming. No particular knowledge of Python is assumed as the course will provide an intensive introduction to all the Python concepts and syntax needed.

Course Outline

  • Rationale for adding scripting capabilities to PostGIS and QGIS
  • Python as a versatile "glue language"
  • Python and PostGIS / QGIS
    • Introduction to Python
    • Scripting vs. Programming
    • Using scripting with PostGIS and QGIS
    • Python development environments
    • Overview of PostGIS and QGIS Geoprocessing with Python
      • Geoprocessing concepts
      • Overview of QGIS, PostGIS, GRASS , Mapnik and MapServer
      • QGIS Python plugins - an overview
      • RTree and pyrtree python spatial indexing
  • Python Programming
    • Python data types and structures
    • Python numeric types
    • Variables, statements and expressions
    • Strings
    • Lists and Tuples
    • Dictionaries
    • Sets
    • Input and output in Python
  • QGIS and PostGIS Geoprocessing with Python
    • Python Geospatial programming tools - Shapely and Fiona
    • Manipulating and analysing planar geometric objects with Shapely and Python
    • Overview of geographic vector data manipulation and OGR
    • Reading and writing geographic vector with OGR data using python and Fiona
  • Exploring and Manipulating Spatial Data
    • Describing data
    • Listing data
    • Querying PostGIS and PostgreSQL with Python
    • Reading and writing geometries to PostGIS with Python
    • Working with rasters
  • Map Scripting
    • Overview of the Mapnik toolkit
    • Map documents
    • Data frames
    • Layers
    • Page layouts
    • Exporting and printing maps
  • Testing and Debugging
    • Python's exception handling mechanisms
    • Techniques for debugging Python code
    • Introduction to Unit Testing - concepts and practice
    • Unit testing python code
  • Extending PostGIS and QGIS
    • Overview of Python packages and modules
    • Principles of structured modular Python programming
    • Python object oriented programming explained
    • Devising and extending custom Python classes