- 生成 shp 文件
ss = [] for il in C.allsegs[1:5]: ss.append(geometry.MultiLineString([i.tolist() for i in il if len(i.tolist()) > 1])) cq = geopandas.GeoDataFrame({'geometry': ss}, crs='EPSG:4326') print(cq) cq.to_file('output.shp', driver='ESRI Shapefile', encoding='utf-8')