Dear Ewan,
I faced this problem and solved it by contacting the package authors, John
Schnute and Rowan Haigh, [email protected].
Here is a function that solves the problem by displacing the Greenwich meridian
to longitude 348 leaving Ireland to the right.
This longitude does not span any land mass within the limits of the map so it
does not cause any disappearing land masses.
The function loads the GSHHS data in intermediate resolution, so it takes some
time, less than 1 min in my standard laptop, to run.
Change the xlim and ylim values to get different fractions of Europe.
Last time I contacted them (October 2010), package authors were planning to add
some comments about this in PBSmapping user's guide.
So you may find more info by digging into the user's guide, or else, contact
Rowan.
HTH
Rubén
--------------------------------------------------------
Dr. Ruben H. Roa-Ureta
Senior Researcher, AZTI Tecnalia,
Marine Research Division,
Txatxarramendi Ugartea z/g, 48395, Sukarrieta,
Bizkaia, Spain
library(PBSmapping)
Euromap <- function(path="C:/Temp", cutLon=348)
{
fnam <- paste(path,"gshhs_f.b",sep="/");
p1 <-
importGSHHS(fnam,xlim=c(-20,360),ylim=c(30,80),level=1,n=0,xoff=0);
z <- p1$X>cutLon;
p1$X[z] <- p1$X[z]-360;
NorthSeaHR <- thinPolys(p1, tol=0.1, filter=3)
.initPBS()
clr <- PBSval$PBSclr;
xlim <- c(-18, 16)
ylim <- c(32, 64)
WEurope <- clipPolys(NorthSeaHR, xlim=xlim, ylim=ylim)
par(mfrow=c(1,1),omi=c(0,0,0,0))
plotMap(WEurope, xlim=xlim, ylim=ylim, col=clr$land,
bg=clr$sea, tck=-0.02,mgp=c(2,.75,0), cex=1.2, plt=c(.08,.98,.08,.98))
}
Euromap(cutLon=348)
-----Mensaje original-----
De: [email protected] [mailto:[email protected]] En
nombre de Ewan Minter
Enviado el: martes, 16 de agosto de 2011 14:57
Para: [email protected]
Asunto: [R] PBSmapping, where is Ireland?!
Hi folks,
I've been using 'PBSmapping' to make a map of Europe with some labels. I've
been using the 'worldLL' PolyData, as my computer is too slow to make my own
from the GSHHS files.
The only p
______________________________________________
[email protected] 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.