国家名称的GPS坐标 [英] Country name for GPS coordinates

查看:229
本文介绍了国家名称的GPS坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我不太关心准确度,也不关心它的准确性。政治纠纷给出的含糊不清。只需要一个足够好的近似值。

解决方案

编辑:雅虎API不再可用。



试试Yahoo! API


纬度和经度

纬度和
经度可以指定为
位置参数。纬度和
经度可以表示为小数
度或度 - 分 - 秒,
,带有前导或尾随
方向或前导标志。如果提供
方向,则经度
可能会出现在纬度之前。如果未提供
指示方向,则
经线可能出现在纬线
之前,如果超出-90至90范围。
否则,纬度必须先出现
。标点符号(逗号,
度,分钟,秒)是被忽略的



 例如:

•50.3 -120.5
•50.3,-120.5
•-120.5 50.3
•50.3 N 120.5 W
•120.5 W 50.3 N
•50 18 0 -120 30 0
•50 18 0 N 120 30 0 W
•50°18'0N 120°30'0W

响应元素会为您提供国家以及其他许多元素 不要忘记作为参数gflags = R发送,进行反向地理编码。如果你想在json中输出,发送参数flags = J。


Is there an easy way to get the name of the country on whose territory a given point is located?

I don't care too much about accuracy nor about ambiguities given by political disputes. Just need a good enough approximation.

解决方案

EDIT: The Yahoo Where API is no longer available.

Try the Yahoo! APIs.

Latitude and Longitude

Latitude and longitude can be specified for the location parameter. Latitude and longitude may be expressed as decimal degrees or degrees-minutes-seconds, with either leading or trailing directionals or leading signs. If directionals are provided, longitude may appear before latitude. If directionals are not provided, longitude may appear before latitude if it is outside the range -90 to 90. Otherwise, the latitude must appear first. Punctuation marks (commas, degrees, minutes, seconds) are ignored.

Examples: 

•50.3 -120.5
•50.3, -120.5
•-120.5 50.3
•50.3 N 120.5 W
•120.5 W 50.3 N
•50 18 0 -120 30 0
•50 18 0 N 120 30 0 W
•50° 18' 0" N 120° 30' 0" W

The response element will give you the country, as well as many other elements.

Don't forget to send as parameter gflags=R, to make the reverse geocoding. If you want the output in json, send the parameter flags=J as well.

这篇关于国家名称的GPS坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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