EVOLUTION-MANAGER
Edit File: disaggregate.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: disaggregate SpatialLines, SpatialLinesDataFrame,...</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 disaggregate-methods {sp}"><tr><td>disaggregate-methods {sp}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> disaggregate SpatialLines, SpatialLinesDataFrame, SpatialPolygons, or SpatialPolygonsDataFrame objects </h2> <h3>Description</h3> <p> disaggregate SpatialLines, SpatialLinesDataFrame, SpatialPolygons, or SpatialPolygonsDataFrame objects, using functions from rgeos to handle polygon hole nesting </p> <h3>Usage</h3> <pre> disaggregate(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object of class <a href="SpatialLines.html">SpatialLines</a> or <a href="SpatialPolygons.html">SpatialPolygons</a></p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>ignored</p> </td></tr> </table> <h3>Value</h3> <p>object of class <a href="SpatialLines.html">SpatialLines</a> or <a href="SpatialPolygons.html">SpatialPolygons</a>, where groups of <a href="Line.html">Line</a> or <a href="SpatialPolygons.html">Polygon</a> are disaggregated to one <a href="Line.html">Line</a> per <a href="Line.html">Lines</a>, or one <a href="SpatialPolygons.html">Polygon</a> per <a href="SpatialPolygons.html">Polygons</a>, respectively. </p> <h3>Author(s)</h3> <p> Robert Hijmans, Edzer Pebesma </p> <h3>Examples</h3> <pre> Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)), hole = FALSE) Sr2 = Polygon(cbind(c(5,4,2,5),c(2,3,2,2)), hole = FALSE) Sr3 = Polygon(cbind(c(4,4,5,10,4),c(5,3,2,5,5)), hole = FALSE) Sr4 = Polygon(cbind(c(5,6,6,5,5),c(4,4,3,3,4)), hole = TRUE) Srs1 = Polygons(list(Sr1, Sr2), "s1/2") Srs3 = Polygons(list(Sr3, Sr4), "s3/4") sp = SpatialPolygons(list(Srs1,Srs3), 1:2) length(sp) ## [1] 2 length(disaggregate(sp)) ## [1] 3 l1 = cbind(c(1,2,3),c(3,2,2)) l1a = cbind(l1[,1]+.05,l1[,2]+.05) l2 = cbind(c(1,2,3),c(1,1.5,1)) Sl1 = Line(l1) Sl1a = Line(l1a) Sl2 = Line(l2) S1 = Lines(list(Sl1, Sl1a), ID="a") S2 = Lines(list(Sl2), ID="b") sl = SpatialLines(list(S1,S2)) length(sl) length(disaggregate(sl)) </pre> <hr /><div style="text-align: center;">[Package <em>sp</em> version 1.4-2 <a href="00Index.html">Index</a>]</div> </body></html>