wri/gfw-api — pull request #56 by eightysteele (2014-01-14 14:11:41+00:00)
Title: Add analysis support for Hansen gain, cover, loss

OK! We have the Hansen layers for analyzing gain, cover, and loss and it's deployed to wip. :D

Here's the result of [loss by year](http://wip.gfw-apis.appspot.com/datasets/hansen?layer=loss&geom={%22type%22:%22Polygon%22,%22coordinates%22:[[[102.65350,-0.73499],[103.75488,-0.89153],[104.14764,-1.57527],[102.77161,-1.47368]]]}&bust=1) for supplied GeoJSON polygon:

```json
{
"geom":{
"type":"Polygon",
"coordinates":[
[
[
102.65349999999999,
-0.73499000000000003
],
[
103.75488,
-0.89153000000000004
],
[
104.14764,
-1.5752699999999999
],
[
102.77161,
-1.4736800000000001
]
]
]
},
"percent":{
"2002":1.9966222915041087,
"2003":1.1870389367657674,
"2001":1.6547742563060646,
"2006":4.0649652906080593,
"2007":4.5303926107208508,
"2004":4.6090374476645835,
"2005":2.7850242630506181,
"2008":6.2511960612089847,
"2009":4.7399017399539272,
"2011":0.80362753029235201,
"2010":0.78036573932823039,
"2012":3.9541263957490189
},
"area":{
"2002":208.33516856552924,
"2003":123.8601602502595,
"2001":172.6654435805728,
"2006":424.15394871407898,
"2007":472.71840660045905,
"2004":480.9245081906646,
"2005":290.60003074724784,
"2008":652.27358759340586,
"2009":494.57938648662491,
"2011":83.85355492612284,
"2010":81.426331128075503,
"2012":412.58859659799919
}
}
```

Here's the result of summing over the study years 2000-2012 for [gain, cover, and loss](http://wip.gfw-apis.appspot.com/datasets/hansen?layer=sum&geom={%22type%22:%22Polygon%22,%22coordinates%22:[[[102.65350,-0.73499],[103.75488,-0.89153],[104.14764,-1.57527],[102.77161,-1.47368]]]}&bust=1) for supplied GeoJSON polygon:

```json
{
"geom":{
"type":"Polygon",
"coordinates":[
[
[
102.65349999999999,
-0.73499000000000003
],
[
103.75488,
-0.89153000000000004
],
[
104.14764,
-1.5752699999999999
],
[
102.77161,
-1.4736800000000001
]
]
]
},
"percent":{
"loss_sum":37.436577268474423,
"treecover_2000":86.387937243368555,
"gain":21.351877283895057
},
"area":{
"loss_sum":3906.2749469086475,
"treecover_2000":9014.04614392248,
"gain":2227.9361359730915
}
}
```