select_sky_vault_region: Select a portion of the sky vault

View source: R/select_sky_vault_region.R

select_sky_vault_regionR Documentation

Select a portion of the sky vault

Description

Given a zenith or azimuth image and angle restrictions, this function produces select a region of the sky vault and produce a binary raster mask.

Usage

select_sky_vault_region(r, from, to)

Arguments

r

SpatRaster built with zenith_image() or azimuth_image().

from, to

angle in degrees, inclusive limits.

Value

An object of class SpatRaster with values 0 and 1.

See Also

masking()

Other Segmentation Functions: chessboard(), mask_sunlit_canopy(), polar_qtree(), qtree(), rings_segmentation(), sectors_segmentation(), sky_grid_segmentation()

Examples

## Not run: 
z <- zenith_image(1000, lens())
a <- azimuth_image(z)
m1 <- select_sky_vault_region(z, 20, 70)
plot(m1)
m2 <- select_sky_vault_region(a, 330,360)
plot(m2)
plot(m1 & m2)
plot(m1 | m2)

# 15 degrees at each side of 0
m1 <- select_sky_vault_region(a, 0, 15)
m2 <- select_sky_vault_region(a, 345, 360)
plot(m1 | m2)

# better use this
plot(!is.na(z))
# instead of this
plot(select_sky_vault_region(z, 0, 90))

## End(Not run)

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