geopandas 生成 shp 文件

  1. 生成 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')

     

posted on 2022-08-26 14:31  闹不机米  阅读(547)  评论(0编辑  收藏  举报

导航