Skip to content

Commit 40bf7e4

Browse files
Iss19 (#21)
* soil_classes dev version * Updating Landsat information on the data chart * Updating README, adding information of the updated source .zip (and .tif) dataset address on CC Graham, updating information on the 2010 and 2015 versions and the static landcover change dataset * Adding UCalgary's copyright notices, modifying script to accept the new data structure for 2010 and 2015 GeoTIFFs and also the static difference dataset, making Shapefile extent extraction as a function for cleaning up, other minor syntax polish up * Adding necessary information for the updated dataset (2010 and 2015) and the difference GeoTIFFs * modifying the list of included gain and loss classes * adding updated examples for 2010 and 2015 years, adding separate example for the 2010-2015 difference dataset * adding more explanations for the two examples provided * removing soil_class for now as its inclusion in this branch was a mistake
1 parent c667ae5 commit 40bf7e4

File tree

5 files changed

+228
-50
lines changed

5 files changed

+228
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Script options:
5050
|**1**|MODIS |2000 - 2021 | |10.5067/MODIS/MCD12Q1.006 |[link](modis) |
5151
|**2**|MERIT Hydro |Not Applicable (N/A) |4326 |10.1029/2019WR024873 |[link](merit_hydro) |
5252
|**3**|Soil Grids (v1) |Not Applicable (N/A) |4326 |10.1371/journal.pone.0169748 |[link](soil_grids) |
53-
|**4**|Landsat NALCMS (2010, 30m) |Not Applicable (N/A) |4326 |10.3390/rs9111098 |[link](landsat) |
53+
|**4**|Landsat NALCMS |2010 and 2015 |4326 |10.3390/rs9111098 |[link](landsat) |
5454
|**5**|Global Depth to Bedrock |Not Applicable (N/A) | |10.1002/2016MS000686 |[link](depth_to_bedrock) |
5555

5656

example/landsat.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,29 @@ wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
3131
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";
3232

3333

34-
# implement subsetting and zonal statistics
34+
# Example 1: implement subsetting and zonal statistics on 2010 and 2015 landcover datasets
3535
./extract-gis.sh --dataset="landsat" \
3636
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
37-
--variable="NA_NALCMS_2010_v2_land_cover_30m" \
37+
--variable="land-cover" \
3838
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
3939
--print-geotiff=true \
4040
--output-dir="$HOME/scratch/landsat-test/" \
4141
--prefix="landsat_test_" \
42+
--start-date=2010 \
43+
--end-date=2015 \
4244
--stat="majority,minority,frac" \
4345
4446
-j;
4547

48+
# Example 2: implement zonal statistics for the 2010-2015 differences
49+
# GeoTIFFs (see relevant landsat directory of this repository)
50+
./extract-gis.sh --dataset="landsat" \
51+
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
52+
--variable="land-cover-change" \
53+
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
54+
--print-geotiff=false \
55+
--output-dir="$HOME/scratch/landsat-test/" \
56+
--prefix="landsat_test_" \
57+
--stat="majority,minority,frac" \
58+
59+
-j;

extract-gis.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ case "${geotiff,,}" in
340340
call_processing_func "$(dirname $0)/landsat/landsat.sh"
341341
;;
342342

343+
# soil_class
344+
"soil_class" )
345+
call_processing_func "$(dirname $0)/soil_class/soil_class.sh"
346+
;;
347+
343348
# dataset not included above
344349
*)
345350
echo "$(basename $0): missing/unknown dataset";

landsat/README.md

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,23 @@ And the structure of the files is as following:
1212

1313
```console
1414
/project/rpp-kshook/Model_Output/Landsat/
15-
├── NA_NALCMS_2010_v2_land_cover_30m.zip
16-
├── .
17-
├── .
18-
└── .
15+
├── land_change_2010v2_2015v2_30m_tif.zip
16+
├── land_cover_2010v2_30m_tif.zip
17+
├── land_cover_2015v2_30m_tif.zip
18+
└── dl-landcover.sh
1919
```
2020

2121
## Spatial and Temporal Extents
2222

23-
The spatial extent of this dataset (so far only `NALCMS` that is a land cover dataset) covers longitudes from approximately `-180` to `-50` degress and latitudes from approximately `+14` to `+84` degress. This dataset is static and does not vary with time.
23+
The spatial extent of this dataset (so far only `NALCMS` that is a land cover dataset) covers longitudes from approximately `-180` to `-50` degress and latitudes from approximately `+14` to `+84` degress. This dataset is available for 2010 and 2015. Furthermore, one static dataset variable is also included demonstrating the gains and losses of various land covers between 2010 and 2015. Please see the list of variables for more information.
2424

2525
## Dataset Variables
2626
This variables of this dataset are detailed in the table below:
2727

