EVOLUTION-MANAGER
Edit File: rasterToPoints.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Raster to points conversion</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for rasterToPoints {raster}"><tr><td>rasterToPoints {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Raster to points conversion</h2> <h3>Description</h3> <p>Raster to point conversion. Cells with NA are not converted. A function can be used to select a subset of the raster cells (by their values). </p> <h3>Usage</h3> <pre> rasterToPoints(x, fun=NULL, spatial=FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A Raster* object </p> </td></tr> <tr valign="top"><td><code>fun</code></td> <td> <p>Function to select a subset of raster values</p> </td></tr> <tr valign="top"><td><code>spatial</code></td> <td> <p>Logical. If <code>TRUE</code>, the function returns a SpatialPointsDataFrame object </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments. Currently only <code>progress</code> to specify a progress bar. "text", "window", or "" (the default, no progress bar)</p> </td></tr> </table> <h3>Details</h3> <p><code>fun</code> should be a simple function returning a logical value. </p> <p>E.g.: <code>fun=function(x){x==1}</code> or <code>fun=function(x){x>3}</code> </p> <h3>Value</h3> <p>A matrix with three columns: x, y, and v (value), or a SpatialPointsDataFrame object </p> <h3>Examples</h3> <pre> r <- raster(nrow=18, ncol=36) values(r) <- runif(ncell(r)) * 10 r[r>8] <- NA p <- rasterToPoints(r) p <- rasterToPoints(r, fun=function(x){x>6}) #plot(r) #points(p) </pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>