Rasterio 1.0.20

We have some good changes since the last time I blogged about the project: https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L4-L24.

Rasterio can now read and write signed 8-bit integer ("int8") datasets. I don't see these at work, but some people do, and one of them, Kirill Kouzoubov, sent the pull request to make it happen.

Tapping into the same latent GDAL library feature that makes int8 support possible, we've added an out_dtype parameter to the read() method of dataset objects. Data can now be cast to different types on the fly, making code like dataset.read().astype("float32") obsolete. Now, you would do dataset.read(out_dtype="float32") instead and enjoy reduced memory allocation.

Kirill, again, showed us exactly how to nail the use case of unsigned requests for public datasets on AWS (like the Landsat 8 PDS) which don't require help from boto3.

Lastly, we've added a linear_units property to the CRS class so that users can get the units of a reference system. For example:

>>> from rasterio.crs import CRS
>>> CRS.from_epsg(2231).linear_units
'US survey foot'

Share and enjoy.