Back to data catalog
OpenAPI Spec
Explore the OpenAPI spec for OpenEPI Deforestation API
Git Repository
Explore the source code behind OpenEPI Deforestation API
Client Libraries
Explore the client libraries for OpenEPI Deforestation API
Documentation
Explore the documentation for OpenEPI Deforestation API
The deforestation data covers the period from 2001 to 2022 and is provided by the Global Land Analysis and Discovery (GLAD) laboratory at the University of Maryland, in partnership with Global Forest Watch (GFW). The data are freely available for use under a Creative Commons Attribution 4.0 International License. River basin polygons data is provided by HydroSHEDS. The basin data are freely available for both non-commercial and commercial use under a licence agreement included in the HydroSHEDS Technical Documentation.
Using the river basin polygons, the deforestation data are aggregated per basin and year.
Spatial Resolution
0.00025° x 0.00025°
Returns the estimated deforested area per year within a river basin for the given location
1from openepi_client import GeoLocation, BoundingBox
2from openepi_client.deforestation import DeforestationClient
3from openepi_client.deforestation import AsyncDeforestationClient
4
5# sync
6
7# Get the yearly forest cover loss within a river basin for a given geolocation
8forest_loss = DeforestationClient.get_basin(geolocation=GeoLocation(lat=5.175, lon=37.124))
9
10# Get yearly forest cover loss for all river basins within the given bounding box
11forest_loss = DeforestationClient.get_basin(bounding_box=BoundingBox(min_lat=30.909622, min_lon=28.850951, max_lat=-1.041395, max_lon=-2.840114))
12
13# async
14
15# Get the yearly forest cover loss within a river basin for a given geolocation
16forest_loss = await AsyncDeforestationClient.get_basin(geolocation=GeoLocation(lat=5.175, lon=37.124))
17
18# Get yearly forest cover loss for all river basins within the given bounding box
19forest_loss = await AsyncDeforestationClient.get_basin(bounding_box=BoundingBox(min_lat=30.909622, min_lon=28.850951, max_lat=-1.041395, max_lon=-2.840114))
1import io.openepi.common.ApiException;
2import io.openepi.deforestation.api.DeforestationApi;
3import io.openepi.deforestation.model.DeforestationBasinGeoJSON;
4import java.math.BigDecimal;
5
6public class Main {
7 public static void main(String[] args) {
8 DeforestationApi api = new DeforestationApi();
9 try {
10 BigDecimal lon = new BigDecimal("30.06");
11 BigDecimal lat = BigDecimal.valueOf(-1.94);
12
13 DeforestationBasinGeoJSON response = api.lossyearBasinGet(lon, lat, null, null, null, null, 2010, 2019);
14
15 // Get the total forest cover loss within the returned river basin over the time period
16 BigDecimal loss = response.getFeatures().get(0).getProperties().getDaterangeTotTreeloss();
17 System.out.println("Total forest cover loss: " + loss + " km^2");
18 } catch (ApiException e) {
19 System.err.println("Exception when calling DeforestationApi#lossyearBasinGet");
20 e.printStackTrace();
21 }
22 }
23}
1import { DeforestationClient } from 'openepi-client';
2
3const client = new DeforestationClient();
4
5client.getBasin({ lon: 30.0619, lat: -1.9441 }).then((result) => {
6 const { data, error } = result;
7 if (error) {
8 console.error(error);
9 } else {
10 console.log(data);
11 }
12});