[R] rnaturalearth: detail by degrees

Ferri Leberl ferri@leberl @ending from gmx@@t
Sun Nov 11 11:36:45 CET 2018


Dear Jim,
Thank you for your help.
Meanwhile I found a solution that works about like this:
 
library(rnaturalearth)
mittex<--59.75#central meridian
mittey<--62.316667#central latitude
band<-2#halve edge length of the depicted square, in degrees
map<-ne_countries(scale=10)#the source map
if(require(sp)){plot(map,ylim=c(mittey-band,mittey+band),xlim=c(mittex-band,mittex+band))}#plot the map
#Now plot the path with lines(). The points are described by their geocoords.

Yours, Ferri
 
 
 

Gesendet: Sonntag, 04. November 2018 um 22:41 Uhr
Von: "Jim Lemon" <drjimlemon using gmail.com>
An: "Ferri Leberl" <ferri.leberl using gmx.at>
Cc: "r-help mailing list" <r-help using r-project.org>
Betreff: Re: [R] rnaturalearth: detail by degrees
Hi Ferri,
One way is to snip out a Google Maps image of the area you want, then
using the "maps" package, start a plot bounded by the corner
coordinates of your Google Maps image. You can get those by clicking
on the corners of the area that you selected. Then use the
"readbitmap" package to create a raster object of your GM image and
display it on the plot made by "map". Finally, use either "points" or
"lines" to display the coordinates of your path.

Jim

On Sat, Nov 3, 2018 at 8:43 PM Ferri Leberl <ferri.leberl using gmx.at> wrote:
>
>
> Dear all,
> I have the graph of a path, walking a number of places specified by name, logitude and latitude – thanks to Don MacQueen.
> xliam and ylim define a certain section of the earth.
> How can I put this section of a political map into the background?
> Thank you in advance.
> Yours, Ferri
>
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html]
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list