changeset 0:828c02027180 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/earth commit 4cbace8c3a71b7a1638cfd44a21f5d4b84d2fd15
author ecology
date Mon, 21 Oct 2024 16:47:10 +0000
parents
children
files land_cover.py landcover_subindic.xml test-data/EU_CLC_1990.tiff test-data/EU_CLC_2018.tiff test-data/change_yf_yi0.shp test-data/landcover.json
diffstat 6 files changed, 1882 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/land_cover.py	Mon Oct 21 16:47:10 2024 +0000
@@ -0,0 +1,268 @@
+# Land Cover TE Algorithm Without GEE
+
+# How to Execute:
+# - Load the two images (.TIFF) of the rasters
+# to be processed in the "/data/land_cover/input" folder
+# - Setting the two filenames in the specific cell of this script (0)
+# - Run all cells of the script
+# - Check the script results in the "/data/land_cover/output" folder
+#    - Land Cover Degradation "/data/land_cover/output/lc_dg.tiff"
+#   - Land Cover Transition "/data/land_cover/output/lc_tr.tiff"
+
+# Librairies import
+import argparse
+import json
+import os
+import sys
+
+import matplotlib.pyplot as plt
+
+import numpy as np
+
+import rasterio
+from rasterio.plot import show
+
+from te_schemas.land_cover import LCLegendNesting
+from te_schemas.land_cover import LCTransitionDefinitionDeg
+
+# Methods to manage Rasters
+
+
+def remap(raster, problem_numbers, alternative_numbers):
+    n_min, n_max = raster.min(), raster.max()
+    replacer = np.arange(n_min, n_max + 1)
+    mask = (problem_numbers >= n_min) & (problem_numbers <= n_max)
+    replacer[problem_numbers[mask] - n_min] = alternative_numbers[mask]
+    raster_replaced = replacer[raster - n_min]
+    return raster_replaced
+
+
+def saveRaster(dataset, datasetPath, cols, rows, projection, namedataset=None):
+    if namedataset:
+        rasterSet = rasterio.open(datasetPath,
+                                  'w',
+                                  driver='GTiff',
+                                  height=rows,
+                                  width=cols,
+                                  count=1,
+                                  dtype=np.int8,
+                                  crs=projection,
+                                  transform=transform, )
+        rasterSet.write(dataset, 1)
+        rasterSet.close()
+    else:
+        rasterSet = rasterio.open(datasetPath,
+                                  'w',
+                                  driver='GTiff',
+                                  height=rows,
+                                  width=cols,
+                                  count=1,
+                                  dtype=np.int8,
+                                  crs=projection,
+                                  transform=transform, )
+        rasterSet.write(dataset, 1)
+        rasterSet.set_band_description(1, namedataset)
+        rasterSet.close()
+
+
+def plot(ndviImage, cmap):
+    src = rasterio.open(ndviImage, 'r')
+    fig, ax = plt.subplots(1, figsize=(12, 12))
+    show(src, cmap=cmap, ax=ax)
+    ax.set_xlabel('Est')
+    ax.set_ylabel('Nord')
+    plt.show()
+
+
+def plotContour(ndviImage, cmap):
+    src = rasterio.open(ndviImage, 'r')
+    fig, ax = plt.subplots(1, figsize=(12, 12))
+    show(src, cmap=cmap, contour=True, ax=ax)
+    ax.set_xlabel('Est')
+    ax.set_ylabel('Nord')
+    plt.show()
+
+
+# Setting inputs
+command_line_args = sys.argv[1:]
+
+
+parser = argparse.ArgumentParser(description="landcover inputs and outputs")
+# Add arguments
+parser.add_argument("--raster_1", help="raster 1")
+parser.add_argument("--raster_2", help="raster 2")
+parser.add_argument("--json", help="json")
+
+args = parser.parse_args(command_line_args)
+
+# Parse the command line arguments
+
+# Import data
+
+path_raster_yi = args.raster_1
+path_raster_yf = args.raster_2
+fjson = args.json
+# Input Rasters
+
+# Outputs
+out_dir = os.path.join(os.getcwd(), "data/land_cover/output/")
+if not os.path.exists(out_dir):
+    os.makedirs(out_dir)
+
+# Output Rasters
+path_lc_tr = os.path.join(out_dir, 'lc_tr.tiff')
+path_lc_bl = os.path.join(out_dir, 'lc_bl.tiff')
+path_lc_dg = os.path.join(out_dir, 'lc_dg.tiff')
+path_lc_tg = os.path.join(out_dir, 'lc_tg.tiff')
+path_change_yf_yi = os.path.join(out_dir, 'change_yf_yi.tiff')
+path_lc_baseline_esa = os.path.join(out_dir, 'lc_baseline_esa.tiff')
+path_lc_target_esa = os.path.join(out_dir, 'lc_target_esa.tiff')
+path_out_img = os.path.join(out_dir, 'stack.tiff')
+
+# Contours
+contours_change_yf_yi = os.path.join(out_dir, '/change_yf_yi0.shp')
+
+
+# Parsing Inputs
+# Load static inputs
+# Transition Matrix, ESA Legend, IPCC Legend
+# Input Raster and Vector Paths
+params = json.load(open(fjson))
+
+crs = params.get("crs")
+
+trans_matrix_val = params.get("trans_matrix")
+trans_matrix = LCTransitionDefinitionDeg.Schema().load(trans_matrix_val)
+
+esa_to_custom_nesting = LCLegendNesting.Schema().load(
+    params.get("legend_nesting_esa_to_custom")
+)
+
+ipcc_nesting = LCLegendNesting.Schema().load(
+    params.get("legend_nesting_custom_to_ipcc")
+)
+
+class_codes = sorted([c.code for c in esa_to_custom_nesting.parent.key])
+class_positions = [*range(1, len(class_codes) + 1)]
+
+# Load dynamic inputs
+# Baseline ESA Raster
+raster_yi = rasterio.open(path_raster_yi)
+lc_baseline_esa = raster_yi.read(1)
+yi_dict_profile = dict(raster_yi.profile)
+
+for k in yi_dict_profile:
+    print(k.upper(), yi_dict_profile[k])
+
+# Target ESA Raster
+raster_yf = rasterio.open(path_raster_yf)
+lc_target_esa = raster_yf.read(1)
+yf_dict_profile = dict(raster_yf.profile)
+
+for k in yf_dict_profile:
+    print(k.upper(), yf_dict_profile[k])
+
+cols = raster_yi.width
+rows = raster_yf.height
+transform = raster_yi.transform
+projection = raster_yi.crs
+
+# Setting up output
+saveRaster(lc_baseline_esa.astype('int8'),
+           path_lc_baseline_esa,
+           cols,
+           rows,
+           projection,
+           "Land_cover_yi")
+
+saveRaster(lc_target_esa.astype('int8'),
+           path_lc_target_esa,
+           cols,
+           rows,
+           projection,
+           "Land_cover_yf")
+
+# Algorithm execution
+# Transition codes are based on the class code indices
+# (i.e. their order when sorted by class code) -
+# not the class codes themselves.
+# So need to reclass the land cover used for the transition calculations
+# from the raw class codes to the positional indices of those class codes.
+# And before doing that, need to reclassified initial and
+# final layers to the IPCC (or custom) classes.
+
+# Processing baseline raster
+bl_remap_1 = remap(lc_baseline_esa,
+                   np.asarray(esa_to_custom_nesting.get_list()[0]),
+                   np.asarray(esa_to_custom_nesting.get_list()[1]))
+lc_bl = remap(bl_remap_1, np.asarray(class_codes), np.asarray(class_positions))
+
+saveRaster(lc_bl.astype('int8'),
+           path_lc_bl,
+           cols,
+           rows,
+           projection,
+           "Land_cover_yi")
+
+# Processing Target Raster
+tg_remap_1 = remap(lc_target_esa,
+                   np.asarray(esa_to_custom_nesting.get_list()[0]),
+                   np.asarray(esa_to_custom_nesting.get_list()[1]))
+lc_tg = remap(tg_remap_1, np.asarray(class_codes), np.asarray(class_positions))
+
+saveRaster(lc_tg.astype('int8'),
+           path_lc_tg,
+           cols,
+           rows,
+           projection,
+           "Land_cover_yf")
+
+# Processing Transition Map
+# Compute transition map (first digit for baseline land cover,
+# and second digit for target year land cover)
+lc_tr = (lc_bl * esa_to_custom_nesting.parent.get_multiplier()) + lc_tg
+
+# Compute land cover transition
+# Remap persistence classes so they are sequential.
+# This makes it easier to assign a clear color ramp in QGIS.
+lc_tr_pre_remap = remap(lc_tr,
+                        np.asarray(trans_matrix.get_persistence_list()[0]),
+                        np.asarray(trans_matrix.get_persistence_list()[1]))
+
+saveRaster(lc_tr_pre_remap.astype('int8'),
+           path_lc_tr,
+           cols,
+           rows,
+           projection,
+           "Land_cover_transitions_yi-yf")
+
+# Compute land cover degradation
+# definition of land cover transitions as degradation (-1),
+# improvement (1), or no relevant change (0)
+lc_dg = remap(lc_tr,
+              np.asarray(trans_matrix.get_list()[0]),
+              np.asarray(trans_matrix.get_list()[1]))
+
+saveRaster(lc_dg.astype('int8'),
+           path_lc_dg,
+           cols,
+           rows,
+           projection,
+           "Land_cover_degradation")
+
+# Compute  Mutlibands stack
+# Land Cover Degradation + Baseline ESA
+# + Target ESA + Land Cover Transition
+dg_raster = rasterio.open(path_lc_dg, "r")
+dg = dg_raster.read(1, masked=True)
+baseline_esa = rasterio.open(path_lc_baseline_esa, "r").read(1, masked=True)
+target_esa = rasterio.open(path_lc_target_esa, "r").read(1, masked=True)
+tr = rasterio.open(path_lc_tr, "r").read(1, masked=True)
+
+band_list = [dg, lc_baseline_esa, lc_target_esa, tr]
+out_meta = dg_raster.meta.copy()
+out_meta.update({"count": 4})
+
+with rasterio.open(path_out_img, 'w', **out_meta) as dest:
+    for band_nr, src in enumerate(band_list, start=1):
+        dest.write(src, band_nr)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/landcover_subindic.xml	Mon Oct 21 16:47:10 2024 +0000
@@ -0,0 +1,151 @@
+<tool id="landcover_subindicator" name="Land cover degradation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
+    <description>subindicator to track land changes</description>
+    <macros>
+        <token name="@TOOL_VERSION@">0.1.0</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="1.26.3">numpy</requirement>
+        <requirement type="package" version="3.8.4">matplotlib</requirement>
+        <requirement type="package" version="1.3.10">rasterio</requirement>
+        <requirement type="package" version="2.1.14">trends_earth_algorithms</requirement>
+        <requirement type="package" version="2.1.14">trends_earth_schemas</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+            #if '$method.json_file' == "no"
+                python '$__tool_directory__/land_cover.py'
+                --raster_1 '$raster_1'
+                --raster_2 '$raster_2'
+                --json '$json'
+            #else        
+                python '$__tool_directory__/land_cover.py'
+                --raster_1 '$raster_1'
+                --raster_2 '$raster_2'
+                --json '$__tool_directory__/test-data/landcover.json'
+            #end if
+
+    ]]></command>
+    <inputs>
+        <param name="raster_1" type="data" format="tiff" label="A raster image of the land at a reference year" />
+        <param name="raster_2" type="data" format="tiff" label="A raster image of the land at the year you want to study" />
+        <conditional name="method">
+            <param name="json_file" type="select" label="Do you want to use the default file json or your customized one ?" help="A file containing the land specifications, you can directly use the default one or you can customize it beforehand. The default one can be obtained at https://github.com/fair-ease/earth-critical-zone-galaxy/blob/main/landcover.json">
+                <option value="yes">Yes, use the standard land specification time</option>
+                <option value="no">No, I will provide my own.</option>
+            </param>
+            <when value="yes">
+            </when>
+            <when value="no">
+                <param name="json" type="data" format="json" label="A file containing the land specifications" help="You can customize as needed the default file https://github.com/fair-ease/earth-critical-zone-galaxy/blob/main/landcover.json"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <collection name="output_tiff" type="list" label="Land cover raster outputs">
+            <discover_datasets pattern="__name_and_ext__" directory="data/land_cover/output/" />
+        </collection>
+        <!--<collection name="output_png" type="list" label="Land cover plots">
+            <discover_datasets pattern="__name_and_ext__" directory="data/land_cover/" />
+        </collection>-->
+        <data name="contour" format="shp"  from_work_dir="data/land_cover/output/change_yf_yi0.shp" label="${tool.name} on ${on_string}" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="2">
+            <param name="raster_1" value="EU_CLC_1990.tiff"/>
+            <param name="raster_2" value="EU_CLC_2018.tiff"/>   
+            <param name="json_file" value="yes"/>
+            <output name="contour" value="change_yf_yi0.shp"/>
+            <output_collection name="output_tiff" type="list" count="7">
+                <element name="lc_baseline_esa" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>
+                <element name="lc_bl" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+                <element name="lc_dg" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+                <element name="lc_target_esa" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+                <element name="lc_tg" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+                <element name="lc_tr" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+                <element name="stack" ftype="tiff">
+                    <assert_contents>
+                        <has_text text="LAEA Europe"/>
+                        <has_size size="977"/>
+                    </assert_contents>
+                </element>    
+            </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+**What it does**
+This tool aims at facilitating the analysis of remotely-sensed datasets in support of monitoring land degradation. 
+This project contains common code used by the scripts in trends.earth.
+
+To assess changes in land cover users need land cover maps covering the study area for the baseline and target years. These maps need to be of acceptable accuracy and created in such a way which allows for valid comparisons. Trends.Earth uses ESA CCI land cover maps as the default dataset, but local maps can also be used. The indicator is computed as follows:
+
+    - Reclassify both land cover maps to the 7 land cover classes needed for reporting to the UNCCD (forest, grassland, cropland, wetland, artificial area, bare land and water).
+    - Perform a land cover transition analysis to identify which pixels remained in the same land cover class, and which ones changed.
+    - Based on your local knowledge of the conditions in the study area and the land degradation processed occurring there, use the table below to identify which transitions correspond to degradation (- sign), improvement (+ sign), or no change in terms of land condition (zero).
+    - This tool will combine the information from the land cover maps and the table of degradation typologies by land cover transition to compute the land cover sub-indicator.
+
+**Input**
+- One referenced raster of the land at an initial year
+- A second raster of the same location at a final study year 
+
+You can get these data on the `ESA (European Spatial Agency) website<https://www.esa-landcover-cci.org/?q=node/164>`. For more information follow the `Trends Earth doumentation<http://docs.trends.earth/en/latest/for_users/datasets/input_data.html>`
+
+- json file containing the 7 land cover classes. We specify by default a json feel free to customize it according to your need.
+
+
+In the json config file you find defined a way to map ESA land cover classes into (the 7) IPCC land cover classes.
+As a user you can add a new set of rules to map land cover classes from any system (ESA, CLC, …) to the IPCC ones. In the end, the user can do three different things:
+
+    - Use the default set of mapping rules findable on this `github repository<https://github.com/fair-ease/earth-critical-zone-galaxy/blob/main/landcover.json>`
+    - Modify an existent set of mapping rules with custom associations
+    - Add a new set of rules, useful for any custom map depicting land cover
+
+See also custom `land cover classes<http://docs.trends.earth/en/latest/for_users/training/settings.html#custom-land-cover-classes>`.
+
+**Output**
+- A potential Land degradation raster
+In the json config file there is also the definition of the transformation of the land use change into the three output classes (Degradation, Improvement, and Stable)
+
+For more information go on `the official trends earth documentation<http://docs.trends.earth/en/latest/for_users/features/unccdreporting.html>`
+
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+            @Manual{
+            title = {Trends.Earth. Conservation International},
+            year = {2022},
+            note = {http://trends.earth}
+            }
+        </citation>
+    </citations>
+</tool>
Binary file test-data/EU_CLC_1990.tiff has changed
Binary file test-data/EU_CLC_2018.tiff has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/change_yf_yi0.shp	Mon Oct 21 16:47:10 2024 +0000
@@ -0,0 +1,17 @@
+<html><head><title>Shapefile Galaxy Composite Dataset</title></head><p/>
+<div>This composite dataset is composed of the following files:<p/><ul>
+<li><a href="shapefile.shp" type="application/binary">shapefile.shp (Geometry File (shp))</a></li>
+<li><a href="shapefile.shx" type="application/binary">shapefile.shx (Geometry index File (shx))</a></li>
+<li><a href="shapefile.dbf" type="application/binary">shapefile.dbf (Columnar attributes for each shape (dbf))</a></li>
+<li><a href="shapefile.prj" type="application/binary">shapefile.prj (Projection description (prj))</a> (optional)</li>
+<li><a href="shapefile.sbn" type="application/binary">shapefile.sbn (Spatial index of the features (sbn))</a> (optional)</li>
+<li><a href="shapefile.sbx" type="application/binary">shapefile.sbx (Spatial index of the features (sbx))</a> (optional)</li>
+<li><a href="shapefile.fbn" type="application/binary">shapefile.fbn (Read only spatial index of the features (fbn))</a> (optional)</li>
+<li><a href="shapefile.fbx" type="application/binary">shapefile.fbx (Read only spatial index of the features (fbx))</a> (optional)</li>
+<li><a href="shapefile.ain" type="application/binary">shapefile.ain (Attribute index of the active fields in a table (ain))</a> (optional)</li>
+<li><a href="shapefile.aih" type="application/binary">shapefile.aih (Attribute index of the active fields in a table (aih))</a> (optional)</li>
+<li><a href="shapefile.atx" type="application/binary">shapefile.atx (Attribute index for the dbf file (atx))</a> (optional)</li>
+<li><a href="shapefile.ixs" type="application/binary">shapefile.ixs (Geocoding index (ixs))</a> (optional)</li>
+<li><a href="shapefile.mxs" type="application/binary">shapefile.mxs (Geocoding index in ODB format (mxs))</a> (optional)</li>
+<li><a href="shapefile.shp.xml" type="application/binary">shapefile.shp.xml (Geospatial metadata in XML format (xml))</a> (optional)</li>
+</ul></div></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/landcover.json	Mon Oct 21 16:47:10 2024 +0000
@@ -0,0 +1,1446 @@
+{
+    "crosses_180th": false,
+    "crs": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]",
+    "legend_nesting_custom_to_ipcc": {
+        "child": {
+            "key": [
+                {
+                    "code": 1,
+                    "color": "#787F1B",
+                    "description": null,
+                    "name_long": "Tree-covered",
+                    "name_short": "Tree-covered"
+                },
+                {
+                    "code": 2,
+                    "color": "#FFAC42",
+                    "description": null,
+                    "name_long": "Grassland",
+                    "name_short": "Grassland"
+                },
+                {
+                    "code": 3,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Cropland",
+                    "name_short": "Cropland"
+                },
+                {
+                    "code": 4,
+                    "color": "#00DB84",
+                    "description": null,
+                    "name_long": "Wetland",
+                    "name_short": "Wetland"
+                },
+                {
+                    "code": 5,
+                    "color": "#E60017",
+                    "description": null,
+                    "name_long": "Artificial",
+                    "name_short": "Artificial"
+                },
+                {
+                    "code": 6,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Other land",
+                    "name_short": "Bare land"
+                },
+                {
+                    "code": 7,
+                    "color": "#0053C4",
+                    "description": null,
+                    "name_long": "Water body",
+                    "name_short": "Water body"
+                }
+            ],
+            "name": "Custom Land Cover",
+            "nodata": {
+                "code": -32768,
+                "color": "#000000",
+                "description": null,
+                "name_long": "No data",
+                "name_short": "No data"
+            }
+        },
+        "nesting": {
+            "-32768": [
+                -32768
+            ],
+            "1": [
+                1
+            ],
+            "2": [
+                2
+            ],
+            "3": [
+                3
+            ],
+            "4": [
+                4
+            ],
+            "5": [
+                5
+            ],
+            "6": [
+                6
+            ],
+            "7": [
+                7
+            ]
+        },
+        "parent": {
+            "key": [
+                {
+                    "code": 1,
+                    "color": "#787F1B",
+                    "description": null,
+                    "name_long": "Tree-covered",
+                    "name_short": "Tree-covered"
+                },
+                {
+                    "code": 2,
+                    "color": "#FFAC42",
+                    "description": null,
+                    "name_long": "Grassland",
+                    "name_short": "Grassland"
+                },
+                {
+                    "code": 3,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Cropland",
+                    "name_short": "Cropland"
+                },
+                {
+                    "code": 4,
+                    "color": "#00DB84",
+                    "description": null,
+                    "name_long": "Wetland",
+                    "name_short": "Wetland"
+                },
+                {
+                    "code": 5,
+                    "color": "#E60017",
+                    "description": null,
+                    "name_long": "Artificial",
+                    "name_short": "Artificial"
+                },
+                {
+                    "code": 6,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Other land",
+                    "name_short": "Bare land"
+                },
+                {
+                    "code": 7,
+                    "color": "#0053C4",
+                    "description": null,
+                    "name_long": "Water body",
+                    "name_short": "Water body"
+                }
+            ],
+            "name": "UNCCD Land Cover",
+            "nodata": {
+                "code": -32768,
+                "color": "#000000",
+                "description": null,
+                "name_long": "No data",
+                "name_short": "No data"
+            }
+        }
+    },
+    "legend_nesting_esa_to_custom": {
+        "child": {
+            "key": [
+                {
+                    "code": 10,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Cropland, rainfed",
+                    "name_short": null
+                },
+                {
+                    "code": 11,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Herbaceous cover",
+                    "name_short": null
+                },
+                {
+                    "code": 12,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Tree or shrub cover",
+                    "name_short": null
+                },
+                {
+                    "code": 20,
+                    "color": "#76F1EF",
+                    "description": null,
+                    "name_long": "Cropland, irrigated or post-flooding",
+                    "name_short": null
+                },
+                {
+                    "code": 30,
+                    "color": "#DAEC6C",
+                    "description": null,
+                    "name_long": "Mosaic cropland (>50%) / natural vegetation (tree, shrub, herbaceous cover) (<50%)",
+                    "name_short": null
+                },
+                {
+                    "code": 40,
+                    "color": "#CDC369",
+                    "description": null,
+                    "name_long": "Mosaic natural vegetation (tree, shrub, herbaceous cover) (>50%) / cropland (<50%)",
+                    "name_short": null
+                },
+                {
+                    "code": 50,
+                    "color": "#006313",
+                    "description": null,
+                    "name_long": "Tree cover, broadleaved, evergreen, closed to open (>15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 60,
+                    "color": "#009E1D",
+                    "description": null,
+                    "name_long": "Tree cover, broadleaved, deciduous, closed to open (>15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 61,
+                    "color": "#009E1D",
+                    "description": null,
+                    "name_long": "Tree cover, broadleaved, deciduous, closed (>40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 62,
+                    "color": "#A3C329",
+                    "description": null,
+                    "name_long": "Tree cover, broadleaved, deciduous, open (15-40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 70,
+                    "color": "#003E0C",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, evergreen, closed to open (>15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 71,
+                    "color": "#003E0C",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, evergreen, closed (>40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 72,
+                    "color": "#00500F",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, evergreen, open (15-40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 80,
+                    "color": "#00500F",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, deciduous, closed to open (>15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 81,
+                    "color": "#00500F",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, deciduous, closed (>40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 82,
+                    "color": "#006313",
+                    "description": null,
+                    "name_long": "Tree cover, needleleaved, deciduous, open (15-40%)",
+                    "name_short": null
+                },
+                {
+                    "code": 90,
+                    "color": "#787F1B",
+                    "description": null,
+                    "name_long": "Tree cover, mixed leaf type (broadleaved and needleleaved)",
+                    "name_short": null
+                },
+                {
+                    "code": 100,
+                    "color": "#8A9C21",
+                    "description": null,
+                    "name_long": "Mosaic tree and shrub (>50%) / herbaceous cover (<50%)",
+                    "name_short": null
+                },
+                {
+                    "code": 110,
+                    "color": "#D09022",
+                    "description": null,
+                    "name_long": "Mosaic herbaceous cover (>50%) / tree and shrub (<50%)",
+                    "name_short": null
+                },
+                {
+                    "code": 120,
+                    "color": "#A86019",
+                    "description": null,
+                    "name_long": "Shrubland",
+                    "name_short": null
+                },
+                {
+                    "code": 121,
+                    "color": "#874913",
+                    "description": null,
+                    "name_long": "Shrubland evergreen",
+                    "name_short": null
+                },
+                {
+                    "code": 122,
+                    "color": "#A86019",
+                    "description": null,
+                    "name_long": "Shrubland deciduous",
+                    "name_short": null
+                },
+                {
+                    "code": 130,
+                    "color": "#FFAC42",
+                    "description": null,
+                    "name_long": "Grassland",
+                    "name_short": null
+                },
+                {
+                    "code": 140,
+                    "color": "#FFD9D1",
+                    "description": null,
+                    "name_long": "Lichens and mosses",
+                    "name_short": null
+                },
+                {
+                    "code": 150,
+                    "color": "#FFE7B0",
+                    "description": null,
+                    "name_long": "Sparse vegetation (tree, shrub, herbaceous cover) (<15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 151,
+                    "color": "#FFC16A",
+                    "description": null,
+                    "name_long": "Sparse trees (<15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 152,
+                    "color": "#FFCC7C",
+                    "description": null,
+                    "name_long": "Sparse shrub (<15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 153,
+                    "color": "#FFE7B0",
+                    "description": null,
+                    "name_long": "Sparse herbaceous cover (<15%)",
+                    "name_short": null
+                },
+                {
+                    "code": 160,
+                    "color": "#00785B",
+                    "description": null,
+                    "name_long": "Tree cover, flooded, fresh or brakish water",
+                    "name_short": null
+                },
+                {
+                    "code": 170,
+                    "color": "#009577",
+                    "description": null,
+                    "name_long": "Tree cover, flooded, saline water",
+                    "name_short": null
+                },
+                {
+                    "code": 180,
+                    "color": "#00DB84",
+                    "description": null,
+                    "name_long": "Shrub or herbaceous cover, flooded, fresh/saline/brakish water",
+                    "name_short": null
+                },
+                {
+                    "code": 190,
+                    "color": "#E60017",
+                    "description": null,
+                    "name_long": "Urban areas",
+                    "name_short": null
+                },
+                {
+                    "code": 200,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Bare areas",
+                    "name_short": null
+                },
+                {
+                    "code": 201,
+                    "color": "#DCDCDC",
+                    "description": null,
+                    "name_long": "Consolidated bare areas",
+                    "name_short": null
+                },
+                {
+                    "code": 202,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Unconsolidated bare areas",
+                    "name_short": null
+                },
+                {
+                    "code": 210,
+                    "color": "#0053C4",
+                    "description": null,
+                    "name_long": "Water bodies",
+                    "name_short": null
+                },
+                {
+                    "code": 220,
+                    "color": "#FFFFFF",
+                    "description": null,
+                    "name_long": "Permanent snow and ice",
+                    "name_short": null
+                }
+            ],
+            "name": "ESA CCI Land Cover",
+            "nodata": {
+                "code": -32768,
+                "color": "#000000",
+                "description": null,
+                "name_long": "No data",
+                "name_short": "No data"
+            }
+        },
+        "nesting": {
+            "-32768": [
+                -32768
+            ],
+            "1": [
+                50,
+                60,
+                61,
+                62,
+                70,
+                71,
+                72,
+                80,
+                81,
+                82,
+                90,
+                100
+            ],
+            "2": [
+                110,
+                120,
+                121,
+                122,
+                130,
+                140,
+                150,
+                151,
+                152,
+                153
+            ],
+            "3": [
+                10,
+                11,
+                12,
+                20,
+                30,
+                40
+            ],
+            "4": [
+                160,
+                170,
+                180
+            ],
+            "5": [
+                190
+            ],
+            "6": [
+                200,
+                201,
+                202,
+                220
+            ],
+            "7": [
+                210
+            ]
+        },
+        "parent": {
+            "key": [
+                {
+                    "code": 1,
+                    "color": "#787F1B",
+                    "description": null,
+                    "name_long": "Tree-covered",
+                    "name_short": "Tree-covered"
+                },
+                {
+                    "code": 2,
+                    "color": "#FFAC42",
+                    "description": null,
+                    "name_long": "Grassland",
+                    "name_short": "Grassland"
+                },
+                {
+                    "code": 3,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Cropland",
+                    "name_short": "Cropland"
+                },
+                {
+                    "code": 4,
+                    "color": "#00DB84",
+                    "description": null,
+                    "name_long": "Wetland",
+                    "name_short": "Wetland"
+                },
+                {
+                    "code": 5,
+                    "color": "#E60017",
+                    "description": null,
+                    "name_long": "Artificial",
+                    "name_short": "Artificial"
+                },
+                {
+                    "code": 6,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Other land",
+                    "name_short": "Bare land"
+                },
+                {
+                    "code": 7,
+                    "color": "#0053C4",
+                    "description": null,
+                    "name_long": "Water body",
+                    "name_short": "Water body"
+                }
+            ],
+            "name": "Custom Land Cover",
+            "nodata": {
+                "code": -32768,
+                "color": "#000000",
+                "description": null,
+                "name_long": "No data",
+                "name_short": "No data"
+            }
+        }
+    },
+    "trans_matrix": {
+        "definitions": {
+            "name": "Degradation matrix",
+            "transitions": [
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "improvement"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "degradation"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 1,
+                        "color": "#787F1B",
+                        "description": null,
+                        "name_long": "Tree-covered",
+                        "name_short": "Tree-covered"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 2,
+                        "color": "#FFAC42",
+                        "description": null,
+                        "name_long": "Grassland",
+                        "name_short": "Grassland"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 3,
+                        "color": "#FFFB6E",
+                        "description": null,
+                        "name_long": "Cropland",
+                        "name_short": "Cropland"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 4,
+                        "color": "#00DB84",
+                        "description": null,
+                        "name_long": "Wetland",
+                        "name_short": "Wetland"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 5,
+                        "color": "#E60017",
+                        "description": null,
+                        "name_long": "Artificial",
+                        "name_short": "Artificial"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 6,
+                        "color": "#FFF3D7",
+                        "description": null,
+                        "name_long": "Other land",
+                        "name_short": "Bare land"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                },
+                {
+                    "final": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "initial": {
+                        "code": 7,
+                        "color": "#0053C4",
+                        "description": null,
+                        "name_long": "Water body",
+                        "name_short": "Water body"
+                    },
+                    "meaning": "stable"
+                }
+            ]
+        },
+        "legend": {
+            "key": [
+                {
+                    "code": 1,
+                    "color": "#787F1B",
+                    "description": null,
+                    "name_long": "Tree-covered",
+                    "name_short": "Tree-covered"
+                },
+                {
+                    "code": 2,
+                    "color": "#FFAC42",
+                    "description": null,
+                    "name_long": "Grassland",
+                    "name_short": "Grassland"
+                },
+                {
+                    "code": 3,
+                    "color": "#FFFB6E",
+                    "description": null,
+                    "name_long": "Cropland",
+                    "name_short": "Cropland"
+                },
+                {
+                    "code": 4,
+                    "color": "#00DB84",
+                    "description": null,
+                    "name_long": "Wetland",
+                    "name_short": "Wetland"
+                },
+                {
+                    "code": 5,
+                    "color": "#E60017",
+                    "description": null,
+                    "name_long": "Artificial",
+                    "name_short": "Artificial"
+                },
+                {
+                    "code": 6,
+                    "color": "#FFF3D7",
+                    "description": null,
+                    "name_long": "Other land",
+                    "name_short": "Bare land"
+                },
+                {
+                    "code": 7,
+                    "color": "#0053C4",
+                    "description": null,
+                    "name_long": "Water body",
+                    "name_short": "Water body"
+                }
+            ],
+            "name": "Custom Land Cover",
+            "nodata": {
+                "code": -32768,
+                "color": "#000000",
+                "description": null,
+                "name_long": "No data",
+                "name_short": "No data"
+            }
+        },
+        "name": "Land cover transition definition matrix"
+    }
+}
\ No newline at end of file