Let me explain BlueDot Water Observatory’s currently very simple RESTful API using an example water body from Spain (https://water.blue-dot-observatory.com/19853/2017-10-08). The number 19853 is water body’s unique identifier and it will appear in all requests.
- all measured surface water levels can be obtained via: https://water.blue-dot-observatory.com/api/waterbodies/19853/index.html, which returns a JSON with the following content:
-
measurements: list of available measurements (note that more measurements have been performed, but were filtered due to too large cloud coverage, failure of algorithm, …), where each measurement consists of:
- cc: cloud coverage in percent (threshold is set to 2%)
- date: date of S2 acquisition
- level: surface water level as defined above
- min/max_level: obsolete. Set to 0.0. Will be removed in future.
-
nominal_outline: Polygon of water body’s nominal water extent (taken from OSM in most cases)
-
properties: other properties of water body
- country, name
- lat, long in WGS84
- id: unique identifier
-
the measured water extent can be obtained for each available date via: https://water.blue-dot-observatory.com/api/waterbodies/19853/measurements/2016-10-08/index.html, where 2016-10-08 represents date of a measurement (from the above json file). The result of the above call is geo-json file with a Polygon and nothing else.
-
In summary, all you need to know is the water body’s unique identifier (can be obtained from the url in the dashboard when selecting one) or from our “database”, available at https://www.blue-dot-observatory.com/aboutwaterobservatory.
I hope this is enough details for now. Let me know, if you have any other questions.
PS: Number in question 1 represents the ware body ID. In the example code this is actually not needed since the example doesn’t make any calls to water observatory’s API.