00:00

Empowering Spatial Analysis with SpaPy: A Python Library for Geospatial Tasks

A student developed a program to identify potential illegal campsites, which led to the creation of SpaPy - a Python library for diverse spatial data tasks. SpaPy supports shapefiles, raster formats, and GeoJSON, providing geospatial processing, analysis, and visualization capabilities. It utilizes open-source libraries such as numpy, scipy, shapely, pyproj, PIL, and osgeo, making it flexible and accessible for GIS professionals.

alerm
Download Presentation

Empowering Spatial Analysis with SpaPy: A Python Library for Geospatial Tasks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Spatial Programming • A student who worked for the National Wilderness Preservation System (NWPS) wrote a program to find areas with a high potential for illegal campsites: – Near trails, but not too near – With something to block the view from the trails (i.e. trees) – Near water • He was then asked to do this for all 800 wilderness areas in the US!

  2. More Spatial Programming • A student worked for a company that was analyzing the impact of palm oil mills in Indonesia. • Then, he was asked to do to it for the other 608!

  3. And More… • I’m processing over 10,000 LiDAR files to create a 1 meter DEM for the Eel/Wiyot River watershed • I’ve processed Microsoft's building footprints for the US dataset to get all the building footprints for Humboldt County • Etc.

  4. What we need • We need to be able to work with a diverse array of spatial data to complete challenging tasks. • For this, we need a Python library that: – Loads and saves standard file formats (shapefiles, TIFF) – Includes spatial processing and analysis – Includes visualizing of data – Is reliable, expandable, and relatively easy to use for GIS folks.

  5. Situation • Esri provides a Python connector for ArcGIS Pro. It is slow, relatively hard to use, and we cannot expand it. It also requires an Esri license. • QGIS does not provide a Python connector • The open-source world has a variety of libraries available – Some work well – Some are nightmares! – And there are compatibly issues

  6. Solution? • Create our own library • SpaPy was created by students and myself over the last 5 years. • It provides: – Support for shapefiles, all raster formats supported by GDAL, and now GeoJSON – Standard geospatial processing and analysis – Viewing of data and rendering to image files – Pretty well documented and tested – Expandable and allows access to data

  7. Open Source Libraries • numpy – numeric functions • scipy – scientific functions • shapely – data types for working with points, polygons, and polylines (line strings in open source terminology) • pyproj – projecting data in SpaReferencing • PIL (Pillow) – rendering maps to images in SpaView

  8. Open Source Libraries • matplotlib – creating maps in charts in SpaPlot (largely replaced by SpaView) • osgeo – wrapper for the GIS libraries: – gdal – raster file I/O and some other useful functions – osr – source reference definitions – ogr – vector file I/O • shapefile (PyShp) – note that this library is imported as “shapefile” but installed as “pyshp”.

  9. Using SpaPy • The SpaPy.org website contains installation instructions and tutorials • For the next several weeks, we’ll be following those tutorials. • Then, we’ll come back to learn more Python so we can do even more cool stuff.

More Related