route: Route From A to B

Description Usage Arguments Value Examples

View source: R/apicalls.R

Description

Caluculate a routed distance between two points, with optional route description

Usage

1
2
route(fromaddress = NULL, fromcoord = NULL, toaddress = NULL,
  tocoord = NULL, mot = NULL, routepolyline = NULL, traveltime = NULL)

Arguments

fromaddress

is an adress type: roadname+housenumber+postalcode

fromcoord

is a coordinate type: latitude, longtitude

toaddress

is an adress type: roadname+housenumber+postalcode

tocoord

is a coordinate type: latitude, longtitude

mot

is a mode of transport designator

  • car (default)

  • bicycle

  • foot

  • public

  • auto

routepolyline

append a route in the form of a list of coordinates.

  • 0 (default): without route description

  • 1: with route description as a an encoded polyline string

  • 2: with route description as a list of latitude,longtitude pairs.

traveltime

used in combination with mot = public.

  • WEEKSTART (default): 09:00 on the first following weekday.

  • NOW: Use current time

  • datetime: Datetime string in the ISO 8601 format YYYY-MM-DDThh:mm (ie. 2016-10-30T16:56)

Value

Returns a list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Route between a pair of coordinates:
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527")

# Route between a pair of addresses:
route(fromaddress = "elmegade 5 2200", toaddress = "R<c3><a5>dhuspladsen 2, 1550 K<c3><b8>benhavn V, 1550")

# Route from address to coordinate:
route(fromaddress = "elmegade 5 2200", tocoord = "55.69043,12.53527")

# Setting mode of transport to bicycle
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527", mot = "bicycle")

# Request polyline as list of coordinates and setting mode of transport to foot
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527", mot = "foot", routepolyline = 2)

56north/hvorlangterder documentation built on May 5, 2019, 11:27 a.m.