Description Usage Arguments Details Value Examples
View source: R/spdf_from_extent.r
Create a spatialPolygonsDataFrame from extent of a spatial object.
1 |
x |
A spatial object. |
If x is projected, the spatialpolygonsdataframe will also be projected
SpatialPolygonsDataFrame.
1 2 3 4 | require(raster) #load required package.
r1<-raster::raster(ext=extent(c(0,10,0,10)), res=1, vals=1:100) #create example raster.
spdf<-spdf_from_extent(r1) #convert the raster extent to SpatialPolygonsdataFrame.
plot(spdf) #Plot results.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.