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

Feature: pedestrian[speed] in isoline() #175

Closed
xavidp opened this issue Jan 27, 2025 · 2 comments · Fixed by #177
Closed

Feature: pedestrian[speed] in isoline() #175

xavidp opened this issue Jan 27, 2025 · 2 comments · Fixed by #177
Assignees
Labels
feature New feature or enhancement

Comments

@xavidp
Copy link

xavidp commented Jan 27, 2025

Expose pedestrian[speed] param through isoline()

Would it be possible to expose (through the isoline() function) the pedestrian[speed] param that the isoline-routing-api seems to accept?
https://www.here.com/docs/bundle/isoline-routing-api-developer-guide-v8/page/topics/use-cases/pedestrian-isoline.html

It would be helpful to use herer for isoline calculation for other population sectors, like elders or disabled, so that we (3rd party public administrations, for instance) can adapt some strategies, using the hereR package, to take into consideration their adapted walking speeds, to reach some public facilities, etc.

Thanks in advanced for considering it!

@xavidp xavidp added the feature New feature or enhancement label Jan 27, 2025
munterfi added a commit that referenced this issue Feb 20, 2025
The speed limit is now configurable via the `speed_limit` parameter, setting `&pedestrian[speed]=<LIMIT>` for pedestrian mode or `&vehicle[speedCap]=<LIMIT>` for vehicle-based modes in API requests.

Refs: #175
@munterfi munterfi self-assigned this Feb 20, 2025
@munterfi
Copy link
Owner

Thanks @xavidp for reporting.

The isoline() and route() request now exposes a speed_limit (m/s) parameter supporting all modes, except "bicycle". The speed limit is set via &pedestrian[speed]=<LIMIT> for pedestrian mode or &vehicle[speedCap]=<LIMIT> for vehicle-based modes in API requests.

For "pedestrian" mode, the value must be between 0.5 and 2 m/s. For vehicle-based modes (e.g. "car"), the value must be between 1 and 70 m/s.

Example with transport mode "pedestrian":

library(mapview)
library(hereR)
set_verbose(TRUE)
# set_key(...)

isoline(poi = poi[1, ], speed_limit = 0.5, transport_mode = "pedestrian", aggregate = TRUE) |>
  mapview(zcol = "range")

isoline(poi = poi[1, ], speed_limit = 2, transport_mode = "pedestrian", aggregate = TRUE) |>
  mapview(zcol = "range")

Image

Image

Can you check with the development version of the package remotes::install_github("munterfi/hereR") if it solves the issue for you?

Tests

Isoline

  • pedestrian
# no custom speed limit
isoline(poi = poi[1, ], transport_mode = "pedestrian")
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 9.2 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.256741 ymin: 47.04642 xmax: 8.291202 ymax: 47.05805
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:38:46 2025-02-20 17:43:46   300
#> 2  1    2 2025-02-20 17:38:46 2025-02-20 17:48:46   600
#> 3  1    3 2025-02-20 17:38:46 2025-02-20 17:53:46   900
#> 4  1    4 2025-02-20 17:38:46 2025-02-20 17:58:46  1200
#> 5  1    5 2025-02-20 17:38:46 2025-02-20 18:03:46  1500
#> 6  1    6 2025-02-20 17:38:46 2025-02-20 18:08:46  1800
#>                         geometry
#> 1 POLYGON ((8.27616 47.05015,...
#> 2 POLYGON ((8.27204 47.04998,...
#> 3 POLYGON ((8.268263 47.04929...
#> 4 POLYGON ((8.265517 47.04998...
#> 5 POLYGON ((8.261054 47.04809...
#> 6 POLYGON ((8.256934 47.04672...

