tests/raster2vector.R

library(fasteraster);
library(datasets);

polygons <- raster2vector(volcano, 120, 200, 20, 1);
image(volcano, col = rev(grey.colors(100)), useRaster = TRUE)
plot(0, type = "l", xlim = c(0, nrow(volcano)), ylim = c(0, ncol(volcano)))
a <- lapply(polygons, function(x) lines(rbind(x, x[1,])))

zones <- rasterZoneAnalyzer(volcano, 120, 200, 20);
a <- text(zones[ , 3], zones[ , 4], labels = zones[ , 2]);

Try the fasteraster package in your browser

Any scripts or data that you put into this service are public.

fasteraster documentation built on May 2, 2019, 3:35 p.m.