# shp to GeoJson
import geopandas as gpd
data = gpd.read_file('中国省级区域20200720.shp')
data.to_file("中国省级区域20200720.json", driver='GeoJSON', encoding="utf-8")
# GeoJson to shp
data = gpd.read_file('中国省级区域20200720.json')
data.to_file('中国省级区域20200720', driver='ESRI Shapefile', encoding='utf-8')
python 里面 GeoJson 和 shp 文件互转
最新推荐文章于 2024-10-13 21:06:17 发布