Browse Source

finding a way to get location as the ref identifier

master
joseph.leach 4 years ago
parent
commit
ca0a0461a8
3 changed files with 1007 additions and 1005 deletions
  1. +5
    -3
      charging-stations-improved-version.py
  2. +1001
    -1001
      preview-improved-version.json
  3. +1
    -1
      results-improved-version.osm

+ 5
- 3
charging-stations-improved-version.py View File

@ -3,7 +3,7 @@
# examples at https://github.com/mapsme/osm_conflate/tree/master/profiles
# command to use:
# conflate --changes preview.json --output results.osm charging-stations.py
# conflate --changes preview-improved-version.json --output results-improved-version.osm charging-stations-improved-version.py
# source data preview
# https://maps.london.gov.uk/geoserver/gis/wms?service=WMS&version=1.1.0&request=GetMap&layers=gis%3Alondon_charging_stations&bbox=-0.49845770990034466%2C51.29667980345268%2C0.2505595121779243%2C51.68268223925517&width=768&height=395&srs=EPSG%3A4326&format=application/openlayers
@ -60,11 +60,13 @@ def dataset(download_url):
# e.g. "sitename":"Canary Wharf (location tbd)"
if len(el['geometry']['coordinates']) == 2:
row = {
"id": el['properties']['location'] + '<' + str(counter) + '>',
## NOTE the id has to be numeric to create, but can be later replaced in the
# tags.ref:london_charging_stations tag with something like the location field, which is more uniquely identifiying
"id": counter,
"lat": float(el['geometry']['coordinates'][1]),
"lon": float(el['geometry']['coordinates'][0]),
"tags": {
# ref=*
"ref":el['properties']['location'],
"opening_hours": el['properties']['operation_time2'],
"operator": el['properties']['operator'],
"amenity": "charging_station",


+ 1001
- 1001
preview-improved-version.json
File diff suppressed because it is too large
View File


+ 1
- 1
results-improved-version.osm
File diff suppressed because it is too large
View File