-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from GIScience/feat/export_endpoint
Add export endpoint
- Loading branch information
Showing
9 changed files
with
142 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# openrouteservice 0.6.0 | ||
|
||
## NEW FEATURES | ||
|
||
- Enable export endpoint. | ||
|
||
# openrouteservice 0.5.2 | ||
|
||
## NEW FEATURES | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#' Openrouteservice Export | ||
#' | ||
#' Export the base graph for different modes of transport. | ||
#' | ||
#' @template param-coordinates | ||
#' @templateVar argname bbox | ||
#' @templateVar suffix defining the SW and NE corners of a rectangular area of interest | ||
#' @template param-profile | ||
#' @template param-common | ||
#' @templateVar dotsargs parameters | ||
#' @templateVar endpoint export | ||
#' @template return | ||
#' @templateVar return Lists of graph nodes and edges contained in the provided bounding box and relevant for the given routing profile. The edge property `weight` represents travel time in seconds. The response is | ||
#' @template return-text | ||
#' @template return-parsed | ||
#' @examples | ||
#' \dontrun{ | ||
#' bbox <- list( | ||
#' c(8.681495, 49.41461), | ||
#' c(8.686507, 49.41943) | ||
#' ) | ||
#' | ||
#' res <- ors_export(bbox) | ||
#' } | ||
#' @template author | ||
#' @export | ||
ors_export <- function(bbox, | ||
profile = ors_profile(), | ||
..., | ||
api_key = ors_api_key(), | ||
output = c("parsed", "text")) { | ||
## required arguments with no default value | ||
if (missing(bbox)) | ||
stop('Missing argument "bbox"') | ||
|
||
## required arguments with defaults | ||
profile <- match.arg(profile) | ||
output <- match.arg(output) | ||
|
||
## request parameters | ||
body <- list(bbox = bbox, ...) | ||
|
||
api_call( | ||
path = c("v2/export", profile), | ||
api_key = api_key, | ||
body = body, | ||
encode = "json", | ||
output = output | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters