Convert geopandas shapely polygon to geojson

前端 未结 6 1911
猫巷女王i
猫巷女王i 2021-02-18 19:24

I created a circle using geopandas and it returned a shapely polygon:

POLYGON: ((...))

I want this same polygon as a geojson object. I ran acr

6条回答
  •  无人共我
    2021-02-18 20:02

    Use the driver provided by fiona:

    data=shapefile.to_file("file.geojson",driver='GeoJSON')
    
    data=geopandas.read_file("file.geojson")
    
    data
    

提交回复
热议问题