Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/plotKML.GDALobj.R
Write tiled objects to KML. Suitable for plotting large rasters i.e. large spatial data sets.
1 2 3 4 5 |
obj |
|
file.name |
character; output KML file name |
block.x |
numeric; size of block in meters or corresponding mapping units |
tiles |
data.frame; tiling definition generated using |
tiles.sel |
integer; selection of tiles to be plotted |
altitude |
numeric; altitude of the ground overlay |
altitudeMode |
character; either |
colour_scale |
character; color palette |
z.lim |
numeric; upper lower boundaries |
breaks.lst |
numeric; optional break lines (must be of size |
kml.logo |
character; optional project logo file (PNG) |
overwrite |
logical; specifies whether to overwrite PNGs if available |
cpus |
integer; specifies number of CPUs to be used by the snowfall package to speed things up |
home.url |
character; optional web-directory where the PNGs will be stored |
desc |
character; optional layer description |
open.kml |
logical; specifies whether to open the KML file after writing |
CRS |
character; projection string (if missing) |
plot.legend |
logical; indicate whether to plot summary legend |
Returns a list of KML files.
This operation can be time-consuming for processing very large rasters e.g. more than 10,000 by 10,000 pixels. To speed up writing of KMLs, use the snowfall package.
Tomislav Hengl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
library(sp)
library(snowfall)
library(landmap)
library(rgdal)
fn = system.file("pictures/SP27GTIF.TIF",
package = "rgdal")
obj <- GDALinfo(fn)
tiles <- getSpatialTiles(obj, block.x=5000,
return.SpatialPolygons = FALSE)
## plot using tiles:
plotKML.GDALobj(obj, tiles=tiles, z.lim=c(0,185))
## Even better ideas is to first reproject
## the large grid using 'gdalUtils::gdalwarp', then tile...
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.