pip install geojson python import geojson with open('data.geojson') as f: data = geojson.load(f) python import matplotlib.pyplot as plt fig, ax = plt.subplots(1, 1) ax.set_aspect('equal') for feature in data['features']: ax.plot(*zip(*feature['geometry']['coordinates']), marker='o') plt.show() python import geojson point = geojson.Point((1, 2)) feature = geojson.Feature(geometry=point) feature_collection = geojson.FeatureCollection([feature]) with open('output.geojson', 'w') as f: geojson.dump(feature_collection, f)


上一篇:
下一篇:
切换中文