[R-sig-Geo] transformin multipart shapefile to singlepart shapefile

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Jan 18 14:11:32 CET 2011


On Tue, Jan 18, 2011 at 10:47 AM, Franziska Schulze
<franziska.schulze at wiwi.hu-berlin.de> wrote:
> Hi,
>
> is there a package in R that allows me to split multipart shapefiles in
> singlepart ones? In my shape file there is a region that consists of
> more than one parts. For my spatial econometric analysis, I only need
> one of these parts as the other do not have a particular meaning in my
> context. I read the shapefile using readShapePoly (package maptools).

 You might find it easier to use a GIS package for this. Quantum GIS
is open source, and has a Multipart-to-singleparts function in its
Vector Geometry Tools menu.

 www,qgis.org - cross platform, open source, reads and writes shapefiles.

 the R method would probably involve deep hacking of the sp data
structures unless someone has already written code to do it. At this
point I expect an email from Roger B to arrive in my Inbox saying
exactly that...

Barry



More information about the R-sig-Geo mailing list