> Hi, does anyone know how to modify the world map so that it is split at
> about 20oE, or where I might obtain an alternative map?
>
The way I did it, to create the world2 databases, was to go back to the
original data, and modify each longitude point. So instead of the range
being (-pi, pi), I changed it to (0, 2pi). This isn't just a matter of
adding pi (otherwise the whole thing will still look the same!). You
would have to add 2pi to all values less than 20 degrees. Then of
course you have to recreate the binary form of the database, and then
generate the S-Plus format of this (no trivial task, but I have a
program to do this).
OR ... you can emulate this by something like:
library(maps)
world <- map("world", plot=F)
world$x[!is.na(world$x) & world$x < 20] <- world$x[!is.na(world$x) & world$x <
20] + 360
motif()
plot(world, type="n")
lines(world)
And then you realise that you have to take care of the new breaks in the
data!.
A quick and dirty fix is:
world$y[!is.na(world$x) & abs(diff(world$x)) > 300] <- NA
world$x[!is.na(world$x) & abs(diff(world$x)) > 300] <- NA
plot(world, type="n")
lines(world)
Hope this helps,
Ray Brownrigg
|