[R-sig-Geo] World map in magnetic coordinates
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Sat Oct 9 00:17:12 CEST 2010
On Fri, Oct 8, 2010 at 7:21 PM, ogbos okike <ogbos.okike at gmail.com> wrote:
> library(maps)
> data(worldMapEnv)
> map("world")
> The three steps above in R gives you the world map I mean.
if you do:
w = map("world")
then w will be a simple list with $x and $y components, as well as
$range and $names. If you write the $x and $y to a file, convert, then
read back into $x and $y (and then convert the $range, which is the
bounding box) you should have something you can plot in transformed
coordinates.
Note that polygons are separated by an NA in $x and $y, so you will
have to make sure you preserve those too.
Barry
More information about the R-sig-Geo
mailing list