0

Is it possible to know if a point is a land or sea ?

I have searched many times but the only way could work is (or maybe was ?) using Google Maps Reverse Geocoding like suggest here: Verify if a point is Land or Water in Google Maps

Using this method i should have natural_feature but i think it doesn't work... For example:

https://maps.googleapis.com/maps/api/geocode/json?latlng=40.6984,-74.0220

This a place, in sea, in front of Island Manhattan but in result i don't read "natural_feature".

Can you suggest a way to know if a point is sea or land ? (also using google maps API, javascript or PHP

Thanks a lot and sorry for my English

PreetyK
  • 455
  • 5
  • 14
Borja
  • 3,359
  • 7
  • 33
  • 66

1 Answers1

0

You can specify the type that you want the response to include by using the result_type parameter.

Here is an example:

https://maps.googleapis.com/maps/api/geocode/json?latlng=40.6984,-74.0220&result_type=natural_feature

Unfortunately, for this parameter, you need an API key.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Titus
  • 22,031
  • 1
  • 23
  • 33
  • i add an api key and result is empy and "status": zero_results ? – Borja Oct 23 '17 at 10:19
  • @Borja Yes, I've just gave it a try myself and got 0 results. I'm not sure what is the cause. – Titus Oct 23 '17 at 10:23
  • Maybe is not accurate... :( Thanks – Borja Oct 23 '17 at 10:25
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/17712290) – DiskJunky Oct 23 '17 at 19:10
  • @DiskJunky The link is not the issue here. – MrUpsidown Oct 23 '17 at 20:14
  • @DiskJunky This is not a *link only answer*, it is an answer that explains how to generate a link to get a specific result. I didn't add the link to answer the question, I've added it to illustrate my explanation. – Titus Oct 23 '17 at 21:30
  • @Titus I'm in agreement, on closer inspection the flag is invalid. A moderator will see the comments and clear it. I do flag things but don't generally downvote so net effect is nil. It'll clear in the end. – DiskJunky Oct 23 '17 at 21:44