-
Notifications
You must be signed in to change notification settings - Fork 0
Home
If you've arrived here, it means you want to create BioGeoPhysical vegetation parameters for a peatland site. These parameters are one of the key component of the WorldPeatland Health Indicator.
We assume that you are comfortable working in the Linux operating system and using the command line. We also assume some experience with git version control, the Python programming language, GeoJSON, GeoTIFF, and a familiarity with earth observation and data processing.
Before getting started you should make sure that you have:
- A virtual machine running on Creodias, to access the EODATA archive
- anaconda or miniconda installed
- Earth Data account
- Here is the link to create your Earth Data (LPDACC) account to be able to download MODIS data.
- Google Earth Engine account
- you will need a google account associated with a google cloud project that has the Earth Engine API enabled. see this link for further information.
for data and code as you see fit, e.g.
mkdir ~/data
mkdir ~/code
These directories are referred to as root data directory
and code directory
.
cd ~/code
git clone [email protected]:Assimila/WorldPeatland.git
cd WorldPeatland
git checkout -b operation origin/operation
cd ..
git clone [email protected]:GerardoLopez/TATSSI.git
cd TATSSI
git checkout -b worldpeatland origin/tatssi_worldpeatland
cd ..
cd ~/code
cd WorldPeatland
conda create --name worldpeatland --file worldpeatland-explicit-environment.txt
conda activate worldpeatland
Store your Earth Data username and password in a json file similar to the example below.
{
"url": "https://e4ftl01.cr.usgs.gov/",
"username": "<username>",
"password": "<password>"
}
Edit WorldPeatland/settings.py
to specify paths to your root data directory and credentials.
- Set
ROOT_DATA_DIR
to point to yourroot data directory
. - Set
EARTH_DATA_CRED
to point to the file containing your Earth Data credentials.
- run
earthengine authenticate
and follow the prompts. - check the credential file has been created
~/.config/earthengine/credentials
- run
earthengine set_project <project_name>
Create a geojson file to describe each site of interest. This defines the geospatial bounding box for data, site name, and country.
-
Use geojson.io to create a closed polygon (not lines) or a bounding box outlining your peatland site. You can do that by using the 'Draw Rectangular polygon (r)' from the tool bar on the left of the map. Now you have the coordinates of you bounding box.
-
To name the site, add a property
site_area
. Do not include any white spaces in the name of your site. -
Add another property
country
, which is used to download VIIRS. The value of this property should follow the name nomenclature that VIIRS uses. -
Save as a GeoJSON file.
For example:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"site_area": "Degero",
"country": "Sweden"
},
"geometry": {
"coordinates": [
[
[
19.4425930710917,
64.2372650939366
],
[
19.6938818612982,
64.2355569375077
],
[
19.6956374665168,
64.0871845721421
],
[
19.4433997005164,
64.0867100842452
],
[
19.4425930710917,
64.2372650939366
]
]
],
"type": "Polygon"
}
}
]
}
Proceed to workflow.