Ensure an anipoint uses a spherical coordinate system
Source:R/coordinate_system.R
ensure_is_spherical.RdStops with an informative error if data is not in a spherical
coordinate system.
Examples
af <- example_anipoint(n_obs = 3, n_individuals = 1, n_keypoints = 1)
# Passes silently when the coordinate system matches
try(ensure_is_spherical(af))
#> Error in ensure_coordinate_system(data, "spherical", "spherical") :
#> This anipoint is not in a spherical coordinate system.
#> ℹ coordinate_system is "cartesian_2d".
#> ℹ Convert the coordinates first; anispace has the transformations.