coast = Reader("ne_50m_coastline") # defined in shapefile.py
plt.figure()
for shape in coast.shapes()[:20]: # first 20 shapes out of 1428 total
x, y = zip(*shape.points)
plt.plot(x, y)
plt.xlim(110, 180)
plt.ylim(-40, 20)
plt.savefig("Australia Australia Australia Australia we love ya' Amen")
# https://www.youtube.com/watch?v=_f_p0CgPeyA&feature=youtu.be&t=121
plt.show()
我发现了一个简单的解决方案,不涉及底图或类似的,感谢中的答案GIS.stackexchange系统here
我在这里转载了一些信息:
@artwork21的答案是公认的答案。我只是补充一些其他人可能会觉得有用的信息。
我从答案中提供的链接下载了一些海岸线数据。在这个例子中,我使用了来自here的物理向量数据。然后阅读pyshp我只是复制/粘贴了脚本shapefile.py,然后做了以下操作:
相关问题 更多 >
编程相关推荐