.. _trasterexample: Examples used in this tutorial ______________________________ We use precipitation rasters from January to September 2016 obtained from CHIRPS to demonstrate the package. They are clipped to a shapefile with four subbasins in order to reduce their sizes. :download:`CHIRPS <../data/chirps-v2.0.2016.zip>` :download:`River basin <../data/basin_stations.zip>` You will see more below, but for now this is how the 274 clips were done: .. code-block:: python from girs.rast.raster import RasterReader from girs.feat.layers import LayersReader lrs = LayersReader('D:/tmp/girs/riverbasins.shp') env = lrs.get_extent() d_in, d_out = 'D:/tmp/girs/chirps_original', 'D:/tmp/girs/chirps' for f in os.listdir(d_in): r = RasterReader(os.path.join(d_in, f)) r.clip_by_extent(extent=env, scale=1.2, output_raster=os.path.join(d_out, f)) .. _chirps: .. figure:: images/chirps.jpg :width: 300pt