Rasterio
The GDAL
library we introduced earlier in this chapter is extremely powerful, but it wasn’t designed for Python. The rasterio
library solves that problem by wrapping GDAL in a very simple, clean Pythonic API for raster data operations.
This example uses the satellite image from the GDAL example in this chapter. We’ll open the image and get some metadata as follows:
import rasterio ds = rasterio.open("SatImage.tif") ds.name 'SatImage.tif' ds.count 3 ds.width 2592 ds.height 2693
Next up, we’ll examine a powerful library that works with the crowd-sourced Open Street Map data and can even do routing.