# low speed value
isoline(poi = poi[1, ], speed_limit = 0.5, transport_mode = "pedestrian")
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 3.4 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.268092 ymin: 47.04861 xmax: 8.2797 ymax: 47.05341
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:38:47 2025-02-20 17:43:47   300
#> 2  1    2 2025-02-20 17:38:47 2025-02-20 17:48:47   600
#> 3  1    3 2025-02-20 17:38:47 2025-02-20 17:53:47   900
#> 4  1    4 2025-02-20 17:38:47 2025-02-20 17:58:47  1200
#> 5  1    5 2025-02-20 17:38:47 2025-02-20 18:03:47  1500
#> 6  1    6 2025-02-20 17:38:47 2025-02-20 18:08:47  1800
#>                         geometry
#> 1 POLYGON ((8.277533 47.05049...
#> 2 POLYGON ((8.27616 47.05015,...
#> 3 POLYGON ((8.27337 47.0502, ...
#> 4 POLYGON ((8.27204 47.04998,...
#> 5 POLYGON ((8.26998 47.04981,...
#> 6 POLYGON ((8.268263 47.04929...

# high speed value
isoline(poi = poi[1, ], speed_limit = 2, transport_mode = "pedestrian")
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 12.2 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.239102 ymin: 47.03874 xmax: 8.309784 ymax: 47.06921
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:38:47 2025-02-20 17:43:47   300
#> 2  1    2 2025-02-20 17:38:47 2025-02-20 17:48:47   600
#> 3  1    3 2025-02-20 17:38:47 2025-02-20 17:53:47   900
#> 4  1    4 2025-02-20 17:38:47 2025-02-20 17:58:47  1200
#> 5  1    5 2025-02-20 17:38:47 2025-02-20 18:03:47  1500
#> 6  1    6 2025-02-20 17:38:47 2025-02-20 18:08:47  1800
#>                         geometry
#> 1 POLYGON ((8.272061 47.04998...
#> 2 POLYGON ((8.265796 47.05007...
#> 3 POLYGON ((8.257213 47.04698...
#> 4 POLYGON ((8.251805 47.04758...
#> 5 POLYGON ((8.245196 47.04286...
#> 6 POLYGON ((8.239446 47.04105...
  • vehicle-based: "car", "truck", "bicycle", "scooter", "taxi", "bus" and "privateBus"
# no custom speed limit
isoline(poi = poi[1, ], transport_mode = "car")
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 9.9 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 7.948608 ymin: 46.83472 xmax: 8.613281 ymax: 47.3291
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:06 2025-02-20 17:35:06   300
#> 2  1    2 2025-02-20 17:30:06 2025-02-20 17:40:06   600
#> 3  1    3 2025-02-20 17:30:06 2025-02-20 17:45:06   900
#> 4  1    4 2025-02-20 17:30:06 2025-02-20 17:50:06  1200
#> 5  1    5 2025-02-20 17:30:06 2025-02-20 17:55:06  1500
#> 6  1    6 2025-02-20 17:30:06 2025-02-20 18:00:06  1800
#>                         geometry
#> 1 POLYGON ((8.250046 47.05032...
#> 2 POLYGON ((8.189621 47.04483...
#> 3 POLYGON ((8.11409 47.05444,...
#> 4 POLYGON ((8.075638 47.05994...
#> 5 POLYGON ((8.053665 47.20825...
#> 6 POLYGON ((7.954788 47.2522,...

