GIS Conversion Tools

The stems.gis.convert module contains dispatch functions to convert representations of fundamental GIS data (projections, transforms, bounding boxes, and polygons) to the standard types used internally to this package.

These “standard types” for GIS data variables are the following:

GIS

Object Type

Affine transform

affine.Affine

Coordinate Reference System

rasterio.crs.CRS

Bounding Box (extent)

rasterio.coords.BoundingBox

Bounding Box (polygon)

shapely.geometry.Polygon

The conversion functions:

to_transform(value[, from_gdal])

Convert input into an affine.Affine transform

to_crs(value)

Convert a CRS representation to a rasterio.crs.CRS

to_bounds(value)

Convert input to a rasterio.coords.BoundingBox

to_bbox(value)

Convert input a bounding box shapely.geometry.Polygon