Inspired by this question on StackOverflow “Verify if a point is Land or Water in Google Maps” I decided to see if the question was solvable quickly and easily. This being the API economy.. surely Google has an API to solve this question? It does… in the form of Google Elevation API. Here are the end results:
Note the hexagons pretty much stay on land even though a rectangular perimeter is defined that goes partly over water. In this case I did a quick check from within Google Maps itself and the minimum elevation on land was about 8-9m so that was my threshold. Anything below 8m is considered sea. The code is mostly derivated from google documentation and stack overflow, but here’s the full gist:
You must be logged in to post a comment.