मुझे लगता है कि plotKML पैकेज का भी उल्लेख करने लायक है।
हालांकि, सहकर्मियों के बीच आसान साझा करने के लिए मुझे पैकेज leaflet पैकेज पर आधारित दिलचस्प पाया गया। कोई पृष्ठभूमि मानचित्र के लिए विभिन्न विकल्पों के साथ HTML दस्तावेज़ के रूप में मानचित्र को सहेज सकता है; Google धरती की आवश्यकता नहीं है और HTML मानचित्र आपके ब्राउज़र पर चलाएगा।
कुछ उदाहरण: plotKML
here साथ
library(sp)
library(rgdal)
library(raster)
library(plotKML)
library(mapview)
# A SpatialPointsDataFrame example
data(meuse)
coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992") # CRS Amersfoort (Netherlands)
# make a KML file from SpatialPointsDataFrame object
# will get a warning like "Reprojecting to +proj=longlat +datum=WGS84 ..."
# as it is expected to work with geographical coordinates with datum=WGS84,
# but seems that it takes care of the reprojecting.
plotKML::kml(meuse,
file.name = "meuse_cadium.kml",
points_names = meuse$cadmium,
colour = "#FF0000",
alpha = 0.6,
size = 1,
shape = "http://maps.google.com/mapfiles/kml/pal2/icon18.png")
# Or, an easy to make interactive map with mapView()
mapView(meuse)
# A RasterLayer example
data(meuse.grid)
gridded(meuse.grid) <- ~x+y
proj4string(meuse.grid) <- CRS("+init=epsg:28992")
dist_rst <- raster(meuse.grid["dist"])
# make a KML file from RasterLayer object
plotKML::kml(dist_rst,
file.name = "dist_rst.kml",
colour_scale = SAGA_pal[[1]])
# Or, easy to make interactive map with mapView() - display raster and add the points
mapView(dist_rst, legend=TRUE) + meuse
# However, note that for bigger raster datasets mapView() might reduce from resolution
अधिक उदाहरण, एक ट्यूटोरियल here साथ। mapview
के लिए, एक परिचय here पाया जा सकता है।