[R-sig-Geo] Intended usage of gIntersection ?

Robert J. Hijmans r.hijmans at gmail.com
Sat Sep 13 19:44:50 CEST 2014

The raster package has a few functions that extend rgeos by also
attempting to handle attribute data as well. In this case, see
And the list of functions here:
(section XIV)


On Sat, Sep 13, 2014 at 10:04 AM, Bernd Vogelgesang
<bernd.vogelgesang at gmx.de> wrote:
> Dear list,
> I'm trying to intersect two SpatialPolygonsDataFrames imported from shape
> files. (readOGR)
> The idea is to get the new polygons + the merged attributes of both layers,
> but the outcome is a SpatialPolygon class without a data slot.
> Is this the intended behaviour of gIntersection or is there something broken
> in my R-Installation, cause I googled now for 2 days to find a solution on
> that problem, but only found two hits on stackexchange where people had
> similar problems, and no working solution (at least for me), nor was I able
> to find any standard recipt how to join the attributes back to the new
> polygons.
> So obviously only rare people seem to have the need to get also the data
> from an intersection or do I miss some really basic R-capabilities not worth
> to write down in any documentation??
> Hope someone can shed some light
> Thanks
> Bernd
> --
> Bernd Vogelgesang
> Siedlerstraße 2
> 91083 Baiersdorf/Igelsdorf
> Tel: 09133-825374
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

More information about the R-sig-Geo mailing list