pyinterp.geometry.satellite.find_crossovers

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) 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.

Returns:

All crossover points found that pass the predicate filter.

Raises:

RuntimeError – If allow_multiple is false and multiple crossover points are found.

Note

If use_cartesian is 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.