Skip to content

Commit

Permalink
Use real OD data for Lisbon. #56
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Feb 26, 2024
1 parent b86c01a commit a6555f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
9 changes: 7 additions & 2 deletions examples/lisbon/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"requests": {
"description": "One trip from every building to the nearest (as the crow flies) school. Elevation is included.",
"pattern": "FromEveryOriginToNearestDestination",
"pattern": {
"BetweenZones": {
"zones_path": "zones.geojson",
"csv_path": "od.csv"
}
},
"origins_path": "buildings.geojson",
"destinations_path": "schools.geojson"
"destinations_path": "buildings.geojson"
},
"cost": {
"OsmHighwayType": {
Expand Down
22 changes: 17 additions & 5 deletions examples/lisbon/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,21 @@ def makeOrigins():


def makeDestinations():
# School centroids as destinations
extractCentroids(
osmInput="input/input.osm.pbf",
geojsonOutput="input/schools.geojson",
where=f"amenity = 'school'",
# Same as origins
pass


def makeZones():
download(
url="https://github.com/U-Shift/biclar/releases/download/0.0.1/zones.geojson",
outputFilename="input/zones.geojson",
)


def makeOD():
download(
url="https://github.com/U-Shift/biclar/releases/download/0.0.1/od.csv",
outputFilename="input/od.csv",
)


Expand All @@ -53,3 +63,5 @@ def makeDestinations():
makeElevation()
makeOrigins()
makeDestinations()
makeZones()
makeOD()

0 comments on commit a6555f3

Please sign in to comment.