组合两个形状

Combine two shapes

我想将国家和美国各州的数据合并为一个形状。 fiona.open 只支持打开一个文件。有什么方法可以将多个形状组合成一个并使用单个集合吗?

形状文件通常用于 link 具有其他信息(人口、平均降雨量、浣熊数量)的 'layer' 地理数据。因此,它不适合在同一文件中包含重叠的地理数据。你应该看看 QGIS As a tool (Python Based) that would allow you to create and modify the shapefiles into the format you need. For example you can take your US STATES shapefiles, import it into QGIS, Merge all of the boundaries and export a new shapefile. If you still want to merge your shapefiles, check out these questions in GIS.Stackexchange.com