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

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

问题描述

我有一个系统,用户放置一些坐标(纬度/经度),我需要检查指定的坐标是否在海中。有什么服务可以给我答案吗?或者是否可以使用Google地图来完成这项工作。

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



,响应的result_type将类似administrative_area。如果您身处海中,则回复将为natural_feature。



以下是两个例子:



编辑:更多回复评论的例子:


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:

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

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