Description Usage Arguments Value Author(s) Examples
When recentering a world map, most often from the "Atlantic" view with longitudes with range -180 to 180, to the "pacific" view with longitudes with range 0 to 360, lines crossing the offset (0 for this conversion) get stretched horizonally. This function breaks Line objects at the offset (usually Greenwich), inserting a very small gap, and reassembling the Line objects created as Lines. A similar function for polygons is found in the spgpc package.
1 | nowrapSpatialLines(obj, offset = 0, eps = rep(.Machine$double.eps, 2))
|
obj |
A Spatial Lines object |
offset |
default 0, untried for other values |
eps |
vector of two fuzz values, both default double.eps |
A Spatial Lines object
Roger Bivand
1 2 3 4 5 | Sl <- SpatialLines(list(Lines(list(Line(cbind(sin(seq(-4,4,0.4)),
seq(1,21,1)))), "1")), proj4string=CRS("+proj=longlat +ellps=WGS84"))
summary(Sl)
nwSL <- nowrapSpatialLines(Sl)
summary(nwSL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.