@@ -0,0 +1,797 @@
+#! /usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# Exercise 7: Handling raster data with numpy, e.g., log transformation.%0A%0Aimport numpy as np%0A%0Afrom pygeoc.raster import RasterUtilClass%0A%0A%0Adef main():%0A    %22%22%22Read GeoTiff raster data and perform log transformation.%0A    %22%22%22%0A    input_tif = %22../tests/data/Jamaica_dem.tif%22%0A    output_tif = %22../tests/data/tmp_results/log_dem.tif%22%0A    rst = RasterUtilClass.read_raster(input_tif)%0A    # raster data (with noDataValue as numpy.nan) as numpy array%0A    rst_valid = rst.validValues%0A    output_data = np.log(rst_valid)%0A    # write output raster%0A    RasterUtilClass.write_gtiff_file(output_tif, rst.nRows, rst.nCols, output_data, rst.geotrans,%0A                                     rst.srs, rst.noDataValue, rst.dataType)%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

add ex07