polygons_to_seeds: Convert Polygons To Seeds

Description Usage Arguments Value See Also

View source: R/polygons_to_seeds.r

Description

Convert SpatialPolygons to points, in a context-specific manner

Usage

1
2
3
polygons_to_seeds(rough_crowns_shp_fname, seed_placement = "centroid",
  image_fname, index_name = "NDVI", parallel = F, nWorkers = 2,
  outp_shp_fname, append = F, bandnames = NULL)

Arguments

rough_crowns_shp_fname

Character. Filename for the of the input polygon shapefile roughly depicting crowns.

seed_placement

How should polygons be converted to points. Options are 'centroid', which uses the centroid of the polygon, and 'maxval', which uses the location in the polygon where index_name reaches its maximum. Defaults is 'centroid'

image_fname

Optional. Filename of the image to run extract spectral bands or indices from to provide context. Only considered if seed_placement is 'maxval'.

index_name

Character (for a spectral index) or numeric (for an individual wavelength). The spectral index or wavelength on which to perform the contextual evaluation. If a wavelength is provided, it should be expressed in nm. Only considered if seed_placement is 'maxval'. Default is "NDVI".

parallel

Logical. Would you like the tiles to be processed in parallel? Default is False.

nWorkers

If running the code in parallel, how many workers should be used? Default is 2.

outp_shp_fname

Character. Filename for the output point shapefile.

append

Logical. Should the data in outp_shp_fname be appendend with the new results? Default is False.

bandnames

Character. In case the bands aren't named according to wavelength and following csic convention, they can be provided. Default is NULL in which cases bandnames are read from the image file and csic naming convention is assumed.

Value

A SpatialPoints object

See Also

watershed_tree_delineation


pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.