Skip to content

Commit

Permalink
Merge pull request #198 from WorldCereal/fix-ui-map
Browse files Browse the repository at this point in the history
Fix UI map
  • Loading branch information
jdegerickx authored Oct 16, 2024
2 parents 3414f68 + 37c7013 commit c19664c
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 76 deletions.
26 changes: 17 additions & 9 deletions notebooks/worldcereal_v1_demo_custom_cropland.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"source": [
"### Introduction\n",
"\n",
"This notebook guides you through the process of training a custom cropland classification model using publicly available and harmonized in-situ reference data for your area of interest. Afterwards, the model can be applied to your area and season of interest to generate a cropland extent map.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is currently limited to 250 km² per model run. On average, one such run consumes 35 credits on the Copernicus Data Space Ecosystem."
"This notebook guides you through the process of training a custom cropland classification model using publicly available and harmonized in-situ reference data for your area of interest. Afterwards, the model can be applied to your area and season of interest to generate a cropland extent map."
]
},
{
Expand Down Expand Up @@ -51,14 +49,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 85 credits and last around 40 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -356,7 +358,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The resulting raster files can be visualized in QGIS."
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>"
]
}
],
Expand Down
24 changes: 16 additions & 8 deletions notebooks/worldcereal_v1_demo_custom_cropland_extended.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"source": [
"### Introduction\n",
"\n",
"This notebook guides you through the process of training a custom cropland classification model using publicly available and harmonized in-situ reference data for your area of interest. Afterwards, the model can be applied to your area and season of interest to generate a cropland extent map.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is currently limited to 250 km² per model run. On average, one such run consumes 35 credits on the Copernicus Data Space Ecosystem."
"This notebook guides you through the process of training a custom cropland classification model using publicly available and harmonized in-situ reference data for your area of interest. Afterwards, the model can be applied to your area and season of interest to generate a cropland extent map."
]
},
{
Expand Down Expand Up @@ -51,14 +49,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 85 credits and last around 40 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -383,6 +385,12 @@
"source": [
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>\n",
"\n",
"In case you are running this script on your local environment, you can alternatively use the following cells to visualize the outputs directly in this notebook."
]
},
Expand Down
26 changes: 17 additions & 9 deletions notebooks/worldcereal_v1_demo_custom_croptype.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"source": [
"### Introduction\n",
"\n",
"This notebook guides you through the process of training a custom crop type classification model using publicly available and harmonized in-situ reference data for your area and crop types of interest. Afterwards, the model can be applied to your season of interest to generate a crop type map.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is limited to 250 km² per model run. On average, one such run consumes xxx credits on the Copernicus Data Space Ecosystem."
"This notebook guides you through the process of training a custom crop type classification model using publicly available and harmonized in-situ reference data for your area and crop types of interest. Afterwards, the model can be applied to your season of interest to generate a crop type map."
]
},
{
Expand Down Expand Up @@ -51,14 +49,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 120 credits and last up to 30 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -357,7 +359,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The resulting raster files can be visualized in QGIS."
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>"
]
}
],
Expand Down
24 changes: 16 additions & 8 deletions notebooks/worldcereal_v1_demo_custom_croptype_extended.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"source": [
"### Introduction\n",
"\n",
"This notebook guides you through the process of training a custom crop type classification model using publicly available and harmonized in-situ reference data for your area and crop types of interest. Afterwards, the model can be applied to your season of interest to generate a crop type map.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is limited to 250 km² per model run. On average, one such run consumes xxx credits on the Copernicus Data Space Ecosystem."
"This notebook guides you through the process of training a custom crop type classification model using publicly available and harmonized in-situ reference data for your area and crop types of interest. Afterwards, the model can be applied to your season of interest to generate a crop type map."
]
},
{
Expand Down Expand Up @@ -51,14 +49,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 120 credits and last up to 30 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -390,6 +392,12 @@
"source": [
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>\n",
"\n",
"In case you are running this script on your local environment, you can alternatively use the following cells to visualize the outputs directly in this notebook."
]
},
Expand Down
26 changes: 17 additions & 9 deletions notebooks/worldcereal_v1_demo_default_cropland.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
"This notebook contains a short demo on how to use the WorldCereal system to generate a cropland extent map for your area and season of interest.<br>\n",
"The map is generated using a default model trained by the WorldCereal consortium to distinguish cropland from all other land use.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is currently limited to 250 km² per model run. On average, one such run consumes 35 credits on the Copernicus Data Space Ecosystem.\n",
"\n",
"\n",
"<div class=\"alert alert-block alert-info\">\n",
"<b>Cropland definition:</b> \n",
"<b>Cropland definition:</b> <br>\n",
"Cropland is defined here as land used for temporary crops, i.e. crops with a less-than-1-year growing cycle which must be newly sown or planted for further production after the harvest. Sugar cane, asparagus, and cassava are also considered temporary crops, even though they remain in the field for more than 1 year. This cropland definition thus excludes perennial crops as well as (temporary) pastures.\n",
"</div>"
]
Expand Down Expand Up @@ -58,14 +56,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 85 credits and last up to 40 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -223,7 +225,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The resulting raster files can be visualized in QGIS."
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>"
]
},
{
Expand Down
23 changes: 16 additions & 7 deletions notebooks/worldcereal_v1_demo_default_cropland_extended.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
"This notebook contains a short demo on how to use the WorldCereal system to generate a cropland extent map for your area and season of interest.<br>\n",
"The map is generated using a default model trained by the WorldCereal consortium to distinguish cropland from all other land use.\n",
"\n",
"Please note that for the purpose of this demo, the processing area is currently limited to 250 km² per model run. On average, one such run consumes 35 credits on the Copernicus Data Space Ecosystem.\n",
"\n",
"<div class=\"alert alert-block alert-info\">\n",
"<b>Cropland definition:</b> \n",
"<b>Cropland definition:</b> <br>\n",
"Cropland is defined here as land used for temporary crops, i.e. crops with a less-than-1-year growing cycle which must be newly sown or planted for further production after the harvest. Sugar cane, asparagus, and cassava are also considered temporary crops, even though they remain in the field for more than 1 year. This cropland definition thus excludes perennial crops as well as (temporary) pastures.\n",
"</div>"
]
Expand Down Expand Up @@ -57,14 +56,18 @@
"\n",
"When running the code snippet below, an interactive map will be visualized.\n",
"Click the Rectangle button on the left hand side of the map to start drawing your region of interest.\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map.\n",
"\n",
"Currently, there is a maximum size of 250 km² for your area within this demo. Upon exceeding this limit, an error will be shown.\n",
"You can bypass this limit by altering the code below to:<br>\n",
"*map = ui_map(area_limit=750)*<br>\n",
"<div class=\"alert alert-block alert-warning\">\n",
"<b>Processing area limitation:</b><br> \n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage and long processing times.<br>\n",
"Upon exceeding this limit, an error will be shown, and you will need to draw a new rectangle.\n",
"\n",
"Processing areas beyond 750 km² are currently not supported to avoid excessive credit usage (roughly 120 credits will be consumed for this size of a processing extent).\n",
"For testing purposes, we recommend you to select a small area (< 250 km²) in order to limit processing time and credit usage.\n",
"\n",
"The widget will automatically store the coordinates of the last rectangle you drew on the map."
"A run of 250 km² will typically consume 35 credits and last between 15 and 20 mins.<br>\n",
"A run of 750 km² will typically consume 85 credits and last around 40 mins.\n",
"</div>"
]
},
{
Expand Down Expand Up @@ -250,6 +253,12 @@
"source": [
"The resulting raster files can be visualized in QGIS.\n",
"\n",
"<div class=\"alert alert-block alert-danger\">\n",
"<b>WARNING:</b> <br>\n",
"In case you run this notebook through the Terrascope environment, ALWAYS make sure you download the resulting files to your local system!<br>\n",
"The Terrascope environment will be cleaned automatically upon exit!\n",
"</div>\n",
"\n",
"In case you are running this script on your local environment, you can alternatively use the following cells to visualize the outputs directly in this notebook."
]
},
Expand Down
Loading

0 comments on commit c19664c

Please sign in to comment.