I am trying to get elevation data for Russia. Below are my codes. I used geoboundaries to get the boundary of Russia first. Then use get_elev_raster to get the elevation data.
library(rgeoboundaries)
library(elevatr)
russia <- rgeoboundaries::geoboundaries(country = "Russia",adm_lvl = "adm0")
get_elev_raster(russia,z=4)
However, it returns an error message:
Error in proj_expand(locations, prj, expand) :
The elevatr package requires longitude in a range from -180 to 180.
What's wrong with my codes? I tried similar codes for some European countries like France and Italy. The codes all worked well.
Thank you so much!
The problem is that the region you are trying to get crosses the international date line, which
elevatr
doesn't like. You will need to get the East and West parts separatelyNow you have two rasters for the East and West parts of Russia. We can plot this as follows: