Message-ID: <alpine.LRH.2.00.0901081520410.7928@reclus.nhh.no>
Date: 2009-01-08T14:22:57Z
From: Roger Bivand
Subject: seamless maps
In-Reply-To: <4F881DF7-CA0B-4485-A986-FB2BD03E298C@eva.mpg.de>
On Thu, 8 Jan 2009, Hans-J?rg Bibiko wrote:
>
> On 08.01.2009, at 14:27, Roger Bivand wrote:
>
>> On Thu, 8 Jan 2009, Hans-J?rg Bibiko wrote:
>>
>>> Hi,
>>>
>>> I wonder if there's a workaround to generate seamless maps based on
>>> SpatialPolygons objects. E.g. to produce a map showing Australia at the
>>> left edge and America at the right one ( xlim := min: 110?E , max: 30?W ).
>>> Or the way around, is there a function to re-center a given map by
>>> defining the median longitude? (I know the function 'recenter' which
>>> produce a map from 0? to 360?)
>
>
> Dear Roger and Matt,
>
> many thanks for the hints. I'll have a look at these.
>
A further idea if you don't need the polygons is:
wrld_simpl_SL <- as(as(wrld_simpl, "SpatialPolygons"), "SpatialLines")
wrld_simpl_SL_0_360 <- recenter(nowrapSpatialLines(wrld_simpl_SL))
plot(wrld_simpl_SL_0_360, axes=TRUE, xlim=c(110, 330), ylim=c(-80, 80))
which keeps the correct coordinates but at the cost of losing the polygons
and a couple of artefact lines at 180?.
Roger
>
> Best,
>
> --Hans
>
> **********************************************************
> Hans-Joerg Bibiko
> Max Planck Institute for Evolutionary Anthropology
> Department of Linguistics
> Deutscher Platz 6 phone: +49 (0) 341 3550 341
> D-04103 Leipzig fax: +49 (0) 341 3550 333
> Germany e-mail: bibiko at eva.mpg.de
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no