導航:首頁 > 編程語言 > python提取等值線經緯度

python提取等值線經緯度

發布時間:2024-09-26 18:16:12

『壹』 如何用python批量獲取經緯度坐標

python根據地址獲取經緯度方法一:
from geopy.geocoders import Nominatim
#使用geopy查詢
def geocodeN(address):
gps=Nominatim()
location=gps.geocode(address)
return location.longitude,location.latitude

使用Geopy包 : github.com/geopy/geopy (僅能精確到城鎮,具體街道無結果返回)
另外還有一種使用高德地圖或網路地圖API的方法,有興趣的朋友可以參考下。
參考鏈接:https://panxu.net/article/8382.html

『貳』 python將高斯坐標轉換經緯度 經緯度坐標與高斯坐標的轉換代碼

#網上搜來的

# 高斯坐標轉經緯度演算法 # B=大地坐標X # C=大地坐標Y # IsSix=6度帶或3度帶

import math
def GetLatLon2(B, C,IsSix):
#帶號
D = math.trunc( C/ 1000000)

#中央經線(單位:弧度)
K = 0
if IsSix:
K = D * 6 - 3 #6度帶計算
else:
K = D * 3 #3度帶計算
L = B/(6378245*(1-0.006693421623)*1.0050517739)
M = L +(0.00506237764 * math.sin(2*L)/2-0.00001062451*math.sin(4*L)/4+0.0000002081*math.sin(6*L)/6)/1.0050517739
N = L +(0.00506237764 * math.sin(2*M)/2-0.00001062451*math.sin(4*M)/4+0.0000002081*math.sin(6*M)/6)/1.0050517739
O = L +(0.00506237764 * math.sin(2*N)/2-0.00001062451*math.sin(4*N)/4+0.0000002081*math.sin(6*N)/6)/1.0050517739
P = L +(0.00506237764 * math.sin(2*O)/2-0.00001062451*math.sin(4*O)/4+0.0000002081*math.sin(6*O)/6)/1.0050517739
Q = L +(0.00506237764 * math.sin(2*P)/2-0.00001062451*math.sin(4*P)/4+0.0000002081*math.sin(6*P)/6)/1.0050517739
R = L +(0.00506237764 * math.sin(2*Q)/2-0.00001062451*math.sin(4*Q)/4+0.0000002081*math.sin(6*Q)/6)/1.0050517739
S = math.tan(R)
T = 0.006738525415*(math.cos(R))**2
U = 6378245/math.sqrt(1-0.006693421623*(math.sin(R))**2)
V = 6378245*(1-0.006693421623)/(math.sqrt((1-0.006693421623*(math.sin(R))**2)))**3
W = 5+3*S**2+T-9*T*S**2
X = 61+90*S**2+45*S**4
Y = 1+2*S**2+T**2
Z = 5+28*S**2+24*S**4+6*T+8*T*S**2
Lat= (180/math.pi)*(R-(C-D*1000000-500000)**2*S/(2*V*U)+(C-D*1000000-500000)**4*W/(24*U**3*V)-(C-D*1000000-500000)**6*X/(7200*U**5*V))
Lon= (180/math.pi)*(C-D*1000000-500000)*(1-(C-D*1000000-500000)**2*Y/(6*U**2)+(C-D*1000000-500000)**4*Z/(120*U**4))/(U*math.cos(P))
Lat = Lat
Lon = K + Lon
return (Lon, Lat)

閱讀全文

與python提取等值線經緯度相關的資料

熱點內容
高中畢業當程序員 瀏覽:245
php標簽屬性大全 瀏覽:897
遠程訪問伺服器ip地址 瀏覽:312
程序員吃雞蛋炒菜 瀏覽:173
在哪裡看俄羅斯電視劇app 瀏覽:308
怎麼找資料庫伺服器地址 瀏覽:486
伺服器調試怎麼翻譯 瀏覽:921
php如何處理ajax請求 瀏覽:211
php數組下標存在 瀏覽:707
php獲取ip歸屬地 瀏覽:175
撩女程序員怎麼辦 瀏覽:508
百度伺服器做什麼 瀏覽:193
打開軟體加速伺服器有什麼危害 瀏覽:87
php去除數組下標 瀏覽:794
ipad的app內容哪裡看 瀏覽:284
遇見空間app在哪裡 瀏覽:547
用命令對一個文件內容進行統計 瀏覽:317
華為交換機配置命令縮寫 瀏覽:344
鏈接伺服器出現問題怎麼處理 瀏覽:834
華為手機怎麼打開加密 瀏覽:676