Learn R Programming

rcaiman (version 2.0.1)

sky_grid_centers: 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)

Value

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

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)).

See Also

sky_grid_segmentation()

Examples

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

Run the code above in your browser using DataLab