Skip to content

Commit

Permalink
Merge pull request #396 from digitalearthafrica/cm_ows
Browse files Browse the repository at this point in the history
Add crop mask southeast to OWS
  • Loading branch information
cbur24 authored Mar 1, 2022
2 parents f45f306 + 4895937 commit 6f29ce8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 8 deletions.
14 changes: 13 additions & 1 deletion services/inventory/dev_af/inventory.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"total_layers_count": 37,
"total_layers_count": 38,
"layers": [
{
"layer": "s2_l2a",
Expand Down Expand Up @@ -396,6 +396,18 @@
"prob"
]
},
{
"layer": "crop_mask_southeast",
"product": [
"crop_mask_southeast"
],
"styles_count": 3,
"styles_list": [
"green",
"filtered_yellow",
"prob"
]
},
{
"layer": "crop_mask_western",
"product": [
Expand Down
14 changes: 13 additions & 1 deletion services/inventory/prod_af/inventory.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"total_layers_count": 36,
"total_layers_count": 37,
"layers": [
{
"layer": "s2_l2a",
Expand Down Expand Up @@ -420,6 +420,18 @@
"prob"
]
},
{
"layer": "crop_mask_southeast",
"product": [
"crop_mask_southeast"
],
"styles_count": 3,
"styles_list": [
"green",
"filtered_yellow",
"prob"
]
},
{
"layer": "crop_mask_northern",
"product": [
Expand Down
53 changes: 47 additions & 6 deletions services/ows_refactored/agriculture/ows_crop_mask_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"title": "Cropland extent map (provisional)",
"abstract": """The Digital Earth Africa cropland extent service identifies areas of cropping in Africa, using Copernicus Sentinel-2 satellite imagery and machine learning techniques. The map indicates either the presence or absence of crop. An accurate, high-resolution, and regularly-updated cropland area map for the African continent is recognised as a useful tool in crop monitoring services. A precise and accurate cropland extent map indicating where cropland occurs serves as a basis for higher-level products, such as crop type and watering intensity.
The cropland extent map for Africa is currently avilable for Eastern, Western, Northern, Sahel, and Southern Africa and is therefore a provisional product.
The cropland extent map for Africa is currently avilable for Eastern, Western, Northern, Sahel, Southern, and Southeast Africa and is therefore a provisional product.
""",
"layers": [
{
Expand All @@ -180,7 +180,7 @@
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.dev.digitalearth.africa/products/crop_mask_eastern/extents
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_eastern/extents
""",
"product_name": "crop_mask_eastern",
"time_resolution": "year",
Expand Down Expand Up @@ -221,7 +221,7 @@
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.dev.digitalearth.africa/products/crop_mask_western/extents)
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_western/extents)
""",
"product_name": "crop_mask_western",
"time_resolution": "year",
Expand Down Expand Up @@ -262,7 +262,7 @@
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.dev.digitalearth.africa/products/crop_mask_sahel/extents)
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_sahel/extents)
""",
"product_name": "crop_mask_sahel",
"time_resolution": "year",
Expand Down Expand Up @@ -303,7 +303,7 @@
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.dev.digitalearth.africa/products/crop_mask_southern/extents)
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_southern/extents)
""",
"product_name": "crop_mask_southern",
"time_resolution": "year",
Expand All @@ -325,6 +325,47 @@
],
},
},
{
"title": "Cropland extent 2019 - Southeast Africa",
"name": "crop_mask_southeast",
"abstract": """
Digital Earth Africa's cropland extent map for Southeast Africa (2019) shows the estimated location of croplands in the countries of Zambia, Malawai, Mozambique, and Zimbabwe for the period January to December 2019. Cropland is defined as: "a piece of land of minimum 0.01 ha (a single 10m x 10m pixel) that is sowed/planted and harvest-able at least once within the 12 months after the sowing/planting date." This definition will exclude non-planted grazing lands and perennial crops which can be difficult for satellite imagery to differentiate from natural vegetation.
This provisional cropland extent map has a resolution of 10m, and was built using Copernicus Sentinel-2 satellite images from 2019. The cropland extent map was produced using extensive training data from across Southern Africa, coupled with a Random Forest machine learning model. For a detailed exploration of the methods used to produce the cropland extent map, read the Jupyter Notebooks in DE Africa’s crop-mask GitHub repository.
An independent validation dataset suggests this service has an overall accuracy of 87.3 %. The algorithm in this region tends to report more commission errors (labelling non-crop as crops) than ommission errors (labelling actual crops as non-crops). Where commission errors occur they tend to be focussed around wetlands and seasonal grasslands which spectrally resemble some kinds of cropping.
The crop mask contains three measurements:
- mask ("Cropped land"): This band displays cropped regions as a binary map. Values of 1 indicate the presence of crops, while a value of 0 indicates the absence of cropping. This band is a pixel-based cropland extent map, meaning the map displays the raw output of the pixel-based Random Forest classification.
- prob ("Probability of cropping"): This band displays the prediction probabilities for the 'crop' class during 2019. As this service used a random forest classifier, the prediction probabilities refer to the percentage of trees that voted for the random forest classification. For example, if the model had 200 decision trees in the random forest, and 150 of the trees voted 'crop', the prediction probability is 150 / 200 x 100 = 75 %. Thresholding this band at 50 % will produce a map identical to mask.
- filtered ("Cropped land (object-filtered)"): This band displays cropped regions as a binary map. Values of 1 indicate the presence of crops, while a value of 0 indicates the absence of cropping. This band is an object-based cropland extent map where the mask band has filtered using an image segmentation algorithm. During this process, segments smaller than 1 Ha (100 10m x 10m pixels) are merged with neighbouring segments, resulting in a map where the smallest classified region is 1 Ha in size. The filtered dataset is provided as small commission errors are removed by this process, and the 'salt and pepper' effect typical of classifying pixels is diminished.
More technical information about the cropland extent service can be found in the User Guide (https://docs.digitalearthafrica.org/en/latest/data_specs/Cropland_extent_specs.html)
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki) and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_southeast/extents)
""",
"product_name": "crop_mask_southeast",
"time_resolution": "year",
"bands": bands_crop_mask,
"resource_limits": reslim_alos_palsar,
"image_processing": {
"extent_mask_func": "datacube_ows.ogc_utils.mask_by_val",
"always_fetch_bands": [],
"manual_merge": False,
},
"native_crs": "EPSG:6933",
"native_resolution": [10, -10],
"styling": {
"default_style": "green",
"styles": [
style_crop_mask_green,
style_crop_mask_filtered_yellow,
style_crop_mask_prob,
],
},
},
{
"title": "Cropland extent 2019 - Northern Africa",
"name": "crop_mask_northern",
Expand All @@ -344,7 +385,7 @@
Cropland extent maps are a foundational, baseline layer in high-order crop health and crop productivity products which necessarily rely on knowing where cropping occurs before further analysis can take place.
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki)and for direct download click on a tile in the explorer page (https://explorer.dev.digitalearth.africa/products/crop_mask_northern/extents
This service is accessible through OGC Web Service (https://ows.digitalearth.africa/), for analysis in DE Africa Sandbox JupyterLab (https://github.com/digitalearthafrica/deafrica-sandbox-notebooks/wiki)and for direct download click on a tile in the explorer page (https://explorer.digitalearth.africa/products/crop_mask_northern/extents
""",
"product_name": "crop_mask_northern",
"time_resolution": "year",
Expand Down

0 comments on commit 6f29ce8

Please sign in to comment.