Closed joeytalbot closed 1 year ago
Hi @joeytalbot. Are you sure that you are using the last version of the package? I see no error.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(osmextract)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright.
#> Check the package website, https://docs.ropensci.org/osmextract/, for more details.
osm_lines = oe_get_network(
place = "Tyne and Wear",
mode = "cycling"
)
#> The input place was matched with: Tyne and Wear
#> The chosen file was already detected in the download directory. Skip downloading.
#> Starting with the vectortranslate operations on the input file!
#> 0...10...20...30...40...50...60...70...80...90...100 - done.
#> Finished the vectortranslate operations on the input file!
#> Reading layer `lines' from data source
#> `D:\osm-data\geofabrik_tyne-and-wear-latest.gpkg' using driver `GPKG'
#> Simple feature collection with 59159 features and 12 fields
#> Geometry type: LINESTRING
#> Dimension: XY
#> Bounding box: xmin: -1.878213 ymin: 54.79363 xmax: -1.346884 ymax: 55.08401
#> Geodetic CRS: WGS 84
filter(osm_lines, highway == "motorway")
#> Simple feature collection with 0 features and 12 fields
#> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
#> Geodetic CRS: WGS 84
#> [1] osm_id name highway waterway aerialway barrier
#> [7] man_made access bicycle service z_order other_tags
#> [13] geometry
#> <0 rows> (or 0-length row.names)
filter(osm_lines, highway == "motorway_link")
#> Simple feature collection with 0 features and 12 fields
#> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
#> Geodetic CRS: WGS 84
#> [1] osm_id name highway waterway aerialway barrier
#> [7] man_made access bicycle service z_order other_tags
#> [13] geometry
#> <0 rows> (or 0-length row.names)
Created on 2023-01-12 with reprex v2.0.2
Hi @agila5 I had osmextract v0.4.1 which I thought was the latest version, but now I've installed v0.4.1.9000 and it doesn't include motorways in the cycle routing! Thank you :)
You're welcome! Anyway, it's not your fault and I will work on a new release really soon.
The documentation for
oe_get_network()
states that for "cycling":However the results include highways tagged "motoway" and "motorway_link", which are not tagged "bicycle=yes"