wri/gfw-api — pull request #88 by eightysteele (2014-02-17 23:17:13+00:00)
Title: Refactor UMD API

@matallo here it is man.

Query UMD by ISO:
[http://localhost:8080/datasets/umd?begin=2000&end=2012&bust=1&iso=IDN](http://localhost:8080/datasets/umd?begin=2000&end=2012&bust=1&iso=IDN)

```json
{
"iso":"IDN",
"begin":"2000",
"end":"2012",
"dataset":"UMD",
"gain_area":6970122.15434617,
"loss_area":15785024.7103383,
"units":"Ha"
}
```

Query UMD by GeoJSON:
[http://localhost:8080/datasets/umd?begin=2000&end=2012&bust=1&geom={%20%22type%22:%20%22Polygon%22,%20%22coordinates%22:%20[%20[%20[%20-65.390625,%20-2.108898659243126%20],%20[%20-65.390625,%20-14.264383087562637%20],%20[%20-50.2734375,%20-3.8642546157214084%20],%20[%20-59.4140625,%203.162455530237848%20],%20[%20-65.390625,%20-2.108898659243126%20]%20]%20]%20}](http://localhost:8080/datasets/umd?begin=2000&end=2012&bust=1&geom={%20%22type%22:%20%22Polygon%22,%20%22coordinates%22:%20[%20[%20[%20-65.390625,%20-2.108898659243126%20],%20[%20-65.390625,%20-14.264383087562637%20],%20[%20-50.2734375,%20-3.8642546157214084%20],%20[%20-59.4140625,%203.162455530237848%20],%20[%20-65.390625,%20-2.108898659243126%20]%20]%20]%20})

```json
{
"loss_area":62223.678692568035,
"begin":"2000",
"units":"Ha",
"end":"2012",
"geom":{
"type":"Polygon",
"coordinates":[
[
[
-65.390625,
-2.108898659243126
],
[
-65.390625,
-14.264383087562637
],
[
-50.2734375,
-3.8642546157214084
],
[
-59.4140625,
3.162455530237848
],
[
-65.390625,
-2.108898659243126
]
]
]
},
"gain_area":4188.813495579543
}
```