sp_line | R Documentation |
create an spatiallineobject from 2 points, optional export as shapefile
sp_line( Y_coords, X_coords, ID = "ID", proj4 = "+proj=longlat +datum=WGS84 +no_defs", export = FALSE, runDir )
Y_coords |
Y/lat coordinates |
X_coords |
X/lon coordinates |
ID |
id of line |
proj4 |
projection |
export |
write shafefile default = F |
runDir |
|
## Not run: ## creating sp spatial point object line <- sp_line(c(8.770367,8.771161,8.771536), c(50.815172,50.814743,50.814875), runDir=tempdir()) ## plot it raster::plot(line) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.