如何在地瓦丹斯出口一系列功能集?
我正在尝试使用地geopandas将特征收集的数组导出到Shapefiles。阵列结构如下:
我希望每个功能集合都以自己的shapefile导出,我是我通过在geopandas中进行以下操作(通过使用简单的Geojson文件)来完成:
gdf.to_file(filePath)
上面的任何Geojson(或在这种情况下,在这种情况下是单个功能集合),我将其交给它&创建一个shapefile。问题是,我希望能够一次(迭代)一次导出多个功能集。
我还能够同时导出任何数量的Shapefiles:
for num, row in gdf.iterrows():
gdf.iloc[num:num+1,:].to_file(path)
问题是,上述代码仅适用于功能集合(不在功能集合中)。 Geopandas根本不认识一系列特征集合的格式。有人找到了解决方法吗?
I'm attempting to use geopandas to export an array of feature collections to shapefiles. The array structure is as follows:
I want each feature collection to be exported as it's own shapefile, which I have been able to accomplish by doing the following in geopandas (by using a simple geojson file):
gdf.to_file(filePath)
The above takes any geojson (or in this case a single feature collection) that I hand it & creates a shapefile. The issue is, I want to be able to export multiple feature collections at once (iteratively).
I have also been able to export any number of shapefiles at once with the following:
for num, row in gdf.iterrows():
gdf.iloc[num:num+1,:].to_file(path)
The problem is, the above code only works on a feature collection of features (not on an array of feature collections). Geopandas does not recognize the format of an array of feature collections at all. Has anyone found a workaround for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完整代码
full code