Api
https://is-on-water.balbona.me/api/v1/get/[latitude]/[longitude]
Response
{
"isWater": true,
"feature": "LAKE",
"lat": 46.67,
"lon": 103.3,
"reqMs": 50
}
- isWater: boolean. Returns
truewhen feature is not LAND - feature: string. Returns the type of terrain at that point. One of the following:
LAND, OCEAN, LAKE, RIVER, UNKNOWN. We may return UNKNOWN in the middle of oceans or if the coordinates you provided are invalid - lat: float. Returns the latitude you provided, for your convenience
- lon: float. Returns the longitude you provided, for your convenience
- reqMs: integer. The number of milliseconds it took our server to process your request. Most probably not relevant to you
Data
Our dataset is ASTWBD v001 (ASTER Global Water Body Data Base), provided by the U.S./Japan ASTER Science Team.
It contains data acquired between March 1, 2000, and November 30, 2013
The dataset's pixel size is 30 meters, therefore the results might be incorrect in shores up to that distance (Ex: classifying a beach as OCEAN)
Rate limits
This is a free API intended for development and small-scale use. Requests are limited to 120 requests per minute per IP address. If you're rate limited, you'll get an HTTP 429 response with a Retry-After header telling you how many seconds to wait. Every response also includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.
If you need more requests, this project is open source: clone the GitHub repo and host your own instance.
Water Example
https://is-on-water.balbona.me/api/v1/get/30.03/31.22Result
{
"isWater": true,
"feature": "RIVER",
"lat": 30.03,
"lon": 31.22,
"reqMs": 55
}
Land Example
https://is-on-water.balbona.me/api/v1/get/-10.47/105.57Result
{
"isWater": false,
"feature": "LAND",
"lat": -10.47,
"lon": 105.57,
"reqMs": 53
}
©2023 Nuno Balbona. Web App design based on the previous OnWater.io