View source: R/crown_indices_from_bigshape.r
Append a big SpatialPolygonDataFrame with crown-level indices and band values extracted from an image file. The extraction can be tuned to only apply to polygons that correspond to the flight and sensor that acquired the image file. The extraction can also be tuned to get values from a DEM, or other topographical layer. In that cases no indices are calculated.
1 2 3 | crown_indices_from_bigshape(field_dat, image_fname, flight_name. = "ALL",
sensor. = "ALL", indices., outp_SpatPol_fname, bandnames. = NULL,
extract_as_points = F)
|
field_dat |
SpatialPolygons(DataFrame) to extract values for |
image_fname |
Image to extract values from |
flight_name. |
Character vector. Names of flights for which to extract data. If 'ALL' then data from all flights will be extracted. Default is 'ALL'. |
sensor. |
Character vector. Names of sensors for which to extract data. If 'ALL' then data from all sensors will be extracted. Default is 'ALL'. |
indices. |
Character vector. Indices to calculate. If NULL (the default) only individual bands values are returned. This is useful when image_fname is a DEM for example. |
outp_SpatPol_fname |
Filename for the output SpatialPolygonsDataFrame. |
bandnames. |
Optional bandnames of the image_fname. If set to NULL (the default), bandnames will be read from image_fname |
extract_as_points |
Logical. Should the SpatialPolygons be converted to SpatialPoints before extracting pixel values? This can be useful and save lots of time when the polygons are smaller than the cel size of the image. Default is FALSE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.