1\name{SpatialLinesMidPoints}
2\alias{SpatialLinesMidPoints}
3%- Also NEED an '\alias' for EACH other topic documented here.
4\title{Line midpoints}
5\description{
6The function onverts SpatialLinesDataFrame to SpatialPointsDataFrame with points at the midpoints of the line segments.
7}
8\usage{
9SpatialLinesMidPoints(sldf)
10}
11%- maybe also 'usage' for other objects documented here.
12\arguments{
13  \item{sldf}{A SpatialLines or SpatialLinesDataFrame object}
14}
15\details{
16The function builds a SpatialPointsDataFrame from the midpoints of Line objects belonging to Lines objects in an object inheriting from a Spatial Lines object. The output data slot contains an index variable showing which Lines object the midpoints belong to.
17}
18
19\value{
20  A SpatialPointsDataFrame object created from the input object.
21}
22
23\author{Jonathan Callahan, modified by Roger Bivand}
24
25\examples{
26xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
27 proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
28plot(xx, col="blue")
29spdf <- SpatialLinesMidPoints(xx)
30plot(spdf, col="orange", add=TRUE)
31}
32
33\keyword{spatial}
34
35