Version:

salvus.geometry.coordinates.utils

salvus.geometry.coordinates.utils salvus geometry coordinates utils
Utilities for working with coordinates.

Functions

compute_max_distance_in_m()

Computes the maximum distance between any two points in given set of points.
In a Cartesian system it will compute the Euclidean distance between all point pairs. If one or more points are not finite in any given dimension, that dimension will be ignored in the computations.
In spherical system it will compute the maximum arc length in meters between any two points using the maximum radius of all given points. If you are interested in computing the Euclidean distance between points in a spherical system, first convert the points to a cartesian system and then call this function.
SIGNATURE
def compute_max_distance_in_m(
    points: npt.NDArray, coordinate_system: CoordinateSystem
) -> float: ...
ARGUMENTS
Required
points
Type:npt.NDArray
Description:
An array of shape (n, d) containing n points in d-dimensional space.
Required
coordinate_system
Type:CoordinateSystem
Description:
The coordinate system in which the points are defined.
RETURNS
Return type: float
The maximum distance in meter between any two points in the given coordinates.

rad2deg_coordinates()

Convert spherical coordinate systems from radian to depth.
If the coordinate system is not in radian, it will return it without changes.
SIGNATURE
def rad2deg_coordinates(coordinates: Coordinates) -> Coordinates: ...
ARGUMENTS
Required
coordinates
Type:Coordinates
Description:
The coordinates.
RETURNS
Return type: Coordinates
PAGE CONTENTS