powered by
Elongate SpatVector lines
# S4 method for SpatVector elongate(x, length=1)
SpatVector
positive number indicating how much the lines should be elongated at each end. The unit is meter is the crs is lonlat and it is the same as the linear unit of the crs on other cases (also meter in most cases)
buffer, crop and erase
buffer
crop
erase
v <- vect(cbind(c(0,1,2), c(0,0,2)), "lines", crs="lonlat") e <- elongate(v, 100000) plot(e) points(e) geom(e)
Run the code above in your browser using DataLab