inverse overlay combination A and (not B) of polygon and SpatialPixelDataFrame
On 02/17/2011 05:07 PM, Axel Hille wrote:
Dear OSGEO list members,
Please take a look at www.osgeo.org to find out what osgeo means.
I have installed R-10.1 on windows XP. My problem:
The current version is 2.12.1
I have a polygon (the border of the Zuiderzee (=IJmeer?!) in the
Zuiderzee is the historic name of the sea that is now IJsselmeer before the Afsluitdijk was built (zee = "sea", becoming meer = "lake"), + the areas that have been reclaimed since and used to be sea (Flevopolders, Noordoostpolder).
Netherlands) and a SpatialPixelsDataFrame, containing genetic similarities among watersnakes across geography, bound to the convex hull curve of the sampling coordinates, around the Zuidersee). What I want, is to cut off the spatial grid by the edges of the Zuiderzee. What I so far only got by trying the overlay function is: ### zuiderzee_union # the polygon of the Zuiderzee rinsl.SPix.clus.clip # the SpatialPixelDataFrame sel=!is.na(overlay(rinsl.SPix.clus.clip, zuiderzee_union)) ###? A? %over%? B rinsl.SPix.clus.union.clip <- rinsl.SPix.clus.clip[sel,] ## This operation cuts out the area, which lies in the Zuiderzee - but I just need the inverse (I assume acc. to the A and (not B) boolean opeation),? the area which is outside the Zuiderzee.
Have you tried: rinsl.SPix.clus.union.clip <- rinsl.SPix.clus.clip[!sel,]
Any help is much apprecited!
Many Thanks in advance!
########################################################################
Axel Hille (Dr. rer. nat.)
population genetic and geography
D-33605 Bielefeld
########################################################################
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de