Tôi tìm thấy một số hình ảnh bản đồ cơ sở thể truy cập từ NASA gibs tileserver. Bạn có thể sử dụng cùng một phương pháp cho các trình tạo hình xếp khác.
http://earthdata.nasa.gov/wiki/main/index.php/GIBS_Supported_Clients#Script-level_access_to_imagery
Thị Sử dụng gdal_translate GDAL trong một subshell python:
import subprocess
import matplotlib.pyplot
import mpl_toolkits.basemap
l,u,r,d=(7.4319,52.0632,7.848,51.8495)
subprocess.call ('gdal_translate -of GTiff -outsize 400 400 -projwin {l} {u} {r} {d} TERRA.xml Background.tif'.format(l=l,u=u,r=r,d=d),shell=True)
im=matplotlib.pyplot.imread('Background.tif')
m = mpl_toolkits.basemap.Basemap(llcrnrlon=l, urcrnrlat=u, urcrnrlon=r, llcrnrlat=d,
resolution='h', projection='merc')
m.imshow(im, interpolation='lanczos', origin='upper')
matplotlib.pyplot.show()
này cần file TERRA.xml từ liên kết ở trên, mặc dù bạn có thể inline XML là tốt.
Nguồn
2012-09-14 17:44:34
Bản sao: http://stackoverflow.com/questions/9482335/draw-a-map-with-gps-markers-and-save-this-image-to-file/9485409#9485409 – ChrisP
Nhưng bài đăng trên blog được liên kết chỉ mô tả một giải pháp buộc tôi kết hợp hai hình ảnh (bản đồ và điểm) bởi photoshop/gimp, tôi cần giải pháp tự động hoàn toàn – teGuy
teGuy ... đăng giải pháp của bạn (với càng nhiều chi tiết càng tốt) làm câu trả lời ... sau đó chấp nhận nó. Sẽ tốt hơn nếu bạn trả lời các câu hỏi của riêng mình: http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ – Yann