28-
|# |Variable Name (used in `gistool`) |Description |Comments |
29-
|-------|---------------------------------------|---------------------------------------|---------------|
30-
|1 |NA_NALCMS_2010_v2_land_cover_30m |Land cover classes |[link](http://www.cec.org/north-american-environmental-atlas/land-cover-2010-landsat-30m/)|
28+
|# |Variable Name (used in `gistool`) |Description |Comments |
29+
|-------|---------------------------------------|-----------------------------------------------|---------------|
30+
|1 |land-cover |Land cover classes for 2010 and 2015 |[2010 dataset info](http://www.cec.org/north-american-environmental-atlas/land-cover-2010-landsat-30m/) and [2015 dataset info](http://www.cec.org/north-american-environmental-atlas/land-cover-30m-2015-landsat-and-rapideye/)|
31+
|2 |land-cover-change |Land cover change (between 2010 and 2015) |[2010-2015 difference info](http://www.cec.org/north-american-environmental-atlas/land-cover-change-30m-2010-2015-landsat/)|
3132

3233

3334
# Other relevant information
@@ -58,3 +59,51 @@ Below the land cover types for each values of the `.tif` files is detailed based
5859

5960
Also, the details of the above table has been included in the following files: [landsat_classes.csv](./landsat_classes.csv).
6061

62+
## Land Cover Changes between 2010 and 2015
63+
The following file contains the following GeoTIFF data:
64+
```console
65+
/project/rpp-kshook/Model_Output/Landsat/land_change_2010v2_2015v2_30m_tif.zip
66+
├── NA_NALCMS_2010v2_2015v2_30m_barren_land_loss_and_gain.tif
67+
├── NA_NALCMS_2010v2_2015v2_30m_cropland_loss_and_gain.tif
68+
├── NA_NALCMS_2010v2_2015v2_30m_forest_loss_and_gain.tif
69+
├── NA_NALCMS_2010v2_2015v2_30m_grassland_loss_and_gain.tif
70+
├── NA_NALCMS_2010v2_2015v2_30m_shrubland_loss_and_gain.tif
71+
├── NA_NALCMS_2010v2_2015v2_30m_snow_ice_loss_and_gain.tif
72+
├── NA_NALCMS_2010v2_2015v2_30m_urban_loss_and_gain.tif
73+
├── NA_NALCMS_2010v2_2015v2_30m_water_loss_and_gain.tif
74+
├── NA_NALCMS_2010v2_2015v2_30m_wetland_loss_and_gain.tif
75+
└── NA_NALCMS_land_change_2010v2_2015v2_30m.tif
76+
```
77+
78+
Based on the metadata also available in the mentioned .zip file, the GeoTIFF data containing the `*_land_loss_and_gain.tif` phrase in their file name contain "[g]eneral land cover gains an losses [...] at the North American scale [...] for the following land cover class groups:"
79+
```
80+
1. Forest
81+
2. Shrubland
82+
3. Grassland
83+
4. Wetland
84+
5. Cropland
85+
6. Barren Land
86+
7. Urban and Built-up
87+
8. Water
88+
9. Snow and Ice
89+
```
90+
91+
And, the pixel values of the mentioned `.tif` files are as following:
92+
93+
|# |Pixel Value |Value Description |
94+
|-------|------------|------------------|
95+
|1 |1 |Gain |
96+
|2 |2 |Loss |
97+
98+
Furthermore, the GeoTIFF data named `NA_NALCMS_land_change_2010v2_2015v2_30m.tif` also contains the landcover change data. Each pixel value of the GeoTIFF file contains information regarding transformations between different landcover classes of the dataset at the North American scale. Each pixel values of the file contains three or four digits, with "[t]he first one or two digits in each pixel value show the land cover class in 2010, while the third and four digits show the land cover class in 2015." An example of digit values are given in the following:
99+
100+
```
101+
105 = Class 1 to 5 "Temperate or sub-polar needleleaf forest" to "Temperate or sub-polar broadleaf deciduous forest"
102+
206 = Class 2 to 6 "Sub-polar taiga needleleaf forest" to "Mixed forest"
103+
814 = Class 8 to 14 "Temperate or sub-polar shrubland" to "Wetland"
104+
915 = Class 9 to 15 "Tropical or sub-tropical grassland" to "Cropland"
105+
1018 = Class 10 to 18 "Temperate or sub-polar grassland" to "Water"
106+
1502 = Class 15 to 02 "Cropland" to "Sub-polar taiga needleleaf forest"
107+
1716 = Class 17 to 16 "Urban and built-up" to "Barren land"
108+
1913 = Class 19 to 01 "Snow and ice" to "Sub-polar or polar barren-lichen-moss"
109+
```

0 commit comments

Comments
 (0)