The purpose of this API is to determine whether a latitude / longitude pair is on land or water.
If you would like to use it (free of charge for reasonable use cases),
please contact me.
Request Format
GET https://cristella.me/api/land-water/[token]/[latitude],[longitude]
Successful Response: Land location
{
"status":"success",
"data":{
"lat":40.702743,
"lon":-74.016977,
"loc":"land"
}
}
Successful Response: Water location
{
"status":"success",
"data":{
"lat":40.702385,
"lon":-74.017407,
"loc":"water"
}
}
Failure Response: Invalid latitude longitude pair
{
"status":"fail",
"message":"Invalid latitude longitude pair",
"data":{
"lat":90.01,
"lon":-74.017407
}
}
Failure Response: External resource not available
This API relies on the availability of a Google service. In the unlikely event that this service is unaviable, the call will fail and should be retried at a later point in time.
{
"status":"fail",
"message":"External resource not available",
"data":{
"lat":34.052234,
"lon":-118.243685
}
}