[R-sig-Geo] Rgshhs shift=true question

Roger Bivand Roger.Bivand at nhh.no
Wed Feb 18 12:50:08 CET 2009


On Wed, 18 Feb 2009, Hans-Jörg Bibiko wrote:

>
> Hi,
>
> I'm using the river database 'wdb_rivers_l.b' downloaded from 
> ftp://ftp.soest.hawaii.edu/pwessel/gshhs/gshhs_1.11.zip.
>
> If I do this:
>
>> rivers_low <- Rgshhs("wdb_rivers_l.b")
>
> I get a list of rivers as SpatialLines with
>
>> bbox(rivers_low[[1]])
>         min       max
> r1   0.000278 359.99944
> r2 -52.733333  74.41167
>
> Fine.
>
> But I need a xlim range of c(-180, 180). I could do it manually but I read in 
> ?Rgshhs that there's an argument 'shift' which, set to TRUE, shifts 
> longitudes > 180 degrees to below zero. But if I call:
>
>> rivers_low <- Rgshhs("wdb_rivers_l.b", shift = TRUE)
>
> I get the same bbox.
>
> What am I doing wrong?

Nothing wrong, it was a bug. Support for the two lines databases was added 
only in draft form, and that argument wasn't respected. From 0.7-20, it is 
respected.

Roger

>
> Thanks in advance and kind regards,
>
> --Hans
>
> _______________________________________________
> 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


More information about the R-sig-Geo mailing list