Skip to content

Pixel API

robinkraft edited this page Jan 16, 2012 · 5 revisions

Pixel API

The pixel API returns data on forest clearing activity detected by FORMA for individual locations given by latlon coordinates (WGS84). The underlying data are MODIS pixels at 500m (.004166667 degree) resolution.

For a given latlon coordinate pair, the API determines the MODIS pixel it falls into and returns that pixel's value. It is not necessary to provide a pixel centroid.

Parameter Description Example
lat Latitude of requested location .001
lon Longitude of requested location 100.001
cleared Boolean of whether clearing was detected in the requested pixel (see confidence) true
forest2000 Boolean of whether the pixel was forest as of 2000 (VCF) true
first_detected Period when clearing was first detected. Only returned if cleared=true 2-2008
iso The 3-digit ISO code for the country the pixel falls into. IDN
country_name Name of country pixel falls into Brazil
id{n} Numeric GADM id at subnational administrative level {n} (1 or 2). 1243
name{n} Name of subnational administrative unit at level {n} (1 or 2)
centroid lat, lon tuple representing the pixel centroid. This will likely be different from the lat/lon pair used in the request. .002083333,.002083333
confidence Maximum calculated confidence from FORMA algorithm. Confidence > 50 considered cleared by default. 73

Examples

GET /api/pixel/lat/lon

{
  "confidence":74,
  "id2":15608,
  "lon":101.003,
  "first_detected":"6-2011",
  "id1":1277,
  "centroid":[
    0.0020833,
    101.00208333
  ],
  "country_name":"Indonesia",
  "forest2000":true,
  "name1":"Riau",
  "lat":0.003,
  "name2":"Kampar",
  "iso":"IDN",
  "cleared":true
}

get /api/pixel/lat/lon?min_conf=45
Returns pixel data as above but for a custom confidence threshold (default is 50).

{
  "confidence":45,
  "id2":15608,
  "lon":101.003,
  "first_detected":"5-2011",
  "id1":1277,
  "centroid":[
    0.0020833,
    101.00208333
  ],
  "country_name":"Indonesia",
  "forest2000":true,
  "name1":"Riau",
  "lat":0.003,
  "name2":"Kampar",
  "iso":"IDN",
  "cleared":true
}

Nice to have

Protected status

Clone this wiki locally