primera subida
This commit is contained in:
15
Export/exportGeoJson.py
Normal file
15
Export/exportGeoJson.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import geojson
|
||||
from geojson import Point, Feature, FeatureCollection, dump
|
||||
|
||||
point = Point((-115.81, 37.24))
|
||||
|
||||
features = []
|
||||
features.append(Feature(geometry=point, properties={"country": "Spain"}))
|
||||
|
||||
# add more features...
|
||||
# features.append(...)
|
||||
|
||||
feature_collection = FeatureCollection(features)
|
||||
|
||||
with open('myfile.geojson', 'w') as f:
|
||||
dump(feature_collection, f)
|
||||
Reference in New Issue
Block a user