pip install geoshaper
An open source library to convert shape files to GeoJSON/TopoJSON
import geoshaper as gsh
shaper = gsh.GeoShaper("path")
shaper.to_topojson()
data: folder path with shapes or GeoDataFrame object.
If data is a string, GeoShaper
will read the folder, and will convert the shapes inside in a GeoDataFrame
Save shaper
to geojson. If path
not provided, the result is returned as output.json
.
Save shaper
to geojson. If path
not provided, the result is returned as output.json
.