Slithering into GIS - An intro to making maps with Python

by Clinton Dow Geo Python

An introduction to GIS concepts and how Python fits in to the picture

  • Many different backgrounds and experience levels
  • Not much code, introducing the concepts instead!
  • About me
  • What is GIS Anyways?
  • Geospatial Developers
  • Python in GIS
  • Python Geospatial Libraries
  • Geospatial Data
  • Databases
  • On the web
  • Geospatial is just getting started!

About me

  • Computer nerd for basically my whole life
  • Python Programmer for approximately 5 years
    • Started because of Civilization IV & V video game
      • Programming for fun becomes programming for profit
  • Python product engineer
    • Works with Python nearly 40 hours per week
  • Attends numerous tutorials, conventions etc
    • Great way to build your skills quickly
    • Meet like-minded people who will inspire you!

What is GIS anyways?

GIS

Geographic Information Systems

  • An evolving field of study
  • Not any one specific software platform, job or technique
  • How to represent geospatial data as information
  • Kind of like defining 'Programming'

Some concepts that fall under Geographic Information Systems

  • Data Collection
  • Geoprocessing
  • Geocoding
  • Cloud Computing
  • Cartography
  • Data Visualization
  • Big Data
  • Many more...

GIS is found in, or supports every major (and many minor) organization and business

  • Government
  • Armed Forces
  • Natural Resources
  • Utilities
  • Financial
  • Engineering and Construction
  • Environmental
  • Marketing
  • Insurance
  • Real Estate
  • Supply Chain Management
  • Telecom

A Geographic Information System

  • An implementation of one or more concepts from GIS
  • Commonly refered to as GIS Tools or GIS Applications GIS App

Many different GIS applications have become part of our lives

  • News
  • Traffic
  • Weather
  • Social Networking
  • Dating

GIS Tools often work together as a GIS platform.

GIS Platforms are like IDEs for GIS.

GIS Platform

  • ArcGIS
  • QGIS
  • Mapbox
  • PostGIS
  • Google Earth
  • ENVI
  • Feature Manipulation Engine (FME)

All major GIS platforms have Python API/SDKs

Many GIS Developers customize GIS Platforms.

  • Scripting GIS Tools
  • Modifying functionality
  • Developing plugins
  • Combining multiple platforms' functionality

GIS/Geospatial Developers

GisDev

Are in high demand!! Especially those with demonstratable Python skills.

Python can be found in almost all facets of Geospatial Development:

  • Web GIS
  • App development
  • Embedded systems
  • IoT
  • Data Dashboards
  • Geoprocessing
  • etc..

It can be a demanding role, but very rewarding!

  • Requires knowledge of geography and programming, often additional skills
  • Constantly evolving field
  • Supports many different industries and organizations
  • Vaguely defined role at many companies
  • Many new and exciting opportunities
  • Never boring
  • Outstanding potential for entrepeneurs
  • Define your own role!

How does Python fit into all of this?

  • A powerful and robust language out of the box
  • Many open-source geospatial libraries
  • Supported by every major GIS Platform (API/SDK)
  • Supported by every major Database Platform
  • Powerful web frameworks
    • Django for fully featured web applications
    • Flask for service-oriented web APIs
  • Involved, passionate community

Python Open Source Geospatial Libraries

Reading and Writing Geospatial Data

  • GDAL/OGR
  • Fiona

These libraries allow you to work with various data types that are not accessible in pure Python. Convert Data

Projections

  • pyproj

A projection defines how the spherical surface of the earth is displayed on a flat surface

  • Paper maps
  • Computer Screens Projections

Analyzing and Manipulating Geospatial Data

  • Shapely
  • PySAL
  • Pandas/Geopandas

Perform Geoprocessing, joins and relates and map algebra on geospatial data. gp

Plotting Geospatial Data

  • Mapnik
  • matplotlib w/ Basemap Toolkit & pyplot
  • Descartes

Draw the actual map on the screen. MTL

Geospatial Data

Two main categories of Geospatial Data vecras

Vector Data

  • Points, Lines and Polygons
  • Individual features hold values
  • Locations of addresses
  • Road Networks
  • Boundaries
  • Discrete data

Vector

Raster Data

  • 'Grids' of data
  • Cells hold values
  • Images
  • Height maps
  • Temperature maps
  • Continuous data Raster

Sources of Vector Data: OpenStreetMap World Borders Dataset Twitter (Location-enabled Tweets) Government open data portals GPS Points Survey Data

Sources of Raster Data: Satellite Photography LandSat Natural Earth Aerial Photography Sensor Arrays (ie: Weather Sensors) National Elevation Dataset

Databases

Geospatial Databases are just regular databases with geospatial querying/indexing capabilities. Every major geospatial database has a Python API

Examples of Python APIs for geospatial databases:

- SQLAlchemy
- arcpy
- psycopg
- cartodb-python
- cloudant-python
- etc

Two main things that make a database 'geospatial':

  • Spatial Indexes
  • GIS Metadata
  • Can be a relational or NoSQL database Spatial Index

Relational

  • MySQL
  • Postgre/PostGIS
  • Oracle
  • etc

NoSQL

  • CartoDB
  • CouchDB
  • Cloudant
  • etc

On the web

Web GIS is a huge area of growth in the geospatial industry.

  • Not just webmaps
  • Apps
  • Dashboards

Web frameworks allow you to build your own web GIS tools and platforms. webgis

Web GIS tools are typically offered as endpoints in a Service Oriented Architecture (SOA) model

  • REST
  • SOAP

Frameworks

  • GeoDjango
  • Folium
  • Papyrus

Web GIS Platforms offer pre-created services for use with your data.

Platforms

  • ArcGIS Online
  • Boundless (OpenGeo)
  • Mapbox
  • Google Maps
  • GeoServer
  • Many more...

Wrapping it all up

Geographic Data

The 'Geography' in Geographic Information Systems

  • Data acquisition
    • Surveying
    • GPS
    • Location-enabled Apps
  • Data representation
    • Vectors
    • Rasters
    • Projections

Data != Information

The 'Information' in Geographic Information Systems

  • Converting raw data into meaningful information
    • Databases
    • Services
  • Using techniques such as
    • Geoprocessing
    • Spatial statistics
    • Map Algebra
    • Joins & relates
    • Queries
  • Represented via
    • Charts and graphs
    • Cartography

Content Delivery Systems

The 'Systems' in Geographic Information Systems

  • How do you deliver the information to a user?
    • Paper maps/atlases
    • Webmaps
    • Dashboards
    • Applications
  • Supported by
    • Improved publishing process
    • Web server administration
      • DevOps
    • System Security
    • Wearables
    • Ubiquitous computing

The future of GIS is very promising!

  • Proliferation of location-enabled devices
  • Big Data
  • Cloud computing
  • Machine learning
  • Virtual Reality/Augumented Reality
  • Ubiquitous Computing

Plenty of opportunities in GIS Development

  • One of the largest growth occupations in recent years
  • Innovative products and ideas
  • Tons of open source projects
  • Opportunities in all aspects of I.T. and Development.

Finding a job as a GIS Developer

  • Meetups
    • Try to meet at least one new person at each meetup!
  • Open source
  • Conferences
    • Esri UC
    • PyCon

Thank you for coming!

Slides available at - Contact Information - clint@datanavigator.ca

                - @DataNavigator