EVOLUTION-MANAGER
Edit File: geos_combine.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: Combine or union feature geometries</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 geos_combine {sf}"><tr><td>geos_combine {sf}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Combine or union feature geometries</h2> <h3>Description</h3> <p>Combine several feature geometries into one, without unioning or resolving internal boundaries </p> <h3>Usage</h3> <pre> st_combine(x) st_union(x, y, ..., by_feature = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object of class <code>sf</code>, <code>sfc</code> or <code>sfg</code></p> </td></tr> <tr valign="top"><td><code>y</code></td> <td> <p>object of class <code>sf</code>, <code>sfc</code> or <code>sfg</code> (optional)</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>ignored</p> </td></tr> <tr valign="top"><td><code>by_feature</code></td> <td> <p>logical; if TRUE, union each feature, if FALSE return a single feature that is the geometric union of the set of features</p> </td></tr> </table> <h3>Details</h3> <p><code>st_combine</code> combines geometries without resolving borders, using <a href="st.html">c.sfg</a> (analogous to <a href="../../base/html/c.html">c</a> for ordinary vectors). </p> <p>If <code>st_union</code> is called with a single argument, <code>x</code>, (with <code>y</code> missing) and <code>by_feature</code> is <code>FALSE</code> all geometries are unioned together and an <code>sfg</code> or single-geometry <code>sfc</code> object is returned. If <code>by_feature</code> is <code>TRUE</code> each feature geometry is unioned. This can for instance be used to resolve internal boundaries after polygons were combined using <code>st_combine</code>. If <code>y</code> is provided, all elements of <code>x</code> and <code>y</code> are unioned, pairwise (and <code>by_feature</code> is ignored). The former corresponds to <a href="../../rgeos/html/topo-bin-gUnion.html">gUnaryUnion</a>, the latter to <a href="../../rgeos/html/topo-bin-gUnion.html">gUnion</a>. </p> <p>Unioning a set of overlapping polygons has the effect of merging the areas (i.e. the same effect as iteratively unioning all individual polygons together). Unioning a set of LineStrings has the effect of fully noding and dissolving the input linework. In this context "fully noded" means that there will be a node or endpoint in the output for every endpoint or line segment crossing in the input. "Dissolved" means that any duplicate (e.g. coincident) line segments or portions of line segments will be reduced to a single line segment in the output. Unioning a set of Points has the effect of merging all identical points (producing a set with no duplicates). </p> <h3>Value</h3> <p><code>st_combine</code> returns a single, combined geometry, with no resolved boundaries; returned geometries may well be invalid. </p> <p>If <code>y</code> is missing, <code>st_union(x)</code> returns a single geometry with resolved boundaries, else the geometries for all unioned pairs of x[i] and y[j]. </p> <h3>See Also</h3> <p><a href="geos_binary_ops.html">st_intersection</a>, <a href="geos_binary_ops.html">st_difference</a>, <a href="geos_binary_ops.html">st_sym_difference</a> </p> <h3>Examples</h3> <pre> nc = st_read(system.file("shape/nc.shp", package="sf")) st_combine(nc) plot(st_union(nc)) </pre> <hr /><div style="text-align: center;">[Package <em>sf</em> version 0.9-5 <a href="00Index.html">Index</a>]</div> </body></html>