I have a system where users put some coordinates (latitude/longitude), I need to check if specified coordinates are in the sea or not. Is there any service that could give me the answer. Or is it possible to do this using google maps.
You can use the Google Maps Geocode API.
If your address is in land, the result_type of the response will be something like "administrative_area". if you are in the sea, the response will be "natural_feature".
Here are two examples:
Edit: Some more examples in response to comments:
I have thought about this once before.
I would not use a web service. but I would use a pretty simple image.
This image is taken from http://www.vectorworldmap.com/vectormaps/vector-world-map-v2.2-blank.jpg
EDIT from a great comment
I like the solution, but I'm not sure that map is totally accurate or equirectangular (which would be the easiest to work with). How about this one? naturalearth.springercarto.com/ne3_data/8192/masks/water_8k.png
//END
If you need super high res maps, I would get a very large map and divide it up in a grid of smaller images that you can load.
If you need to make this system super duper fast. I would can this image pixel for pixel and create a database of this stuff so you can look it up pretty quick. But already this image below actually acts as an excellent database that can be easily checked or changed.
Did you want oceans and lakes?
Curious to know where you are going with this, as I like this problem.
John.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With