From c4172e22908ef9e6be94359ebc88acf165d969aa Mon Sep 17 00:00:00 2001 From: Jeroen Schmidt Date: Fri, 6 Sep 2019 10:21:33 +0200 Subject: [PATCH] Updating rasterio affine call The latest version of rasterio (v1.0.21) has removed the call `.affine`. To get the affine object from the `rasterio.io.DatasetReader` object you must now call `.transform`. --- source/lessons/L6/zonal-statistics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lessons/L6/zonal-statistics.rst b/source/lessons/L6/zonal-statistics.rst index 68492e0..2348959 100644 --- a/source/lessons/L6/zonal-statistics.rst +++ b/source/lessons/L6/zonal-statistics.rst @@ -62,7 +62,7 @@ Quite often you have a situtation when you want to summarize raster datasets bas .. ipython:: python array = dem.read(1) - affine = dem.affine + affine = dem.transform - Now we can calculate the zonal statistics by using the function ``zonal_stats``. @@ -78,4 +78,4 @@ Okey. So what do we have now? print(zs_kallio) print(zs_pihla) -Super! Now we can see that ``Pihlajamäki`` seems to be slightly higher compared to ``Kallio``. \ No newline at end of file +Super! Now we can see that ``Pihlajamäki`` seems to be slightly higher compared to ``Kallio``.