# custom speed limit
isoline(poi = poi[1, ], transport_mode = "car", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 5.9 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.253307 ymin: 47.045 xmax: 8.295364 ymax: 47.06011
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:06 2025-02-20 17:35:06   300
#> 2  1    2 2025-02-20 17:30:06 2025-02-20 17:40:06   600
#> 3  1    3 2025-02-20 17:30:06 2025-02-20 17:45:06   900
#> 4  1    4 2025-02-20 17:30:06 2025-02-20 17:50:06  1200
#> 5  1    5 2025-02-20 17:30:06 2025-02-20 17:55:06  1500
#> 6  1    6 2025-02-20 17:30:06 2025-02-20 18:00:06  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.266332 47.04899...
#> 4 POLYGON ((8.263586 47.05002...
#> 5 POLYGON ((8.257234 47.04985...
#> 6 POLYGON ((8.253458 47.04814...
isoline(poi = poi[1, ], transport_mode = "truck", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 10.9 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.257105 ymin: 47.04723 xmax: 8.292446 ymax: 47.05805
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:06 2025-02-20 17:35:06   300
#> 2  1    2 2025-02-20 17:30:06 2025-02-20 17:40:06   600
#> 3  1    3 2025-02-20 17:30:06 2025-02-20 17:45:06   900
#> 4  1    4 2025-02-20 17:30:06 2025-02-20 17:50:06  1200
#> 5  1    5 2025-02-20 17:30:06 2025-02-20 17:55:06  1500
#> 6  1    6 2025-02-20 17:30:06 2025-02-20 18:00:06  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.268263 47.04929...
#> 4 POLYGON ((8.265302 47.04985...
#> 5 POLYGON ((8.260367 47.04912...
#> 6 POLYGON ((8.257234 47.05037...
isoline(poi = poi[1, ], transport_mode = "bicycle", speed_limit = 1)
#> Warning in .add_speed_limit(url, speed_limit, transport_mode): Setting a 'speed_limit' with transport mode 'bicycle' is not supported, omitting...
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 18.6 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.195801 ymin: 47.0105 xmax: 8.350124 ymax: 47.0929
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:06 2025-02-20 17:35:06   300
#> 2  1    2 2025-02-20 17:30:06 2025-02-20 17:40:06   600
#> 3  1    3 2025-02-20 17:30:06 2025-02-20 17:45:06   900
#> 4  1    4 2025-02-20 17:30:06 2025-02-20 17:50:06  1200
#> 5  1    5 2025-02-20 17:30:06 2025-02-20 17:55:06  1500
#> 6  1    6 2025-02-20 17:30:06 2025-02-20 18:00:06  1800
#>                         geometry
#> 1 POLYGON ((8.265924 47.05101...
#> 2 POLYGON ((8.252707 47.04569...
#> 3 POLYGON ((8.24172 47.04157,...
#> 4 POLYGON ((8.224039 47.0414,...
#> 5 POLYGON ((8.210993 47.04277...
#> 6 POLYGON ((8.196573 47.0414,...
isoline(poi = poi[1, ], transport_mode = "scooter", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 11 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.256419 ymin: 47.04723 xmax: 8.292446 ymax: 47.05822
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:06 2025-02-20 17:35:06   300
#> 2  1    2 2025-02-20 17:30:06 2025-02-20 17:40:06   600
#> 3  1    3 2025-02-20 17:30:06 2025-02-20 17:45:06   900
#> 4  1    4 2025-02-20 17:30:06 2025-02-20 17:50:06  1200
#> 5  1    5 2025-02-20 17:30:06 2025-02-20 17:55:06  1500
#> 6  1    6 2025-02-20 17:30:06 2025-02-20 18:00:06  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.26792 47.04861,...
#> 4 POLYGON ((8.263285 47.04843...
#> 5 POLYGON ((8.259509 47.04775...
#> 6 POLYGON ((8.256547 47.04745...
isoline(poi = poi[1, ], transport_mode = "taxi", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 11 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.256419 ymin: 47.04723 xmax: 8.292446 ymax: 47.05822
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:07 2025-02-20 17:35:07   300
#> 2  1    2 2025-02-20 17:30:07 2025-02-20 17:40:07   600
#> 3  1    3 2025-02-20 17:30:07 2025-02-20 17:45:07   900
#> 4  1    4 2025-02-20 17:30:07 2025-02-20 17:50:07  1200
#> 5  1    5 2025-02-20 17:30:07 2025-02-20 17:55:07  1500
#> 6  1    6 2025-02-20 17:30:07 2025-02-20 18:00:07  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.26792 47.04861,...
#> 4 POLYGON ((8.263285 47.04843...
#> 5 POLYGON ((8.259509 47.04775...
#> 6 POLYGON ((8.256547 47.04745...
isoline(poi = poi[1, ], transport_mode = "bus", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 10.9 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.256419 ymin: 47.04723 xmax: 8.291888 ymax: 47.05822
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:07 2025-02-20 17:35:07   300
#> 2  1    2 2025-02-20 17:30:07 2025-02-20 17:40:07   600
#> 3  1    3 2025-02-20 17:30:07 2025-02-20 17:45:07   900
#> 4  1    4 2025-02-20 17:30:07 2025-02-20 17:50:07  1200
#> 5  1    5 2025-02-20 17:30:07 2025-02-20 17:55:07  1500
#> 6  1    6 2025-02-20 17:30:07 2025-02-20 18:00:07  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.26792 47.04861,...
#> 4 POLYGON ((8.263285 47.04843...
#> 5 POLYGON ((8.259509 47.04775...
#> 6 POLYGON ((8.256547 47.04745...
isoline(poi = poi[1, ], transport_mode = "privateBus", speed_limit = 1)
#> Sending 1 request(s) with 1 RPS to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 10.9 Kb
#> Simple feature collection with 6 features and 5 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 8.256419 ymin: 47.04723 xmax: 8.291888 ymax: 47.05822
#> Geodetic CRS:  WGS 84
#>   id rank           departure             arrival range
#> 1  1    1 2025-02-20 17:30:07 2025-02-20 17:35:07   300
#> 2  1    2 2025-02-20 17:30:07 2025-02-20 17:40:07   600
#> 3  1    3 2025-02-20 17:30:07 2025-02-20 17:45:07   900
#> 4  1    4 2025-02-20 17:30:07 2025-02-20 17:50:07  1200
#> 5  1    5 2025-02-20 17:30:07 2025-02-20 17:55:07  1500
#> 6  1    6 2025-02-20 17:30:07 2025-02-20 18:00:07  1800
#>                         geometry
#> 1 POLYGON ((8.274786 47.05049...
#> 2 POLYGON ((8.270838 47.04981...
#> 3 POLYGON ((8.26792 47.04861,...
#> 4 POLYGON ((8.263285 47.04843...
#> 5 POLYGON ((8.259509 47.04775...
#> 6 POLYGON ((8.256547 47.04745...

Route

  • pedestrian
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "pedestrian")
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 60 Kb
#> Simple feature collection with 3 features and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 7.71654 ymin: 46.00292 xmax: 9.0397 ymax: 47.05053
#> z_range:       zmin: 99 zmax: 2218
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival       type
#> 1  1    1       1 2025-02-20 17:30:12 2025-02-22 15:39:15 pedestrian
#> 2  1    1       2 2025-02-22 15:59:15 2025-02-22 16:25:32    transit
#> 3  1    1       3 2025-02-22 16:35:32 2025-02-24 01:11:53 pedestrian
#>              mode distance duration duration_base consumption tolls
#> 1      pedestrian   165514   166143        166143          NA     0
#> 2 carShuttleTrain    17521     1577            NA          NA     0
#> 3      pedestrian   116761   117381        117381          NA     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
#> 2 LINESTRING Z (8.34307 46.53...
#> 3 LINESTRING Z (8.50282 46.59...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "pedestrian", speed_limit = 0.5)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 60 Kb
#> Simple feature collection with 3 features and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 7.71654 ymin: 46.00292 xmax: 9.0397 ymax: 47.05053
#> z_range:       zmin: 99 zmax: 2218
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival       type
#> 1  1    1       1 2025-02-20 17:30:12 2025-02-24 13:37:49 pedestrian
#> 2  1    1       2 2025-02-24 13:57:49 2025-02-24 14:24:06    transit
#> 3  1    1       3 2025-02-24 14:34:06 2025-02-27 07:36:28 pedestrian
#>              mode distance duration duration_base consumption tolls
#> 1      pedestrian   165514   331657        331657          NA     0
#> 2 carShuttleTrain    17521     1577            NA          NA     0
#> 3      pedestrian   116761   234142        234142          NA     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
#> 2 LINESTRING Z (8.34307 46.53...
#> 3 LINESTRING Z (8.50282 46.59...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "pedestrian", speed_limit = 2)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 60 Kb
#> Simple feature collection with 3 features and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 7.71654 ymin: 46.00292 xmax: 9.0397 ymax: 47.05053
#> z_range:       zmin: 99 zmax: 2218
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival       type
#> 1  1    1       1 2025-02-20 17:30:13 2025-02-21 16:46:57 pedestrian
#> 2  1    1       2 2025-02-21 17:06:57 2025-02-21 17:33:14    transit
#> 3  1    1       3 2025-02-21 17:43:14 2025-02-22 10:11:43 pedestrian
#>              mode distance duration duration_base consumption tolls
#> 1      pedestrian   165514    83804         83804          NA     0
#> 2 carShuttleTrain    17521     1577            NA          NA     0
#> 3      pedestrian   116761    59309         59309          NA     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
#> 2 LINESTRING Z (8.34307 46.53...
#> 3 LINESTRING Z (8.50282 46.59...
  • vehicle-based: "car", "truck", "bicycle", "scooter", "taxi", "bus" and "privateBus"
# no custom speed limit
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "car")
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 27.1 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type mode distance
#> 1  1    1       1 2025-02-20 17:30:18 2025-02-20 19:32:04 vehicle  car   176016
#>   duration duration_base consumption tolls                       geometry
#> 1     7306          6605     69.2847 44.22 LINESTRING Z (8.27888 47.05...

# custom speed limit
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "car", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 27.1 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type mode distance
#> 1  1    1       1 2025-02-20 17:30:18 2025-02-22 13:32:39 vehicle  car   176016
#>   duration duration_base consumption tolls                       geometry
#> 1   158541        158541    332.4798 44.22 LINESTRING Z (8.27888 47.05...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "truck", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 26.9 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type  mode
#> 1  1    1       1 2025-02-20 17:30:19 2025-02-22 18:50:01 vehicle truck
#>   distance duration duration_base consumption tolls
#> 1   177412   177582        177582    367.2318     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "bicycle", speed_limit = 1)
#> Warning in .add_speed_limit(url, speed_limit, transport_mode): Setting a 'speed_limit' with transport mode 'bicycle' is not supported, omitting...
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 59.2 Kb
#> Simple feature collection with 2 features and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00292 xmax: 9.56899 ymax: 47.21833
#> z_range:       zmin: 95 zmax: 2117
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival       type       mode
#> 1  1    1       1 2025-02-20 17:30:19 2025-02-21 15:43:47    vehicle    bicycle
#> 2  1    1       2 2025-02-21 15:43:47 2025-02-21 15:44:06 pedestrian pedestrian
#>   distance duration duration_base consumption tolls
#> 1   303865    80008         80008          NA     0
#> 2       19       19            19          NA     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
#> 2 LINESTRING Z (8.97133 46.00...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "scooter", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 33.7 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03508 ymax: 47.09466
#> z_range:       zmin: 81 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type    mode
#> 1  1    1       1 2025-02-20 17:30:20 2025-02-22 18:23:12 vehicle scooter
#>   distance duration duration_base consumption tolls
#> 1   195024   175972        175972    372.9961     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "taxi", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 26.6 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type mode distance
#> 1  1    1       1 2025-02-20 17:30:21 2025-02-22 13:32:42 vehicle taxi   176016
#>   duration duration_base consumption tolls                       geometry
#> 1   158541        158541    332.4798     0 LINESTRING Z (8.27888 47.05...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "bus", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 27.4 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type mode distance
#> 1  1    1       1 2025-02-20 17:30:22 2025-02-22 13:08:46 vehicle  bus   174392
#>   duration duration_base consumption tolls                       geometry
#> 1   157104        157104    329.7878 44.22 LINESTRING Z (8.27888 47.05...
route(origin = poi[1, ], destination = poi[2, ], results = 1, transport_mode = "privateBus", speed_limit = 1)
#> Sending 1 request(s) with 5 RPS to: 'https://router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 26.5 Kb
#> Simple feature collection with 1 feature and 12 fields
#> Geometry type: LINESTRING
#> Dimension:     XYZ
#> Bounding box:  xmin: 8.27426 ymin: 46.00307 xmax: 9.03697 ymax: 47.06785
#> z_range:       zmin: 269 zmax: 1225
#> Geodetic CRS:  WGS 84
#>   id rank section           departure             arrival    type       mode
#> 1  1    1       1 2025-02-20 17:30:22 2025-02-22 13:25:50 vehicle privateBus
#>   distance duration duration_base consumption tolls
#> 1   175523   158128        158128    331.6245     0
#>                         geometry
#> 1 LINESTRING Z (8.27888 47.05...

Session info

devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.2 (2024-10-31)
#>  os       macOS Sequoia 15.3.1
#>  system   x86_64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       Europe/Zurich
#>  date     2025-02-20
#>  pandoc   3.6.3 @ /usr/local/bin/ (via rmarkdown)
#>  quarto   1.5.57 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/quarto
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package      * version    date (UTC) lib source
#>  base64enc      0.1-3      2015-07-28 [1] CRAN (R 4.4.0)
#>  cachem         1.1.0      2024-05-16 [1] CRAN (R 4.4.0)
#>  class          7.3-22     2023-05-03 [1] CRAN (R 4.4.2)
#>  classInt       0.4-11     2025-01-08 [1] CRAN (R 4.4.1)
#>  cli            3.6.3      2024-06-21 [1] CRAN (R 4.4.0)
#>  codetools      0.2-20     2024-03-31 [1] CRAN (R 4.4.2)
#>  colorspace     2.1-1      2024-07-26 [1] CRAN (R 4.4.0)
#>  crosstalk      1.2.1      2023-11-23 [1] CRAN (R 4.4.0)
#>  crul           1.5.0      2024-07-19 [1] CRAN (R 4.4.0)
#>  curl           6.2.0      2025-01-23 [1] CRAN (R 4.4.1)
#>  data.table     1.16.4     2024-12-06 [1] CRAN (R 4.4.1)
#>  DBI            1.2.3      2024-06-02 [1] CRAN (R 4.4.0)
#>  devtools       2.4.5      2022-10-11 [1] CRAN (R 4.4.0)
#>  digest         0.6.37     2024-08-19 [1] CRAN (R 4.4.1)
#>  e1071          1.7-16     2024-09-16 [1] CRAN (R 4.4.1)
#>  ellipsis       0.3.2      2021-04-29 [1] CRAN (R 4.4.0)
#>  evaluate       1.0.3      2025-01-10 [1] CRAN (R 4.4.1)
#>  fastmap        1.2.0      2024-05-15 [1] CRAN (R 4.4.0)
#>  flexpolyline   0.3.0      2023-02-12 [1] CRAN (R 4.4.0)
#>  fs             1.6.5      2024-10-30 [1] CRAN (R 4.4.1)
#>  glue           1.8.0      2024-09-30 [1] CRAN (R 4.4.1)
#>  hereR        * 1.0.1.9000 2025-02-20 [1] local
#>  htmltools      0.5.8.1    2024-04-04 [1] CRAN (R 4.4.0)
#>  htmlwidgets    1.6.4      2023-12-06 [1] CRAN (R 4.4.0)
#>  httpcode       0.3.0      2020-04-10 [1] CRAN (R 4.4.0)
#>  httpuv         1.6.15     2024-03-26 [1] CRAN (R 4.4.0)
#>  jsonlite       1.8.9      2024-09-20 [1] CRAN (R 4.4.1)
#>  KernSmooth     2.23-24    2024-05-17 [1] CRAN (R 4.4.2)
#>  knitr          1.49       2024-11-08 [1] CRAN (R 4.4.1)
#>  later          1.4.1      2024-11-27 [1] CRAN (R 4.4.1)
#>  lattice        0.22-6     2024-03-20 [1] CRAN (R 4.4.2)
#>  leafem         0.2.3      2023-09-17 [1] CRAN (R 4.4.0)
#>  leaflet        2.2.2      2024-03-26 [1] CRAN (R 4.4.0)
#>  lifecycle      1.0.4      2023-11-07 [1] CRAN (R 4.4.0)
#>  magrittr       2.0.3      2022-03-30 [1] CRAN (R 4.4.0)
#>  mapview      * 2.11.2     2023-10-13 [1] CRAN (R 4.4.0)
#>  memoise        2.0.1      2021-11-26 [1] CRAN (R 4.4.0)
#>  mime           0.12       2021-09-28 [1] CRAN (R 4.4.0)
#>  miniUI         0.1.1.1    2018-05-18 [1] CRAN (R 4.4.2)
#>  munsell        0.5.1      2024-04-01 [1] CRAN (R 4.4.0)
#>  pkgbuild       1.4.6      2025-01-16 [1] CRAN (R 4.4.1)
#>  pkgload        1.4.0      2024-06-28 [1] CRAN (R 4.4.0)
#>  png            0.1-8      2022-11-29 [1] CRAN (R 4.4.0)
#>  profvis        0.4.0      2024-09-20 [1] CRAN (R 4.4.1)
#>  promises       1.3.2      2024-11-28 [1] CRAN (R 4.4.1)
#>  proxy          0.4-27     2022-06-09 [1] CRAN (R 4.4.0)
#>  purrr          1.0.4      2025-02-05 [1] CRAN (R 4.4.1)
#>  R6             2.5.1      2021-08-19 [1] CRAN (R 4.4.0)
#>  raster         3.6-31     2025-01-16 [1] CRAN (R 4.4.1)
#>  Rcpp           1.0.14     2025-01-12 [1] CRAN (R 4.4.1)
#>  remotes        2.5.0      2024-03-17 [1] CRAN (R 4.4.0)
#>  rlang          1.1.5      2025-01-17 [1] CRAN (R 4.4.1)
#>  rmarkdown      2.29       2024-11-04 [1] CRAN (R 4.4.1)
#>  rstudioapi     0.17.1     2024-10-22 [1] CRAN (R 4.4.1)
#>  satellite      1.0.5      2024-02-10 [1] CRAN (R 4.4.0)
#>  scales         1.3.0      2023-11-28 [1] CRAN (R 4.4.0)
#>  sessioninfo    1.2.3      2025-02-05 [1] CRAN (R 4.4.1)
#>  sf             1.0-19     2024-11-05 [1] CRAN (R 4.4.1)
#>  shiny          1.10.0     2024-12-14 [1] CRAN (R 4.4.1)
#>  sp             2.2-0      2025-02-01 [1] CRAN (R 4.4.1)
#>  stringi        1.8.4      2024-05-06 [1] CRAN (R 4.4.0)
#>  stringr        1.5.1      2023-11-14 [1] CRAN (R 4.4.0)
#>  terra          1.8-21     2025-02-10 [1] CRAN (R 4.4.1)
#>  units          0.8-5      2023-11-28 [1] CRAN (R 4.4.0)
#>  urlchecker     1.0.1      2021-11-30 [1] CRAN (R 4.4.0)
#>  usethis        3.1.0      2024-11-26 [1] CRAN (R 4.4.1)
#>  vctrs          0.6.5      2023-12-01 [1] CRAN (R 4.4.0)
#>  xfun           0.50       2025-01-07 [1] CRAN (R 4.4.1)
#>  xtable         1.8-4      2019-04-21 [1] CRAN (R 4.4.1)
#>  yaml           2.3.10     2024-07-26 [1] CRAN (R 4.4.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library
#>  * ── Packages attached to the search path.
#> 
#> ──────────────────────────────────────────────────────────────────────────────

@xavidp
Copy link
Author

xavidp commented Feb 21, 2025

Gorgeous!

"Can you check with the development version of the package remotes::install_github("munterfi/hereR") if it solves the issue for you?"

Yes, it does, indeed!

I'll switch to herer thanks to this improvement.

Keep up the good work you are doing! (and congrats for what you are offering through this R package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants