我正在做一些网页抓图,我得到一个位置列表。我想尝试将它们转换为各自的经度和纬度坐标。我发现geopy
看起来像是正确的东西。
有或没有geopy
,如何将此列表从(lon: (from -180,180) and lat: (from -90,90))
内转换为各自的坐标Python 3.5
?
最好是精确的坐标,但如果不可能,一般的区域坐标也会起作用。
我发现这个资源是我试图模仿https://pypi.python.org/pypi/geopy
#Convert to Longitude/Latitude
from geopy.geocoders import Nominatim
geolocator = Nominatim()
locations = ['Kahekili Beach/Old Airport Beach, Leeward Shore Maui', 'Outside Honokohau Harbor South / Naia / Ripoff Reef, North Kona Coast', 'Ulua Beach, Leeward Shore Maui', 'Kaiwi Pt./Arch Cave/Wash Rock/Sand Channel/Kamanu/Devils Doorway, North Kona Coast', 'Honolua Bay MLCD, Leeward Shore Maui', 'Golden Arches', 'Lone Tree Arch / Freeze Face Cave, North Kona Coast', 'Old Airport', 'Turtle Heaven, North Kona Coast', 'Turtle Pinnacle/Turtle Towers/North of Honokohau Harbor Entrance/Terrapin Station/Turtle Pai, North Kona Coast']
for location in locations:
location = geolocator.geocode(location)
Error
+Service timed out