Thanks Greg Matthew. I have multiple polygons (a world map from the
wonderful naturalearthdata.com), so gDifference does exactly what I
needed. If the developers of rgeos are listening - thanks to them for
a seriously awesome package!
best wishes
rob
** Find out about Britain's
Dear All,
I am trying to plot some abundance density maps for different species
of birds which may be either marine or terrestrial. Having created the
density kernel (using kde from package ks), I plot() a background map
(actually a SpatialPolygonsDataFrame) and I can colour the land and
sea
One possibility would be to define a spatial polygon that represents
the entire plotting area, then use the gDifference function from the
rgeos package to create a map that excludes the land areas (or
whatever you don't want to cover) and add the resulting polygon(s).
On Thu, Sep 13, 2012 at 8:04
Rob -
Without seeing your code, I'm not exactly sure what you are trying to
do. But, I routinely control the appearance of land vs. sea with a
setup something like this:
bg.spdf# a spatialPolygonsDataFrame with 1 polygon for ocean and 1
for land
bg.fill - c('transparent', 'gray') #