mirror of
https://github.com/geohacker/bmtc.git
synced 2025-12-08 18:23:31 +00:00
18 lines
388 B
Python
18 lines
388 B
Python
import json
|
|
|
|
# Get clean readable names for bus stops.
|
|
|
|
i = json.load(open('data/busstops.2015.geojson', 'r'))
|
|
o = open('data/busstops.2015.clean.json', 'w')
|
|
|
|
stops = {
|
|
'type': 'FeatureCollection',
|
|
'features': []
|
|
}
|
|
|
|
for stop in i['features']:
|
|
stop['properties']['name'] = stop['properties']['name'].split(',')[0]
|
|
stops['features'].append(stop)
|
|
|
|
o.write(json.dumps(stops))
|