\HeaderA{nowrapSpatialLines}{Split SpatialLines components at offset}{nowrapSpatialLines}
\keyword{spatial}{nowrapSpatialLines}
\begin{Description}\relax
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 rings is found in the \pkg{spgpc} package.
\end{Description}
\begin{Usage}
\begin{verbatim}
nowrapSpatialLines(obj, offset = 0, eps = rep(.Machine$double.eps, 2))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] A Spatial Lines object
\item[\code{offset}] default 0, untried for other values
\item[\code{eps}] vector of two fuzz values, both default double.eps
\end{ldescription}
\end{Arguments}
\begin{Value}
A Spatial Lines object
\end{Value}
\begin{Author}\relax
Roger Bivand
\end{Author}
\begin{Examples}
\begin{ExampleCode}
Sl <- SpatialLines(list(Lines(list(Line(cbind(sin(seq(-4,4,0.4)), seq(1,21,1)))))), proj4string=CRS("+proj=latlong"))
summary(Sl)
#lapply(sapply(getSLlinesSlot(Sl), getLinesLinesSlot), bbox)
#lapply(sapply(getSLlinesSlot(recenter(Sl)), getLinesLinesSlot), bbox)
nwSL <- nowrapSpatialLines(Sl)
summary(nwSL)
#lapply(sapply(getSLlinesSlot(nwSL), getLinesLinesSlot), bbox)
#lapply(sapply(getSLlinesSlot(recenter(nwSL)), getLinesLinesSlot), bbox)
\end{ExampleCode}
\end{Examples}

