coordinates: Coordinate Transformations

coordinatesR Documentation

Coordinate Transformations

Description

Converts vector between Cartesian and geographical coordinate systems

Usage

cartesian_to_geographical(n)

geographical_to_cartesian(p)

geographical_to_spherical(p)

Arguments

n

Cartesian coordinates (x, y, z) as vector

p

Geographical coordinates (latitude, longitude) as vector

Value

Functions return a (2- or 3-dimensional) vector representing a point in the requested coordinate system.

See Also

cartesian_to_spherical() and spherical_to_cartesian() for conversions to spherical coordinates

Examples

n <- c(1, -2, 3)
cartesian_to_geographical(n)
p <- c(50, 10)
geographical_to_cartesian(p)

tectonicr documentation built on Sept. 11, 2024, 6:05 p.m.