Hello,

Sorry for the lack of a complete example but this is more of a class type
question.

I have a map of the coast that I generated through PBSmapping:

xlims <- c(292,303.5)
ylims <- c(41.5,49.5)
plotMap(worldLLhigh, xlim=xlims, ylim=ylims, col=grey(0.1),bg=grey(0.9),
xlab="", ylab="", las=1, tck=-0.015, axes=F)

I want to add an intensity grid from an object that I created through the
excellent 'trip' package (results in an sp class object
(SpatialGridDataFrame)) and this is where I'm having difficulty.  I know
maptools allows you to change formats from sp to PBSmapping but I can't
seem to identify how to do it for a SpatialGridDataFrame.

I get the SpatialGridDataFrame object via:

x2009.grid <- makeGridTopology(data2009.sp, cells.dim = c(cell.x1,
cell.y1), xlim=xlims, ylim=ylims,buffer = 0, cellsize = NULL,adjust2longlat
= FALSE)
x2009.final <- tripGrid(data2009.sp, grid = x2009.grid, method =
"pixellate")

For most of these maps I usually just add the grid layer using the image
function but what I currently have worked out is quite messy and I think
prone to error for other applications.

Of course, I can plot the SpatialGridDataFrame object
via: spplot(x2009.final) which would be great but I can't figure out how to
add my coastline via the PBSmapping plotMap call.

Could someone please suggest a more direct approach?
Thank you.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to