我需要知道预定义的点是在海里还是在陆地上 [英] I need to know the predefined point is in the sea or on the land

查看:22
本文介绍了我需要知道预定义的点是在海里还是在陆地上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个系统,用户可以在其中放置一些坐标(纬度/经度),我需要检查指定的坐标是否在海中.有什么服务可以给我答案.或者是否可以使用谷歌地图来做到这一点.

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.

推荐答案

您可以使用 Google 地图地理编码 API.

如果您的地址在陆地上,则响应的 result_type 将类似于administrative_area".如果您在海中,则响应为natural_feature".

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".

这里有两个例子:

回复评论的更多示例:

这篇关于我需要知道预定义的点是在海里还是在陆地上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