Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early morning timetable (#22) #24

Merged
merged 109 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
ff773be
Early morning timetable (#22)
StevePem Aug 2, 2023
232d64d
Trunk roads walkable/cyclable by default
StevePem Aug 3, 2023
1743e13
Remove specific Melbourne corrections
StevePem Aug 3, 2023
fba3434
CRS as parameter not hard-coded
StevePem Aug 4, 2023
0d83dbf
Fix missing CRS
StevePem Aug 4, 2023
0c3e3fa
Fix error when can't find geometry for NA
StevePem Aug 4, 2023
fdc1fce
handle densification for lines digitised in either direction
StevePem Aug 4, 2023
c99bea9
correctly recognise class of network
StevePem Aug 4, 2023
d5a5005
fix writing vehicleTripMatching
StevePem Aug 5, 2023
b661471
cycling file locations and flags
StevePem Aug 9, 2023
51c8fc8
LTS, LTS impedance, slope impedance
StevePem Aug 15, 2023
be526e9
Add destinations to network
StevePem Aug 16, 2023
4476eb4
Merge pull request #25 from matsim-melbourne/bikeAccessibility
alanboth Aug 22, 2023
418bba6
adding osmconver to renv and updating packages
jafshin Sep 13, 2023
2b87f27
should not remove links with parking info - might be on street parking
jafshin Sep 14, 2023
8f11545
surface impedance
StevePem Sep 15, 2023
ef4d1a8
comment out testing line
StevePem Sep 15, 2023
d1fc3e1
fix function parameters
StevePem Sep 15, 2023
2c4a953
there is an issue with invalid polygons, removing them for now, to be…
jafshin Sep 18, 2023
95099c5
improve tag key:value pair splitting and processing
StevePem Sep 29, 2023
fead62b
commenting out invalid polygon issue for further review
StevePem Sep 29, 2023
8d196cb
Revert "improve tag key:value pair splitting and processing"
StevePem Sep 29, 2023
6cfcb46
improve tag key:value pair splitting and processing
StevePem Sep 29, 2023
66184c0
add ndvi to network
StevePem Sep 29, 2023
001608d
group city specific parameters together
StevePem Sep 30, 2023
8e8c17c
invalid polygon error detection
StevePem Oct 12, 2023
e50a8fd
adding osmconver to renv and updating packages
jafshin Sep 13, 2023
fd11677
should not remove links with parking info - might be on street parking
jafshin Sep 14, 2023
3ff2c22
comment out testing line
StevePem Sep 15, 2023
b9d0523
fix function parameters
StevePem Sep 15, 2023
e7296d0
there is an issue with invalid polygons, removing them for now, to be…
jafshin Sep 18, 2023
7fbd2b8
improve tag key:value pair splitting and processing
StevePem Sep 29, 2023
1ae702d
commenting out invalid polygon issue for further review
StevePem Sep 29, 2023
0fde0fa
Revert "improve tag key:value pair splitting and processing"
StevePem Sep 29, 2023
9f61b76
improve tag key:value pair splitting and processing
StevePem Sep 29, 2023
2096413
add ndvi to network
StevePem Sep 29, 2023
ebfab62
group city specific parameters together
StevePem Sep 30, 2023
6cdc3e5
invalid polygon error detection
StevePem Oct 12, 2023
8733207
retain destination area and location details
StevePem Oct 27, 2023
89324f5
parking POIs
StevePem Nov 7, 2023
8fd780f
Destinations - PT from GTFS and other improvements
StevePem Jan 9, 2024
0f95a14
override cycleway defaults where footpaths tagged as cyclable
StevePem Jan 9, 2024
93696a3
correct parameters
StevePem Jan 10, 2024
ba85294
Resolving conflicts
StevePem Jan 10, 2024
8d8816f
Merge pull request #26 from matsim-melbourne/bikeAccessibility
StevePem Jan 10, 2024
6a2352c
download osm extract
StevePem Jan 11, 2024
c124aae
processing OSM network, in progress
StevePem Jan 14, 2024
1f78b62
process OSM network
StevePem Jan 17, 2024
5f6cd45
correct id field
StevePem Jan 18, 2024
8d5cbdc
change default mode for 'track' from 'cycle' to both 'cycle' and 'walk'
StevePem Jan 19, 2024
0ae2423
conforming other scripts to bash/sql refactoring
StevePem Jan 22, 2024
553b739
Update LICENSE (#27)
jafshin Jan 25, 2024
ebd3e33
updating renv packages and using tidverse instead of individual packages
jafshin Jan 29, 2024
7d32028
data folder is in the main dir
jafshin Jan 29, 2024
ee28f7d
adding retainDownload to func call - it is a local variable and must …
jafshin Jan 29, 2024
7c61b00
adding retainDowlonad to the function file too
jafshin Jan 29, 2024
a19f6f8
making the default to build from osm
jafshin Jan 29, 2024
e72951c
updating the renv file
jafshin Jan 29, 2024
d99ee1a
fixing the dir url for data and setting process osm to default
jafshin Jan 29, 2024
339797d
update readme information
StevePem Jan 29, 2024
929707b
deleting bash and sql scripts for network generation, replaced by pro…
StevePem Jan 30, 2024
83c5859
avoid trunk roads being converted to non-cyclable when bikepaths rejo…
StevePem Jan 30, 2024
b6bfd0a
change highway order for service so bikepaths can be separated from s…
StevePem Feb 1, 2024
1dc4fec
fixed the issue where some line-segments overlapped, causing their in…
Feb 5, 2024
a753aec
improve treatment of intersections used to split paths by keeping lin…
StevePem Feb 5, 2024
afbb152
Forgot to save the network.sql file. This one will work
Feb 5, 2024
c619f39
Separate input/output parameters into 'data' and 'output' directories
StevePem Feb 7, 2024
07ec9a9
Merge branch 'dev' of https://github.com/matsim-melbourne/network int…
StevePem Feb 7, 2024
dbc5987
tidy location and logging for output writing
StevePem Feb 7, 2024
c19d673
Update readme documents for new data organisation and preparation
StevePem Feb 7, 2024
356aaa1
temporarily remove in-progress work on elevation
StevePem Feb 7, 2024
03030d9
add elevation file locations and set addElevation to true
StevePem Feb 8, 2024
350cc39
data information and preparation tool for elevation
StevePem Feb 8, 2024
46f639a
update destinations - pseudo entry nodes for parks and schools; separ…
StevePem Feb 9, 2024
ff57489
convert OSM 'lanes' tags for whole road to 'permlanes' in each direction
StevePem Feb 12, 2024
97de077
Minor change to allow osm_id to flow through to output if present
Feb 12, 2024
d36afb1
Merge branch 'dev' of github.com:matsim-melbourne/network into dev
Feb 12, 2024
cdf6d15
generalise buffer distance - used for several purposes
StevePem Feb 13, 2024
f8a05b8
update GTFS analysis dates
StevePem Feb 13, 2024
dd8b7a8
GTFS using region file, buffered to 'regionBufferDist'
StevePem Feb 13, 2024
ef38895
update locations and other tidying
StevePem Feb 13, 2024
5866342
allow for dates containing dashes
StevePem Feb 13, 2024
8a2b4e5
retain departure/arrival times after midnight
StevePem Feb 13, 2024
21d0485
Merge branch 'dev' of https://github.com/matsim-melbourne/network int…
StevePem Feb 13, 2024
6c5c4ba
extend routes to include regional coach (type 5)
StevePem Feb 13, 2024
0942c19
avoid error in testing whether studyRegion is NA
StevePem Feb 13, 2024
5b4c40d
retain trips with minimum of 2 (rather than 3) stops
StevePem Feb 13, 2024
faf00a6
tidying echo statements
StevePem Feb 13, 2024
3639f94
tidy default parameters
StevePem Feb 13, 2024
be5a02b
update gtfs for onroad bus running; single analysis date rather than …
StevePem Feb 20, 2024
cf619d7
Update to activate NDVI functionality
StevePem Feb 21, 2024
966b4bd
Update instructions for using GTFS
StevePem Feb 21, 2024
5b0acb6
correct reprojection of ndvi raster
StevePem Feb 26, 2024
ec112c5
flow multiple ndvi values (if present) through to final output
StevePem Feb 26, 2024
34c14a5
flow osm_id thorugh to final output
StevePem Feb 26, 2024
9497a82
elevation: switch library from raster to terror; add support for repr…
StevePem Feb 26, 2024
399858d
increase timeout on OSM extract download, to allow for large file/slo…
StevePem Feb 26, 2024
82883ff
change convention for naming PT pseudo links to ensure no duplicates
StevePem Feb 29, 2024
f4cdd97
update file locations
StevePem Feb 29, 2024
40cb9dc
increase timeout to allow for slow download or large OSM extract
StevePem Feb 29, 2024
c9f6886
crop OSM extract to buffered region (rather than merely its bounding …
StevePem Feb 29, 2024
4fd9099
ensure only destinations in buffered region are returned
StevePem Feb 29, 2024
4e15760
remove unneeded comment
StevePem Feb 29, 2024
fc37cbe
remove or comment out saving intermediate processing outputs
StevePem Feb 29, 2024
ccf6876
update comment re DEM file projection
StevePem Feb 29, 2024
269c887
update location of pt outputs from 'gtfs' to 'pt'
StevePem Feb 29, 2024
8554dac
create pt output directory in gtfs2PtNetwork.R rather than NetworkGen…
StevePem Feb 29, 2024
b531fd3
more progress reporting where discarding problem features
StevePem Mar 19, 2024
74f7352
support for region or unconfigured sqlite in different CRS
StevePem Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions CyclingImpedances.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Using a network created by 'NetworkGenerator.R', add impedances for
# calculating cycling accessibility

# Assumes input network is a one-way network that includes elevation,
# and that one-way daily traffic volumes are available

addImpedances <- function() {

# Parameters -----------------------------------------------------------------
# Input network, to which cycling impedances are to be added, with layer names
# input.network <- "./output/test/network.sqlite"
input.network <- "./output/test/melbourne_network.sqlite" #<<< OLD VERSION FOR TESTING
input.node.layer <- "nodes"
input.link.layer <- "links"

# Traffic file, with links layer name - file must match input.network,
# and with a 'total_vol' column containing 1-way daily traffic
# traffic.file <- "./output/test/network_traffic.sqlite"
traffic.file <- "./output/test/links_with_traffic.sqlite" #<<< OLD VERSION FOR TESTING
traffic.link.layer <- "cars_aht"

# Traffic multiplier - where volumes are for a sample of traffic only (eg
# multiplier of 20 if the volumes are a 5% sample; use 1 if full volumes)
traffic.multiplier <- 10

# Output location - same directory as input.network
output.location <- paste0(path_dir(input.network), "/networkWeighted.sqlite")


# Packages and functions -----------------------------------------------------
library(dplyr)
library(sf)
library(fs)
library(osmextract)
library(stringr)

dir_walk(path="./functions/",source, recurse=T, type = "file")


# Load input network and traffic file ----------------------------------------
input.nodes <- st_read(input.network, layer = input.node.layer)
input.links <- st_read(input.network, layer = input.link.layer)
traffic.links <- st_read(traffic.file, layer = traffic.link.layer)


# Add LTS and its impedance --------------------------------------------------
echo("Adding daily traffic volumes\n")
networkTraffic <- addTraffic(input.nodes,
input.links,
traffic.links,
traffic.multiplier)
## TO DO - maybe traffic can just be joined on link_id? See whether traffic
## file neatly uses the link_id's from the one-way input (also in cycling-adoption)

echo("Adding LTS and its impedance\n")
networkLTS <- addLTS(networkTraffic[[1]], networkTraffic[[2]])


# Add slope impedance --------------------------------------------------------
echo("Adding slope impedance")
networkSlope <- addSlopeImped(networkLTS[[1]], networkLTS[[2]])


# Add surface impedance --------------------------------------------------------
echo("Adding surface impedance")
networkSurf <- addSurfImped(networkSlope[[1]], networkSlope[[2]])


# Calculate total weight -----------------------------------------------------
echo("Calculating cycling weight")
networkWeighted <-
list(networkSurf[[1]],
networkSurf[[2]] %>%
mutate(cycle.weight = length + LTS_imped + slope_imped + surf_imped))


# write output ---------------------------------------------------------------
st_write(networkWeighted[[1]], "./output/test/networkWeighted.sqlite", layer = "nodes")
st_write(networkWeighted[[2]], "./output/test/networkWeighted.sqlite", layer = "links")

}
695 changes: 21 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

Loading
Loading