How to get the coordinates (latitude/longitude) of a continent outline?

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

How to get the coordinates (latitude/longitude) of a continent outline?

R-sig-geo mailing list
Hello,
I would like to have the list of coordinates of the boundary (outline) of a continent (Africa). The "map" function from the "maps" package gives the coordinates for country outlines, but not the for the continents.

Does anybody have an idea where I can find the data?

Thank you!

Cheers,
Sohrab




        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the coordinates (latitude/longitude) of a continent outline?

Ben Tupper
Hi,

There is a whole world of options (sorry for the lame pun!), but I would recommend checking out ROpenSci's rnaturalearth package

https://ropensci.org/tutorials/rnaturalearth_tutorial/ <https://ropensci.org/tutorials/rnaturalearth_tutorial/>

https://CRAN.R-project.org/package=rnaturalearth <https://cran.r-project.org/package=rnaturalearth>

Ben

> On Feb 2, 2019, at 8:36 AM, Sohrab Abbasnejad via R-sig-Geo <[hidden email]> wrote:
>
> Hello,
> I would like to have the list of coordinates of the boundary (outline) of a continent (Africa). The "map" function from the "maps" package gives the coordinates for country outlines, but not the for the continents.
>
> Does anybody have an idea where I can find the data?
>
> Thank you!
>
> Cheers,
> Sohrab
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/






        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the coordinates (latitude/longitude) of a continent outline?

Zivan Karaman
In reply to this post by R-sig-geo mailing list
Hello Sohrab,

You can start with country maps, and then merge them in a single polygon.
For example, get the maps as a shape file from here
http://www.maplibrary.org/library/stacks/Africa/Africa_SHP.zip, unzip this
file and run the following R code

library(sp)
library(rgdal)
library(rgeos)
countries <- rgdal::readOGR(dsn = ".", layer = "Africa")
sp::proj4string(countries) <- sp::CRS("+init=epsg:4326")
a <- rgeos::gBuffer(countries, width = 0)
# ignore the warnings
sp::proj4string(a) <- sp::CRS("+init=epsg:4326")
plot(a)
# this produces quite a detailed map with islands, lakes, etc.
# you can simplify it to suit your needs by tuning the tol argument
b <- rgeos::gSimplify(a, tol = 0.1)
plot(b)

Cheers,
Zivan



Le sam. 2 févr. 2019 à 14:36, Sohrab Abbasnejad via R-sig-Geo <
[hidden email]> a écrit :

> Hello,
> I would like to have the list of coordinates of the boundary (outline) of
> a continent (Africa). The "map" function from the "maps" package gives the
> coordinates for country outlines, but not the for the continents.
>
> Does anybody have an idea where I can find the data?
>
> Thank you!
>
> Cheers,
> Sohrab
>
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the coordinates (latitude/longitude) of a continent outline?

R-sig-geo mailing list
In reply to this post by Ben Tupper
 Dear Ben,

Thank you for your reply.

So far as I am aware, the rnaturalearth package provides information about countries within a continent, states within countries and "world" coastline (subsetting the coastline is not possible). Nevertheless, the package does not include maps/data of "continents". What I need is the coordinates of Africa's outline (as a single entity), not the coordinates of countries' outlines within Africa.

Best,
Sohrab


    On ‎Saturday‎, ‎February‎ ‎2‎, ‎2019‎ ‎03‎:‎38‎:‎25‎ ‎PM‎ ‎CET, Ben Tupper wrote:  
 
 Hi,
There is a whole world of options (sorry for the lame pun!), but I would recommend checking out ROpenSci's rnaturalearth package
https://ropensci.org/tutorials/rnaturalearth_tutorial/
https://CRAN.R-project.org/package=rnaturalearth
Ben


On Feb 2, 2019, at 8:36 AM, Sohrab Abbasnejad via R-sig-Geo <[hidden email]> wrote:
Hello,
I would like to have the list of coordinates of the boundary (outline) of a continent (Africa). The "map" function from the "maps" package gives the coordinates for country outlines, but not the for the continents.

Does anybody have an idea where I can find the data?

Thank you!

Cheers,
Sohrab




 [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org
Ecological Forecasting: https://eco.bigelow.org/




 
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the coordinates (latitude/longitude) of a continent outline?

R-sig-geo mailing list
In reply to this post by Zivan Karaman
 Dear Zivan,

Your solution did the job! Thank you very much!

Best,
Sohrab

    On ‎Saturday‎, ‎February‎ ‎2‎, ‎2019‎ ‎04‎:‎07‎:‎27‎ ‎PM‎ ‎CET, Zivan Karaman <[hidden email]> wrote:  
 
 Hello Sohrab,
You can start with country maps, and then merge them in a single polygon.For example, get the maps as a shape file from here http://www.maplibrary.org/library/stacks/Africa/Africa_SHP.zip, unzip this file and run the following R code
library(sp)library(rgdal)library(rgeos)countries <- rgdal::readOGR(dsn = ".", layer = "Africa")
sp::proj4string(countries) <- sp::CRS("+init=epsg:4326")a <- rgeos::gBuffer(countries, width = 0)# ignore the warningssp::proj4string(a) <- sp::CRS("+init=epsg:4326")plot(a)# this produces quite a detailed map with islands, lakes, etc.# you can simplify it to suit your needs by tuning the tol argumentb <- rgeos::gSimplify(a, tol = 0.1)plot(b)
Cheers,Zivan


Le sam. 2 févr. 2019 à 14:36, Sohrab Abbasnejad via R-sig-Geo <[hidden email]> a écrit :

Hello,
I would like to have the list of coordinates of the boundary (outline) of a continent (Africa). The "map" function from the "maps" package gives the coordinates for country outlines, but not the for the continents.

Does anybody have an idea where I can find the data?

Thank you!

Cheers,
Sohrab




        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

 
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: How to get the coordinates (latitude/longitude) of a continent outline?

Ben Tupper
In reply to this post by R-sig-geo mailing list
Hi,

Yes, I flubbed that.  I had it in my head that this...

https://www.naturalearthdata.com/downloads/110m-physical-vectors/110m-land/ <https://www.naturalearthdata.com/downloads/110m-physical-vectors/110m-land/>

... had Africa as a stand alone polygon, but that is not so.  Sorry for the noise.

Ben

> On Feb 2, 2019, at 10:17 AM, Sohrab Abbasnejad <[hidden email]> wrote:
>
> Dear Ben,
>
> Thank you for your reply.
>
> So far as I am aware, the rnaturalearth package provides information about countries within a continent, states within countries and "world" coastline (subsetting the coastline is not possible). Nevertheless, the package does not include maps/data of "continents". What I need is the coordinates of Africa's outline (as a single entity), not the coordinates of countries' outlines within Africa.
>
> Best,
> Sohrab
>
>
> On ‎Saturday‎, ‎February‎ ‎2‎, ‎2019‎ ‎03‎:‎38‎:‎25‎ ‎PM‎ ‎CET, Ben Tupper wrote:
>
>
> Hi,
>
> There is a whole world of options (sorry for the lame pun!), but I would recommend checking out ROpenSci's rnaturalearth package
>
> https://ropensci.org/tutorials/rnaturalearth_tutorial/ <https://ropensci.org/tutorials/rnaturalearth_tutorial/>
>
> https://CRAN.R-project.org/package=rnaturalearth <https://cran.r-project.org/package=rnaturalearth>
>
> Ben
>
>> On Feb 2, 2019, at 8:36 AM, Sohrab Abbasnejad via R-sig-Geo <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Hello,
>> I would like to have the list of coordinates of the boundary (outline) of a continent (Africa). The "map" function from the "maps" package gives the coordinates for country outlines, but not the for the continents.
>>
>> Does anybody have an idea where I can find the data?
>>
>> Thank you!
>>
>> Cheers,
>> Sohrab
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email] <mailto:[hidden email]>
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> Ben Tupper
> Bigelow Laboratory for Ocean Sciences
> 60 Bigelow Drive, P.O. Box 380
> East Boothbay, Maine 04544
> http://www.bigelow.org <http://www.bigelow.org/>
>
> Ecological Forecasting: https://eco.bigelow.org/ <https://eco.bigelow.org/>
>
>
>
>

Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/






        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo