osm.segments: Overlay segments on an OSM plot

Description Usage Arguments Examples

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])
})


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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.