daymet.tiles

0th

Percentile

DAYMET Tile ID's

Returns a vector of DAYMET tile id's within a specified extent

Usage
daymet.tiles(x, tiles, ids, coords, sp = FALSE)
Arguments
x

A sp, raster or extent object (with same projection as tiles)

tiles

A SpatialPolygonsDataFrame tile index (see notes)

ids

A tile id field in the tiles index

coords

A vector of xmin, xmax, ymin, ymax coordinates, in same projection as tiles

sp

(TRUE/FALSE) Should an sp class SpatialPolygonsDataFrame object of associate tiles be returned

Value

Vector of DAYMET tile IDS or if sp = TRUE a sp class SpatialPolygonsDataFrame

Note

Function accepts sp, raster or extent class object or bounding coordinates. All input must be in the same projection as the tile index SpatialPolygonsDataFrame. The library includes the DAYMAT tile index "DAYMET_tiles" which can be add using data(), see examples.

Aliases
  • daymet.tiles
Examples
# NOT RUN {
library(sp)
library(raster)
data(DAYMET_tiles)
e <- extent(-117.2567, -104.7523, 36.62797, 47.68194) 
  plot(DAYMET_tiles)
    plot(e, col="red", add=TRUE)

# Using extent object	
daymet.tiles(x = e, tiles = DAYMET_tiles, ids = "Id")

# Using sp object
e <- as(e, "SpatialPolygons")	
daymet.tiles(e, tiles = DAYMET_tiles, ids = "Id")

# Using bounding coordinates	
daymet.tiles(coords=c(-117.2567, -104.7523, 36.62797, 47.68194),
             tiles = DAYMET_tiles, ids = "Id" )

# Return sp polygons object
tiles <- daymet.tiles(x = e, tiles = DAYMET_tiles, ids = "Id", sp = TRUE)
  plot(DAYMET_tiles)
    plot(tiles, col="red", add=TRUE)
			 
# }
Documentation reproduced from package spatialEco, version 1.3-2, License: GPL-3

Community examples

Looks like there are no examples yet.