I'm working with Android Google Maps API v2. Is it possible to check if point (LatLng) is in water or land?
Asked
Active
Viewed 1,423 times
3
-
Maps V2 has no means of telling you if a point is over land or water. Whether there is some other Google API that could do this, I cannot say. – CommonsWare Jan 20 '15 at 14:13
2 Answers
2
No, there is no direct API for this AFAIK.
Another SO answer pointed out two possible workarounds:
- You can use Google Maps Reverse Geocoding . In result set you can determine whether it is water by checking types. In waters case the type is natural_feature. See more at this link http://code.google.com/apis/maps/documentation/geocoding/#Types.
- You can detect waters/lands by pixels, by using Google Static Maps. But for this purpose you need to create http service.

shkschneider
- 17,833
- 13
- 59
- 112
0
In the years since the original question was asked, a direct API service was started called IsItWater.com which will let you check if a lat/lon is on water or land, based on OpenStreetMap data:
Request
curl 'https://isitwater-com.p.rapidapi.com/?latitude=41.9029192&longitude=-70.2652276&rapidapi-key=YOUR-X-RAPIDAPI-KEY'
Response
{
"water": true,
"latitude": 41.9029192,
"longitude": -70.2652276
}

John N.
- 81
- 5