rnaturalearth: detail by degrees

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

rnaturalearth: detail by degrees

Mag. Ferri Leberl

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
 

______________________________________________
[hidden email] 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
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: rnaturalearth: detail by degrees

Jim Lemon-4
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 <[hidden email]> 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
>
>
> ______________________________________________
> [hidden email] 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
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] 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
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: rnaturalearth: detail by degrees

Mag. Ferri Leberl
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" <[hidden email]>
An: "Ferri Leberl" <[hidden email]>
Cc: "r-help mailing list" <[hidden email]>
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 <[hidden email]> 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
>
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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
and provide commented, minimal, self-contained, reproducible code.