Description Usage Arguments Details Examples
View source: R/tileShapefile.R
The tileShapefile
function splits large shapefiles into up into 1 or 2 degree tiles while
preserving the zonal polygons. The purpose of this is to prevent memory issues when reading Daymet
records.
1 | tileShapefile(shapefile, tileDegree)
|
shapefile |
A SpatialPolygonsDataFrame of the zones which will be assigned climate records. The object should be in the WGS geographic coordinate system to match the netCDF files (proj4string = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0"). |
tileDegree |
A numeric value of either 1 or 2 indicating the length of the tile edge in lat/lon degrees. |
Polygons are assigned to tiles based on where their centroids are located. The spatial object should be in the Daymet coordinate system before executing the function. This function only works for SpatialPolygonsDataFrame with units that are lat/lon. The "spTransform" function can be used to transform the object from a projected to a geographic coordinate system.
1 2 | tileShapefile(shapefile = spatialPolygonsDataFrame,
tileDegree = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.