使用 .png 图像数字化地图并绘制一个已知纬度/经度的圆圈。通过在 python 中输入半径值作为中心
Digitize map using .png image and draw a circle with known lat./long. as center by inputing radius value in python
我有一个 .png 地图图像,其中包含给定村庄中手泵的位置。有 70 个位置 value.I 想在 python 中进行以下操作(之前已经在 matlab 中做过类似的事情)-
- 数字化 .png 地图图像(之前已经在 matlab 中做过类似的事情)但现在需要在 python 中做。
- 用给定的纬度/经度绘制一个透明颜色的圆。以我给的点为圆心和半径。
我们将不胜感激任何帮助。刚开始这样做,所以我会在搜索和找到解决方案时继续更新此 post。谢谢。
在转换 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
我有一个 .png 地图图像,其中包含给定村庄中手泵的位置。有 70 个位置 value.I 想在 python 中进行以下操作(之前已经在 matlab 中做过类似的事情)-
- 数字化 .png 地图图像(之前已经在 matlab 中做过类似的事情)但现在需要在 python 中做。
- 用给定的纬度/经度绘制一个透明颜色的圆。以我给的点为圆心和半径。
我们将不胜感激任何帮助。刚开始这样做,所以我会在搜索和找到解决方案时继续更新此 post。谢谢。
在转换 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