I am using the Google Maps API, in which as of now we are plotting the track of a vessel track, but the system is now allowing us to update even a Lat/Long which is on land. Is there is any way to stop this and check that the system should allow only updates to a lat/long that is in the sea?
[GIS] Checking whether lat/long is in sea using Google Maps API
google-maps-api
Best Answer
As @blah238 wrote, several ideas can be found from https://stackoverflow.com/questions/9644452/verify-if-a-point-is-land-or-water-in-google-maps
If you trust on the map color then you could check if the place at each Lat/Long is painted with the sea color or something else. You can demonstrate this with gdallocationinfo and GDAL WMS driver. Read about these from
http://gdal.org/gdallocationinfo.html
http://www.gdal.org/frmt_wms.html
Save the Google Maps definition file from the WMS driver page on disk as "frmt_wms_googlemaps_tms.xml". I copied contents of the file here
Now you must just run gdallocationinfo from this Google Maps definition file. This example checks what is at WGS84 coordinates (0,0)
I have no idea if all that has RGB values (148,107,76) in Google Maps is sea. All that is sea does obviously has this value because of labels.