SpatialLines
From sp v0.9-90
by Edzer Pebesma
create objects of class SpatialLines or SpatialLinesDataFrame
create objects of class SpatialLines
or
SpatialLinesDataFrame
from
lists of Lines
objects and data.frames; extract list od Lines from a SpatialLines object
- Keywords
- manip
Usage
SpatialLines(LinesList, proj4string = CRS(as.character(NA)))
SpatialLinesDataFrame(sl, data, match.ID = TRUE)
as.SpatialLines.SLDF(SLDF)
getSLlinesSlot(SL)
getSLLinesIDSlots(SL)
getSpatialLinesMidPoints(SL)
LineLength(cc, longlat=FALSE, sum=TRUE)
LinesLength(Ls, longlat=FALSE)
SpatialLinesLengths(SL, longlat)
Arguments
- LinesList
- list with objects of class Lines-class
- proj4string
- Object of class
"CRS"
; holding a valid proj4 string - sl, SL
- object of class SpatialLines-class
- data
- object of class
data.frame
; the number of rows indata
should equal the number ofLines
elements insl
- match.ID
- logical: (default TRUE): match SpatialLines member
Lines ID slot values with data.frame row names, and re-order the
data frame rows if necessary; if character: indicates the column
in
data
with Lines IDs to match - SLDF
- SpatialLinesDataFrame object
- Ls
- Object of class
Lines
- cc
- Object of class
Line
, or two-column matrix with points - longlat
- if FALSE, Euclidean distance, if TRUE Great Circle distance in kilometers
- sum
- default return scalar length of sum of segments in Line, if FALSE, return vector of segment lengths
Value
SpatialLines
returns object of classSpatialLines
;SpatialLinesDataFrame
returns object of classSpatialLinesDataFrame
getSpatialLinesMidPoints
returns an object of classSpatialPoints
,each point containing the (weighted) mean of the lines elements; weighted in the sense that mean is called twice.
See Also
Community examples
Looks like there are no examples yet.