write_caim: Write canopy image

View source: R/write_caim.R

write_caimR Documentation

Write canopy image

Description

Wrapper function for terra::writeRaster().

Usage

write_caim(caim, path, bit_depth)

Arguments

caim

SpatRaster.

path

Character vector of length one. Path for writing the image.

bit_depth

Numeric vector of length one.

Value

No return value. Called for side effects.

See Also

Other Tool Functions: calc_oor_index(), calc_spherical_distance(), colorfulness(), correct_vignetting(), defuzzify(), display_caim(), extract_dn(), extract_feature(), extract_rel_radiance(), extract_sky_points(), extract_sun_coord(), find_sky_pixels(), masking(), optim_dist_to_black(), optim_normalize(), percentage_of_clipped_highlights(), read_bin(), read_caim(), read_caim_raw(), read_ootb_sky_model(), sor_filter(), vicinity_filter(), write_bin(), write_ootb_sky_model()

Examples

## Not run: 
caim <- read_caim() %>% normalize_minmax(., 0, 255)
write_caim(caim * 2^8-2, file.path(tempdir(), "test_8bit"), 8)
write_caim(caim * 2^16-2, file.path(tempdir(), "test_16bit"), 16)
# Note: the normalized values are scaled by multiplying by 2^bit_depth-2
# to avoid storing in the maximum bin because those values will be
# interpreted as NA by read_caim(), and that is undesired.

## End(Not run)

GastonMauroDiaz/rcaiman documentation built on April 14, 2025, 9:39 a.m.