sky_grid_centers: Map sky-grid centers to raster coordinates

View source: R/sky_grid_centers.R

sky_grid_centersR Documentation

Map sky-grid centers to raster coordinates

Description

Return image row and column indices for the center point of each cell in a sky grid composed of circular trapezoids of equal angular resolution defined by angle_width.

Usage

sky_grid_centers(z, a, angle_width)

Arguments

z

terra::SpatRaster generated with zenith_image().

a

terra::SpatRaster generated with azimuth_image().

angle_width

numeric vector of length one. Angle in deg that must divide both 0–360 and 0–90 into an integer number of segments. Retrieve a set of valid values by running lapply(c(45, 30, 18, 10), function(a) vapply(0:6, function(x) a/2^x, 1)).

Value

data.frame with integer columns row and col, one per grid cell.

See Also

sky_grid_segmentation()

Examples

z <- zenith_image(100, lens())
a <- azimuth_image(z)
sky_grid_centers(z, a, 45)

rcaiman documentation built on Sept. 9, 2025, 5:42 p.m.