簡體   English   中英

使用 .png 圖像數字化 map 並繪制一個已知緯度/經度的圓。 在 python 中輸入半徑值作為中心

[英]Digitize map using .png image and draw a circle with known lat./long. as center by inputing radius value in python

我有一個.png map 圖像,其中包含給定村庄中手泵的位置。 有 70 個位置值。我想在 python 中執行以下操作(之前已經在 matlab 中做過類似的事情)-

  1. digitize.png 地圖圖像(之前在matlab已經做過類似的事情)但現在需要在python做。
  2. 用給定的緯度/經度繪制一個透明顏色的圓。 點為中心和我給的半徑。

任何幫助將不勝感激。 剛開始這樣做,所以我會在搜索和尋找解決方案時繼續更新這篇文章。 謝謝。

在轉換 simialr R 代碼的幫助下完成...

def bubbles(lat,long,re,colvar,wellnum,txt):
   
    s=list(map(lambda x: x *1.2, re))

    fig, ax = plt.subplots()
    lc=plt.scatter(lat, long, s,c=colvar,cmap="coolwarm", alpha=0.8, edgecolors="grey", linewidth=2)
# Add titles (main and on axis)
    for i in range(0,len(wellnum)):
        plt.text(lat[i],long[i],' {1}ft\n{0}\n{2}R2'.format(wellnum[i],re[i],str(round(txt[i],2))))
    plt.xlabel("LAT")
    plt.ylabel("LONG")
    plt.title("B")
    axcb = fig.colorbar(lc)
    axcb.set_label('Pe')
    
    plt.show()
    return fig
 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM