[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-geo
Subject: Re: [R-sig-Geo] Singlepart to multipart
From: Roger Bivand <Roger.Bivand () nhh ! no>
Date: 2013-10-29 19:32:22
Message-ID: alpine.LRH.2.03.1310292030311.3464 () reclus ! nhh ! no
[Download RAW message or body]
On Tue, 29 Oct 2013, Jonathan Greenberg wrote:
> R-sig-geo'ers:
>
> If I have a SpatialPolygonsDataFrame with a field "MYID", how do I go about
> coercing that object to a multipart polygon, where I am "merging" on the
> MYID field?
maptools::unionSpatialPolygons() which calls rgeos::gUnaryUnion, so go to
rgeos::gUnaryUnion first unless you have challenged geometries - if hole
problems use maptools::checkPolygonsHoles first.
Hope this helps,
Roger
>
> --j
>
>
--
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic