[R-sig-Geo] How to get the coordinates (latitude/longitude) of a continent outline?

Sohrab Abbasnejad @ohr@b@@bb@@nej@d @end|ng |rom y@hoo@com
Sat Feb 2 17:36:15 CET 2019


 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 <zivan.karaman using gmail.com> 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 <r-sig-geo using r-project.org> 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
R-sig-Geo using r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

  
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list