【python】shapefile转换geojson
import shapefilenimport codecsnfrom json import dumpsnnn# read the shapefilendef shp2geo(file=”line出产.shp”):n reader = shapefile.Reader(file)n fields = reader.fields[1:]n field_names = [field…
import shapefilenimport codecsnfrom json import dumpsnnn# read the shapefilendef shp2geo(file=”line出产.shp”):n reader = shapefile.Reader(file)n fields = reader.fields[1:]n field_names = [field…