Skip to content

Commit

Permalink
Try elevation data in the Edinburgh example. #18
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Feb 23, 2024
1 parent 5be7562 commit 6f31e13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/edinburgh/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"requests": {
"description": "Existing home to school cycling trips in Edinburgh, from NPT data. The origins and destinations are both building centroids, since not every zone has a school.",
"description": "Existing home to school cycling trips in Edinburgh, from NPT data. The origins and destinations are both building centroids, since not every zone has a school. Elevation is included.",
"pattern": {
"BetweenZones": {
"zones_path": "zones.geojson",
Expand All @@ -12,5 +12,6 @@
},
"cost": "Distance",
"uptake": "GoDutchPCT",
"lts": "BikeOttawa"
"lts": "BikeOttawa",
"elevation_geotiff": "UK-dem-50m-4326.tif"
}
9 changes: 9 additions & 0 deletions examples/edinburgh/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ def makeOSM():
)


def makeElevation():
download(
url="https://play.abstreet.org/dev/data/input/shared/elevation/UK-dem-50m-4326.tif.gz",
outputFilename="input/UK-dem-50m-4326.tif.gz"
)
run(["gunzip", "input/UK-dem-50m-4326.tif.gz"])


def makeOrigins():
# Not every zone has a school, so for now, just use all buildings for both
# origins and destinations
Expand Down Expand Up @@ -80,6 +88,7 @@ def makeOD():
checkDependencies()
run(["mkdir", "-p", "input"])
makeOSM()
makeElevation()
makeOrigins()
makeDestinations()
makeZones()
Expand Down

0 comments on commit 6f31e13

Please sign in to comment.