osm.segments: Overlay segments on an OSM plot

Description Usage Arguments Examples

View source: R/overlays.R

Description

Plot segments on a plot created by osm.plot. This is a simple wrapper around segments().

Usage

1
osm.segments(x0, y0, x1 = x0, y1 = y0, epsg = 4326, toepsg = 3857, ...)

Arguments

x0

X1 coordinate vector

y0

Y1 coordinate vector

x1

X2 coordinate vector

y1

Y2 coordinate vector

epsg

EPSG code of the supplied coordinates

toepsg

EPSG code of the projected coordinates to be ploted

...

Args passed on to points

Examples

1
2
3
4
5
6
7
library(rosm)
library(prettymapr)
locs <- geocode(c("wolfville, ns", "kentville, ns", "halifax, ns"))
prettymap({
  osm.plot(searchbbox("nova scotia"))
  osm.segments(locs$lon[1:2], locs$lat[1:2], locs$lon[2:3], locs$lat[2:3])
})

rosm documentation built on May 29, 2017, noon

Search within the rosm package
Search all R packages, documentation and source code