我正在尝试获取北极冰的存在情况图。我正在使用从https://nsidc.org/data/masie/获取的shapefile文件。
library(maptools)
library(rgeos)
library(ggplot2)
library(rgdal)
library(plyr)
library(ggmap)
library(dismo)
library(raster)
library(plyr)
ICE <- readOGR(".", "masie_ice_r00_v01_2018094_4km")
plot(ICE)
ICE_WGS84 <- spTransform(ICE, CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"))
plot(ICE_WGS84, axes=T)
你可以看到,多边形似乎被分割了,我想解决这个问题。有什么建议吗? 我想在Google地图上显示冰的存在。
mapImage <- get_map(location = c(lon = -160, lat = 66),
color = "color",
source = "google",
zoom = 4)
ggmap(mapImage) +
geom_polygon(aes(x = long,
y = lat,
group = group),
data = ICE_WGS84,
fill="white") +
labs(x = "Longitude",
y = "Latitude")
预先感谢您!