Skip to content

Commit

Permalink
Add draw.world.lines (from transformeR)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedia committed May 23, 2020
1 parent 2a6911c commit f29e3a8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
20 changes: 20 additions & 0 deletions R/draw.world.lines.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#' @title Land borders
#' @description Add land borders to a map
#' @param ... Graphical parameters passed to \code{\link{lines}}.
#' @return Draws a simplied land border areas as lines onto the map
#' @details The function loads a built-in world segments dataset created ad hoc to avoid dependencies on other packages (i.e. 'maps').
#' Geographical lonlat coordinates in wgs84.
#' This function was formerly in transformeR v<2.0.0.
#'
#' @source Postprocessed from the original shapefile from Natural Earth (http://www.naturalearthdata.com/downloads/110m-physical-vectors/)
#' @author J. Bedia
#' @keywords internal
#' @importFrom graphics lines
#' @export

draw.world.lines <- function(...) {
load(system.file(package = "visualizeR","wrl.Rda"), envir = environment())
for (i in 1:length(node.list)) {
lines(node.list[[i]][,1], node.list[[i]][,2], ...)
}
}
Binary file added inst/wrl.Rda
Binary file not shown.
29 changes: 29 additions & 0 deletions man/draw.world.lines.Rd

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

0 comments on commit f29e3a8

Please sign in to comment.