既然要繪製它,可以鞏固shape文件到數據幀,修改-180區域的經度座標,&繪製結果ggplot
:
library(rgdal); library(ggplot2)
# read in the shapefile & subset to Russia
shp <- readOGR(dsn = "ne_10m", layer = "ne_10m_admin_1_states_provinces_lakes")
rus <- shp[shp$admin == "Russia", ]
# fortify to data frame & modify longitude coordinates in the -180 region.
rus.fortify <- fortify(rus) %>%
mutate(long = ifelse(long < -100, long + 180*2, long))
# plot to verify
ggplot(rus.fortify,
aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", col = "black") +
coord_map() #default projection is mercator
我也剛剛從this post瞭解到,您可以指定不同的投影系統。鑑於大俄羅斯是怎麼了,這應該是相關的:
ggplot(rus.fortify,
aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", col = "black") +
coord_map("azequalarea")
這是一個已知的問題與俄羅斯由於其規模和跨越180°。也許這個問題可以幫助:https://gis.stackexchange.com/questions/72621/how-to-render-area-that-crosses-180%C2%B0 – Stedy
謝謝你Stedy。對於這個問題有一個R解決方案會很有趣..我真的不知道任何GIS程序。對不起,這個問題是不可複製的 –