[Raster-commits] r484 - pkg/raster/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 8 21:38:11 CEST 2009
Author: rhijmans
Date: 2009-09-08 21:38:11 +0200 (Tue, 08 Sep 2009)
New Revision: 484
Added:
pkg/raster/man/linesToRaster.Rd
Modified:
pkg/raster/man/pointsToRaster.Rd
Log:
Added: pkg/raster/man/linesToRaster.Rd
===================================================================
--- pkg/raster/man/linesToRaster.Rd (rev 0)
+++ pkg/raster/man/linesToRaster.Rd 2009-09-08 19:38:11 UTC (rev 484)
@@ -0,0 +1,49 @@
+\name{linesToRaster}
+
+\alias{linesToRaster}
+
+\title{Lines to raster}
+
+\description{
+ Lines to raster conversion. Lines are raserized.
+}
+
+\usage{
+linesToRaster(spLines, raster, field=0, filename="", overwrite=FALSE, updateRaster=FALSE, updateValue="NA", filetype='raster', datatype='FLT4S', track=-1)
+}
+
+\arguments{
+ \item{spLines}{SpatialLines or a SpatialLinesDataFrame object (sp package)}
+ \item{raster}{RasterLayer object}
+ \item{field}{The index of the column in the SpatialLinesDataFrame to be transfered to the RasterLayer (or the name of that field)}
+ \item{filename}{Character. output filename }
+ \item{overwrite}{ logical. if \code{TRUE} ouput file will be overwritten if it exists }
+ \item{updateRaster}{logical. If \code{TRUE} the values of the input RasterLayer are updated where the polygons overlap cells }
+ \item{updateValue}{character. Select cells to be updated (if \code{updateRaster == TRUE}) by their current values. Either 'all', 'NA', '!NA', or 'zero' }
+ \item{filetype}{output file type. Either 'raster', 'ascii' or a supported GDAL 'driver' name see \code{\link[raster]{writeRaster}}}
+ \item{datatype}{output data type; see \code{\link[raster]{dataType}}}
+ \item{track}{vector of row numbers for which the function will report that they have been processed}
+}
+
+\details{
+For SpatialLines, the 'field' argument is ignored. The line index is used as attribute,
+}
+
+\author{Robert J. Hijmans }
+
+\seealso{ \code{\link[raster]{polygonsToRaster}}, \code{\link[raster]{pointsToRaster}}}
+
+\examples{
+cds1 <- rbind(c(-50,0), c(0,60), c(40,5), c(15,-45), c(-10,-25))
+cds2 <- rbind(c(80,20), c(140,60), c(160,0), c(140,-55))
+cds3 <- rbind(c(-180,-20), c(-140,-60), c(-60,-20), c(-140,55))
+
+lines <- SpatialLines(list(Lines(list(Line(cds1)), "1"), Lines(list(Line(cds2)), "2"), Lines(list(Line(cds3)), "3") ))
+
+r <- raster(ncols=90, nrows=45)
+r <- linesToRaster(lines, r)
+#plot(r)
+#plot(lines, add=TRUE)
+}
+
+\keyword{ spatial }
Modified: pkg/raster/man/pointsToRaster.Rd
===================================================================
--- pkg/raster/man/pointsToRaster.Rd 2009-09-08 19:35:07 UTC (rev 483)
+++ pkg/raster/man/pointsToRaster.Rd 2009-09-08 19:38:11 UTC (rev 484)
@@ -3,9 +3,7 @@
\alias{pointsToRaster}
\title{ Point to raster conversion }
-\description{
- Convert points to a RasterLayer object
-}
+\description{ Convert points to a RasterLayer object }
\usage{
pointsToRaster(raster, xy, values=rep(1, length(xy[,1])), fun=length, background=NA, filename="", overwrite=FALSE, filetype='raster', datatype='FLT4S', track=-1)
More information about the Raster-commits
mailing list