sector_segmentation: Assign azimuth-sector labels

View source: R/sector_segmentation.R

sector_segmentationR Documentation

Assign azimuth-sector labels

Description

Segment a hemispherical view into equal azimuth sectors by slicing the azimuth angle from 0 to 360 deg at fixed steps.

Usage

sector_segmentation(a, angle_width)

Arguments

a

terra::SpatRaster generated with azimuth_image().

angle_width

numeric vector of lenght one. Sector width in degrees. Must divide the 0–360 deg range into an integer number of sectors.

Value

Single-layer terra::SpatRaster with integer values. Segments will resemble pizza slices.

Examples

z <- zenith_image(600, lens())
a <- azimuth_image(z)
sectors <- sector_segmentation(a, 15)
plot(sectors == 1)

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