salvus.geometry.coordinates.utils
salvus.geometry.coordinates.utils salvus geometry coordinates utils Utilities for working with coordinates.
Functions
compute_max_distance_in_m()
compute_max_distance_in_m()def compute_max_distance_in_m(
points: npt.NDArray, coordinate_system: CoordinateSystem
) -> float: ...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.
pointsnpt.NDArray — An array of shape (n, d) containing n points in d-dimensional space.coordinate_systemCoordinateSystem — The coordinate system in which the points are defined.
rad2deg_coordinates()
rad2deg_coordinates()def rad2deg_coordinates(coordinates: Coordinates) -> Coordinates: ...Convert spherical coordinate systems from radian to depth.
If the coordinate system is not in radian, it will return it without changes.
coordinatesCoordinates — The coordinates.