Skip to content

Commit

Permalink
Merge pull request #303 from ropensci/missing_links
Browse files Browse the repository at this point in the history
Fix missing links
  • Loading branch information
agila5 authored Nov 8, 2024
2 parents 168fb69 + 7cf9a07 commit ef458be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
17 changes: 10 additions & 7 deletions R/get-network.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
#' to `yes`, `designated`, `permissive` or `destination` (see
#' [here](https://wiki.openstreetmap.org/wiki/Bicycle#Bicycle_Restrictions)
#' for more details);
#' - The `access` tag is not equal to `private` or `no`;
#' - The `access` tag is not equal to `private` or `no` unless `bicycle` is
#' equal to `yes`, `permissive` or `designated` (see #289);
#' - The `bicycle` tag is not equal to `no`, `use_sidepath`, `private`, or
#' `restricted`;
#' - The `service` tag does not contain the string `private` (i.e.
Expand All @@ -53,7 +54,8 @@
#' `raceway`, `motorway` or `motorway_link`;
#' - The `highway` tag is not equal to `cycleway` unless the `foot` tag is
#' equal to `yes`;
#' - The `access` tag is not equal to `private` or `no`;
#' - The `access` tag is not equal to `private` or `no` unless `foot` is
#' equal to `yes`, `permissive`, or `designated` (see #289);
#' - The `foot` tag is not equal to `no`, `use_sidepath`, `private`, or
#' `restricted`;
#' - The `service` tag does not contain the string `private`
Expand All @@ -67,7 +69,8 @@
#' `bus_guideway`, `byway`, `construction`, `corridor`, `elevator`, `fixme`,
#' `escalator`, `gallop`, `historic`, `no`, `planned`, `platform`, `proposed`,
#' `cycleway`, `pedestrian`, `bridleway`, `path`, or `footway`;
#' - The `access` tag is not equal to `private` or `no`;
#' - The `access` tag is not equal to `private` or `no` unless `motor_vehicle` is
#' equal to `yes`, `permissive`, or `designated` (see #289);
#' - The `service` tag does not contain the string `private` (i.e. `private`,
#' `private_access` and similar).
#'
Expand Down Expand Up @@ -181,7 +184,7 @@ load_options_cycling = function(place) {
'pedestrian') OR bicycle IN ('yes', 'designated', 'permissive', 'destination')
)
AND
(access IS NULL OR access NOT IN ('private', 'no'))
(access IS NULL OR (access NOT IN ('private', 'no') OR bicycle IN ('yes', 'permissive', 'designated')))
AND
(bicycle IS NULL OR bicycle NOT IN ('private', 'no', 'use_sidepath', 'restricted'))
AND
Expand Down Expand Up @@ -217,7 +220,7 @@ load_options_walking = function(place) {
AND
(highway IS NULL OR highway <> 'cycleway' OR foot IN ('yes', 'designated', 'permissive', 'destination'))
AND
(access IS NULL OR access NOT IN ('private', 'no'))
(access IS NULL OR (access NOT IN ('private', 'no') OR foot IN ('yes', 'permissive', 'designated')))
AND
(foot IS NULL OR foot NOT IN ('private', 'no', 'use_sidepath', 'restricted'))
AND
Expand All @@ -239,7 +242,7 @@ load_options_driving = function(place) {
list(
place = place,
layer = "lines",
extra_tags = c("access", "service","oneway"),
extra_tags = c("access", "service", "oneway", "motor_vehicle"),
vectortranslate_options = c(
"-where", "
(highway IS NOT NULL)
Expand All @@ -251,7 +254,7 @@ load_options_driving = function(place) {
'steps'
))
AND
(access IS NULL OR access NOT IN ('private', 'no'))
(access IS NULL OR (access NOT IN ('private', 'no') OR motor_vehicle IN ('yes', 'permissive', 'designated')))
AND
(service IS NULL OR service NOT ILIKE 'private%')
"
Expand Down
9 changes: 6 additions & 3 deletions man/oe_get_network.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef458be

Please sign in to comment.