pyinterp.geometry.satellite.find_crossovers#
- pyinterp.geometry.satellite.find_crossovers(lon1: numpy.ndarray[dtype=float64, shape=(*), writable=False], lat1: numpy.ndarray[dtype=float64, shape=(*), writable=False], lon2: numpy.ndarray[dtype=float64, shape=(*), writable=False], lat2: numpy.ndarray[dtype=float64, shape=(*), writable=False], predicate: float, allow_multiple: bool = False, use_cartesian: bool = True, strategy: pyinterp.core.geometry.geographic.algorithms.Strategy = Strategy.VINCENTY, spheroid: pyinterp.core.geometry.geographic.Spheroid | None = None, assume_unimodal: bool = False) list[pyinterp.core.geometry.satellite.CrossoverResult]#
Find crossover point between two satellite half-orbits.
- Parameters:
lon1 – Longitude array of the first half-orbit in degrees.
lat1 – Latitude array of the first half-orbit in degrees.
lon2 – Longitude array of the second half-orbit in degrees.
lat2 – Latitude array of the second half-orbit in degrees.
predicate – Maximum acceptable distance to consider a vertex as nearest.
allow_multiple – If true, all crossover points are returned; otherwise, only a unique crossover point is searched.
use_cartesian – If true, the intersection search is performed on a Cartesian plane; otherwise, geodetic calculations are used.
strategy – Calculation strategy.
spheroid – Optional spheroid for geodetic calculations.
assume_unimodal – If true, the vertices nearest to a crossover point are found with a bisection search instead of examining all the vertices.
- Returns:
All crossover points found that pass the predicate filter.
- Raises:
RuntimeError – If
allow_multipleis false and multiple crossover points are found.
Note
If
use_cartesianis true, the intersection search is performed on a Cartesian plane, which provides faster results than geodetic calculations. However, this approach is only appropriate when an approximate determination is acceptable. The accuracy depends on the vertices of the linestrings being close to each other; if they are widely spaced, the determined geographical point may be significantly incorrect due to Cartesian approximation errors.If
assume_unimodalis true, the distance from a crossover point to the vertices must be strictly unimodal along each line, which holds for clean half-orbits. If a line contains duplicated vertices, covers more than a half-orbit or comes back towards the crossover point, the indices returned may be wrong and a valid crossover may be rejected bypredicate.