我需要知道预定点在海里还是在陆地上 [英] I need to know the predefined point is in the sea or on the land
问题描述
我有一个系统,用户放置一些坐标(纬度/经度),我需要检查指定的坐标是否在海中。有什么服务可以给我答案吗?或者是否可以使用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:
- The first is the 0,0 point, in the middle the the Atlantic Ocean: http://maps.google.com/maps/api/geocode/xml?address=0,0&sensor=false
- The second is located at 20.012065,-6.82251, in the middle of the Saharan desert: http://maps.google.com/maps/api/geocode/xml?address=20.012065,-6.82251&sensor=false
Edit: Some more examples in response to comments:
- This point is located in the sea claimed by UK, within the 12 miles limit. It shows as "natural_feature": http://maps.google.com/maps/api/geocode/xml?address=50.801541,0.424519&sensor=false
- This point is located in the Lake Superior, in the Thunder Bay. It shows as "natural_feature": http://maps.google.com/maps/api/geocode/xml?address=48.23565,-86.981506&sensor=false
这篇关于我需要知道预定点在海里还是在陆地上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!