Vector data

Authors: David Shean & Scott Henderson

SnowEx Hackweek July 13, 2021

Learning Objectives

A 30 minute guide to vector data for SnowEX Hackweek

  • find, visualize, interpret vector data formats

  • use Python raster libraries geopandas

GeoPandas

pandas is great, but what if we want to do some geospatial operations - like reproject our vector data or compute the intersection between Point and Polygon features?

Enter Geopandas - all the great things about pandas, plus geo! (http://geopandas.org/).

“GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types. Geometric operations are performed by shapely. Geopandas further depends on fiona for file access and descartes and matplotlib for plotting.”

“GeoPandas enables you to easily do operations in python that would otherwise require a spatial database such as PostGIS.”

Under the hood, GeoPandas is pandas plus some other core geospatial packages:

Under those hoods are lower-level geospatial libraries (GEOS, GDAL/OGR, PROJ), written in C/C++/Java and compiled (fast!), that provide a foundation for most GIS software (open-source and commercial). I encourage you to explore these - I guarantee you will learn something valuable.

For now, let’s explore some basic geopandas functionality.

import geopandas as gpd
import hvplot.pandas
import holoviews as hv