在不安装 Basemap 的情况下访问沿海轮廓(例如从 Basemap 或其他地方)

Access coastal outlines (e.g. from Basemap, or somewhere else) without installing Basemap

我想在 Blender 中(以及 Python 独立的)操作地球上的多边形或海岸线顶点,但我想避免安装到多个 Pythons 在我的电脑上。基本上做一次有点棘手,更不用说四次了。

我想要的只是沿着海岸线轮廓的点,比如说 1 甚至 10 公里(1000 米或 10000 米)的分辨率。我假设它们会在 latitude/longitude 中,在那种情况下我会自己转换为 space 中的 x、y、z。

我已经下载了 Basemap - 有什么方法可以直接访问 data 文件夹中的等高线吗?

备用数据源也是可以接受的。

感谢 GIS.stackexchange here

中的回答,我找到了一个不涉及底图等的简单解决方案

我在这里重新发布了一些信息:

@artwork21 的答案是公认的答案。我只是添加一些其他人可能会觉得有用的补充信息。

我从答案中提供的link下载了一些海岸线数据。在此示例中,我使用了来自 here. Then reading about pyshp I just copy/pasted the script shapefile.py 的物理矢量数据,然后执行了以下操作:

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()