[R-sig-Geo] merge Shape file

Robert J. Hijmans r.hijmans at gmail.com
Wed Oct 2 21:32:20 CEST 2013


In that case I would use "combine".


On Wed, Oct 2, 2013 at 1:39 AM, Joseph Bechara <jbechara at lri-lb.org> wrote:

> Hi Robert, ****
>
> ** **
>
>    I wanted to use the union but my shapefiles are not intersecting.****
>
> I want to combine 10 adjacent shapefiles.****
>
> Will "union" work in this case?****
>
> ** **
>
> ** **
>
> *JOSEPH BECHARA*
>
> *Wildfire Management Program Coordinator*
>
> Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon**
>
> Tel.: +961 (1) 426630-1-2****
>
> Fax: +961 (1) 426631****
>
> Mail: jbechara at lri-lb.org <jbejjani at lri-lb.org>****
>
> www.lri-lb.org****
>
> [image: Description: Description: LRI-logo-Email]****
>
> ** **
>
> ** **
>
> *From:* Robert J. Hijmans [mailto:r.hijmans at gmail.com]
> *Sent:* Wednesday, October 02, 2013 12:26 AM
> *To:* Joseph Bechara
> *Cc:* Roman Luštrik; R-sig-geo mailing list
>
> *Subject:* Re: [R-sig-Geo] merge Shape file****
>
> ** **
>
> Joseph, ****
>
> The merge in ArcGIS is actually the similar to sp::rbind as Barry pointed
> out. You probably want 'union'. rgeos has gUnion, and sptools (on R-Forge)
> has 'union' and other functions that extend rgeos by adding attribute table
> handling.****
>
> Robert****
>
> ** **
>
> On Tue, Oct 1, 2013 at 6:35 AM, Joseph Bechara <jbechara at lri-lb.org>
> wrote:****
>
> Thanks Roman, ****
>
>  ****
>
> I know the rgeos package but I'm not able to identify which tools can
> replace the merge of ArcGIS.****
>
>  ****
>
>  ****
>
> *JOSEPH BECHARA*****
>
> *Wildfire Management Program Coordinator*****
>
> Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon****
>
> Tel.: +961 (1) 426630-1-2****
>
> Fax: +961 (1) 426631****
>
> Mail: jbechara at lri-lb.org <jbejjani at lri-lb.org>****
>
> www.lri-lb.org****
>
> [image: Description: Description: LRI-logo-Email]****
>
>  ****
>
>  ****
>
> *From:* romunov at gmail.com [mailto:romunov at gmail.com] *On Behalf Of *Roman
> Luštrik
> *Sent:* Tuesday, October 01, 2013 4:32 PM
> *To:* Joseph Bechara
> *Cc:* R-sig-geo mailing list****
>
>
> *Subject:* Re: [R-sig-Geo] merge Shape file****
>
>  ****
>
> I think you want the `rgeos` package that offers a plethora of functions
> to work with "features".****
>
>  ****
>
> Cheers,****
>
> Roman****
>
>  ****
>
>  ****
>
> On Tue, Oct 1, 2013 at 3:25 PM, Joseph Bechara <jbechara at lri-lb.org>
> wrote:****
>
> Dear Bary, ****
>
>  ****
>
> Actually I have to do a geometrical merge operation.****
>
> I'm looking for the equivalent of "merge" in ArcGIS.****
>
>  ****
>
> *JOSEPH BECHARA*****
>
> *Wildfire Management Program Coordinator*****
>
> Ashrafieh 1020 Building, 8th floor, Mathaf, Beirut, Lebanon****
>
> Tel.: +961 (1) 426630-1-2****
>
> Fax: +961 (1) 426631****
>
> Mail: jbechara at lri-lb.org <jbejjani at lri-lb.org>****
>
> www.lri-lb.org****
>
>  ****
>
>  ****
>
> *From:* b.rowlingson at gmail.com [mailto:b.rowlingson at gmail.com] *On Behalf
> Of *Barry Rowlingson****
>
>
> *Sent:* Tuesday, October 01, 2013 4:04 PM
> *To:* Joseph Bechara
> *Cc:* R-sig-Geo at r-project.org
> *Subject:* Re: [R-sig-Geo] merge Shape file****
>
>  ****
>
>  ****
>
>  ****
>
> On Tue, Oct 1, 2013 at 12:25 PM, Joseph Bechara <jbechara at lri-lb.org>
> wrote:****
>
> I'm looking for a function to merge 2 shapefiles keeping them as
> "spatialPolygonsDataframe" class.****
>
> Any clue?****
>
>  ****
>
>  ****
>
>  ****
>
> What do you mean by merge? If the two shapefiles have the same set of
> attributes then just read them into SpatialPolygonsDataFrames and do s12 =
> rbind(s1,s2), and you end up with a SPDF which has all the features from s1
> and s2.****
>
> Or do you want to do some geometrical merge operation?****
>
> Barry****
>
>  ****
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo****
>
>
>
> ****
>
>  ****
>
> --
> In God we trust, all others bring data. ****
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20131002/0a94b8c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 16370 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20131002/0a94b8c9/attachment.jpe>


More information about the R-sig-Geo mailing list