Skip to content

Commit

Permalink
override cycleway defaults where footpaths tagged as cyclable
Browse files Browse the repository at this point in the history
  • Loading branch information
StevePem committed Jan 9, 2024
1 parent 8fd780f commit 0f95a14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions functions/processOsmTags.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ processOsmTags <- function(osm_df,this_defaults_df){
if(any(cycleway_tags=="track")& df$highway[1]!="cycleway") df$cycleway[1]=3
if(any(foot_tags=="no")& df$highway[1]=="cycleway") df$cycleway[1]=5
if(any(car_tags=="no")) df$is_car[1]=0
if(df$is_car[1]==0 & any(bicycle_tags %in% c("yes", "designated")) & df$cycleway[1]<5) df$cycleway[1]=4
if(any(foot_tags=="no")) df$is_walk[1]=0
if(any(foot_tags %in% c("yes","designated"))) df$is_walk[1]=1
if(df$cycleway[1]>0 | any(bicycle_tags %in% c("yes","designated"))) df$is_cycle[1]=1
Expand Down
2 changes: 1 addition & 1 deletion functions/restructureData.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ restructureData <- function(networkList, highway_lookup,
# finding merged bikepath ids
bikepath_uids <- links %>%
st_drop_geometry() %>%
filter(cycleway=="4" & highway_order<15) %>%
filter((cycleway=="4" | cycleway=="5") & highway_order<15) %>%
dplyr::select(uid) %>% unlist() %>% as.double()
# changing merged bikepaths to regular bikepaths
bikepaths <- links %>%
Expand Down

0 comments on commit 0f95a14

Please sign in to comment.