raster2vector {fasteraster} | R Documentation |
Takes a raster matrix and vectorize it by polygons. Typically the nature of artefact images is linear and can be vectorized in much more efficient way than draw a series of 90 degrees lines.
raster2vector(raster, from = 0, to = 1, step = 0.1, precision = 1L, exclave = TRUE)
raster |
input matrix of numeric values. |
from |
lower (greater than) margin for recognizable polygon values. |
to |
upper (less than or equal) margin. |
step |
values gradient. |
precision |
linearization precision in matrix cells. |
exclave |
polygons may have other inside. |
list of integer matrixes that represent polygon coordinates in two columns.
library(datasets) raster2vector(volcano, 100, 200, 60, 1, FALSE) raster2vector(volcano, 120, 200, 20)