[Raster-commits] r308 - pkg/raster/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Mar 4 06:10:15 CET 2009
Author: rhijmans
Date: 2009-03-04 06:10:15 +0100 (Wed, 04 Mar 2009)
New Revision: 308
Added:
pkg/raster/man/dimensions.Rd
pkg/raster/man/extent.Rd
Modified:
pkg/raster/man/aggregate-methods.Rd
pkg/raster/man/crop.Rd
pkg/raster/man/disaggregate.Rd
pkg/raster/man/properties.Rd
pkg/raster/man/set.Rd
Log:
Modified: pkg/raster/man/aggregate-methods.Rd
===================================================================
--- pkg/raster/man/aggregate-methods.Rd 2009-03-04 04:46:29 UTC (rev 307)
+++ pkg/raster/man/aggregate-methods.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -44,7 +44,7 @@
}
\value{
-A new RasterLayer object (in the R environment), and in some cases the side effect of a new file on disk.
+A new RasterLayer object, and in some cases the side effect of a new file on disk.
}
Modified: pkg/raster/man/crop.Rd
===================================================================
--- pkg/raster/man/crop.Rd 2009-03-04 04:46:29 UTC (rev 307)
+++ pkg/raster/man/crop.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -1,9 +1,10 @@
\name{crop}
\alias{crop}
-\title{Crop the extent of a RasterLayer}
+\title{Crop a RasterLayer}
\description{
-crop returns a subset of the input RasterLayer as specified by a the supplied bounding box (or object that has a bounding box). Areas in the bounding box outside of the intput RasterLayer are ignored.
+crop returns a subset of the input RasterLayer as specified by a bounding box (or object that has a bounding box).
+Areas in the bounding box outside of the intput RasterLayer are ignored, and the BoundingBox is aligned to the cells of the input RasterLayer.
}
\usage{
crop(raster, bndbox, filename="", overwrite=FALSE, filetype='raster', track=-1)
@@ -14,18 +15,22 @@
\item{bndbox}{BoundingBox object, or any object that is or has a bounding box (see below)}
\item{filename}{character. Output filename for a new raster}
\item{overwrite}{if \code{TRUE}, the file will be overwritten if it exists}
- \item{filetype}{output file type. Either 'raster', 'ascii' or a supported GDAL 'driver' name see \code{\link[raster]{writeRaster}}}
+ \item{filetype}{output file type. Either 'raster', 'ascii' or a supported GDAL format see \code{\link[raster]{writeRaster}}}
\item{track}{vector of row numbers for which the function will report that they have been processed}
}
\details{
- Objects that have a BoundingBox object include RasterLayer, RasterStack. They can also be extracted from objects descending from the Spatial class in the sp package.
- You can check this with getBbox(object). New BoundingBox objects can be reated with the function newBbox().
+ Objects that have a BoundingBox object include RasterLayer, RasterStack.
+ They can also be extracted from objects descending from the Spatial class in the sp package.
+ You can check this with \code{getBbox}. New BoundingBox objects can be created with \code{newBbox}.
+
+ If no filename is specified, and the resulting RasterLayer is too large to hold in memory, it is saved to a temporary file.
}
\value{
-A new RasterLayer object (in the R environment), and in some cases the side effect of a new file on disk.
+A new RasterLayer object, and in some cases the side effect of a new file on disk.
}
+
\author{Robert J. Hijmans}
\seealso{
Added: pkg/raster/man/dimensions.Rd
===================================================================
--- pkg/raster/man/dimensions.Rd (rev 0)
+++ pkg/raster/man/dimensions.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -0,0 +1,75 @@
+\name{dimensions}
+
+\alias{ncol}
+\alias{nrow}
+\alias{nrow,BasicRaster-method}
+\alias{ncol,BasicRaster-method}
+\alias{dim,BasicRaster-method}
+\alias{ncell}
+\alias{ncell,ANY-method}
+\alias{length,Raster-method}
+\alias{xres}
+\alias{yres}
+\alias{resolution}
+\alias{origin}
+\alias{nlayers}
+\alias{nlayers,BasicRaster-method}
+\alias{nlayers,Raster-method}
+\alias{nlayers,RasterStack-method}
+\alias{nlayers,Spatial-method}
+\alias{layerNames}
+\alias{band}
+\alias{nbands}
+
+\title{Dimensions}
+\description{
+ Get dimensions of a Raster* object
+}
+
+\usage{
+ncol(x)
+nrow(x)
+ncell(x)
+xres(object)
+yres(object)
+resolution(object)
+origin(object)
+nlayers(object)
+layerNames(object)
+band(object)
+nbands(object)
+}
+
+\arguments{
+ \item{object}{Raster* object}
+ \item{x}{Raster* object}
+}
+
+\note{
+ Some of these functions simply take the values from the data slots in the Raster* object.
+ It is advisable to use these and other 'getter' functions rather than dirctly accessing the slots of an object.
+ This will ensure that code will not break in the future, even if the underlying class definitions change.
+}
+
+\value{
+ in most cases a single numeric
+
+}
+
+\author{Robert J. Hijmans }
+\examples{
+#using a new default raster (1 degree global)
+r <- raster()
+ncell(r)
+ncol(r)
+nrow(r)
+ncell(r)
+xres(r)
+yres(r)
+resolution(r)
+origin(r)
+nbands(r)
+band(r)
+}
+
+\keyword{spatial}
Modified: pkg/raster/man/disaggregate.Rd
===================================================================
--- pkg/raster/man/disaggregate.Rd 2009-03-04 04:46:29 UTC (rev 307)
+++ pkg/raster/man/disaggregate.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -2,16 +2,18 @@
\alias{disaggregate}
\title{Disaggregate}
+
\description{
-Disaggregate a raster to create a new raster
+Disaggregate a RasterLayer to create a new RasterLayer with a higher resolution (smaller cells)
}
+
\usage{
disaggregate(raster, fact=2, filename="", overwrite=FALSE, filetype='raster', datatype='FLT4S', track=-1)
}
\arguments{
\item{raster}{a RasterLayer object}
- \item{filename}{output filename for a new raster}
+ \item{filename}{filename for the output RasterLayer}
\item{fact}{degree of aggregation or disaggregation expressed as number of cells (horizontally and vertically). See details}
\item{overwrite}{if TRUE, "filename" will be overwritten if it exists}
\item{filetype}{output file type. Either 'raster', 'ascii' or a supported GDAL 'driver' name see \code{\link[raster]{writeRaster}}}
@@ -20,11 +22,14 @@
}
\details{
-Fact can be a single integer or two integers c(x,y), in which case the first one is the horizontal disaggregation factor and y the vertical disaggreation factor. If a single integer values is supplied, cells are disaggregated with the same factor in x and y direction.
+Fact can be a single integer or two integers c(x,y), in which case the first one is the horizontal disaggregation factor and y the vertical disaggreation factor.
+If a single integer values is supplied, cells are disaggregated with the same factor in x and y direction.
+
+If no filename is specified, and the resulting RasterLayer is too large to hold in memory, it is saved to a temporary file.
}
\value{
-A new RasterLayer object (in the R environment), and in some cases the side effect of a new file on disk.
+A new RasterLayer object, and in some cases the side effect of a new file on disk.
}
\author{Robert J. Hijmans}
Added: pkg/raster/man/extent.Rd
===================================================================
--- pkg/raster/man/extent.Rd (rev 0)
+++ pkg/raster/man/extent.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -0,0 +1,53 @@
+\name{extent}
+
+\alias{xmin}
+\alias{xmax}
+\alias{ymin}
+\alias{ymax}
+\alias{projection}
+\alias{isLatLon}
+\alias{isLatLon,Raster-method}
+\alias{isLatLon,CRS-method}
+\alias{isLatLon,character-method}
+\alias{projection<-}
+
+
+\title{Raster extent}
+\description{
+ Extent and projection of Raster* objects
+}
+
+\usage{
+xmin(object)
+xmax(object)
+ymin(object)
+ymax(object)
+projection(object, asText=TRUE)
+isLatLon(object)
+}
+
+\arguments{
+ \item{object}{Raster* object}
+ \item{asText}{logical. If \code{TRUE}, the projection is returned as text. Otherwise a CRS object is returned}
+}
+
+\note{
+ Some of these functions simply take the values from the data slots in the RasterLayer or RasterStack object. It is advisable to use these and other 'getter' functions rather than dirctly accessing the slots of an object. This will ensure that code will not break in the future, even if the underlying class definitions change.
+}
+
+\value{
+ varies
+}
+
+\author{Robert J. Hijmans }
+
+\examples{
+r <- raster()
+xmin(r)
+xmax(r)
+ymin(r)
+ymax(r)
+projection(r)
+}
+
+\keyword{spatial}
Modified: pkg/raster/man/properties.Rd
===================================================================
--- pkg/raster/man/properties.Rd 2009-03-04 04:46:29 UTC (rev 307)
+++ pkg/raster/man/properties.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -1,103 +1,49 @@
\name{properties}
+
\alias{filename}
-\alias{filename<-}
-\alias{ncol}
-\alias{nrow}
-\alias{nrow,BasicRaster-method}
-\alias{ncol,BasicRaster-method}
-\alias{dim,BasicRaster-method}
-\alias{ncell}
-\alias{ncell,ANY-method}
-\alias{length,Raster-method}
-\alias{xres}
-\alias{yres}
-\alias{resolution}
-\alias{xmin}
-\alias{xmax}
-\alias{ymin}
-\alias{ymax}
-\alias{projection}
-\alias{isLatLon}
-\alias{isLatLon,Raster-method}
-\alias{isLatLon,CRS-method}
-\alias{isLatLon,character-method}
-\alias{projection<-}
-\alias{origin}
-\alias{nlayers}
-\alias{nlayers,BasicRaster-method}
-\alias{nlayers,Raster-method}
-\alias{nlayers,RasterStack-method}
-\alias{nlayers,Spatial-method}
-\alias{layerNames}
-\alias{band}
-\alias{nbands}
\alias{dataType}
\alias{dataSize}
\title{Raster properties}
+
\description{
- Get properties of a RasterLayer or RasterStack
+ Properties of Raster* objects
}
\usage{
filename(object)
-ncol(x)
-nrow(x)
-ncell(object)
-ncell(object)
-xres(object)
-yres(object)
-resolution(object)
-xmin(object)
-xmax(object)
-ymin(object)
-ymax(object)
-projection(object, asText=TRUE)
-isLatLon(object)
-origin(object)
dataSize(object)
dataType(object)
-nlayers(object)
-layerNames(object)
-band(object)
-nbands(object)
}
\arguments{
\item{object}{Raster* object}
- \item{x}{Raster* object}
- \item{asText}{logical. If \code{TRUE}, the projection is returned as text. Otherwise a CRS object is returned}
}
\note{
Some of these functions simply take the values from the data slots in the RasterLayer or RasterStack object. It is advisable to use these and other 'getter' functions rather than dirctly accessing the slots of an object. This will ensure that code will not break in the future, even if the underlying class definitions change.
}
+\seealso{ \code{\link[raster]{setFilename}} }
+
+
\value{
- row, col or cell number(s)
- x or y coordinate(s)
- matrix(x,y) of pairs of coordinates
- matrix(cell, x, y) of cellnumbers and x and y coordinates
+ varies
}
+
\author{Robert J. Hijmans }
+
+
\examples{
#using a new default raster (1 degree global)
-r <- raster()
-ncell(r)
-ncol(r)
-nrow(r)
-ncell(r)
-xres(r)
-yres(r)
-resolution(r)
-xmin(r)
-xmax(r)
-ymin(r)
-ymax(r)
-projection(r)
-origin(r)
-nbands(r)
-band(r)
+r <- raster(nrow=10, ncol=10)
+dataContent(r)
+r[] <- 1:ncell(r)
+dataContent(r)
+dataSource(r)
+filename(r) <- 'myfile.grd'
+filename(r)
}
+
\keyword{spatial}
Modified: pkg/raster/man/set.Rd
===================================================================
--- pkg/raster/man/set.Rd 2009-03-04 04:46:29 UTC (rev 307)
+++ pkg/raster/man/set.Rd 2009-03-04 05:10:15 UTC (rev 308)
@@ -1,6 +1,7 @@
\name{set}
\alias{setRaster}
\alias{setFilename}
+\alias{filename<-}
\alias{setProjection}
\alias{setRowCol}
\alias{ncol<-}
More information about the Raster-commits
mailing list