pyinterp.core.geodetic.Box.covered_by#

Box.covered_by(*args, **kwargs)#

Overloaded function.

  1. covered_by(self: pyinterp.core.geodetic.Box, point: pyinterp.core.geodetic.Point) -> bool

Test if the given point is inside or on border of this box.

Parameters:

point – point to test.

Returns:

True if the given point is inside or on border of this box.

  1. covered_by(self: pyinterp.core.geodetic.Box, lon: numpy.ndarray[numpy.float64[m, 1]], lat: numpy.ndarray[numpy.float64[m, 1]], num_threads: int = 1) -> numpy.ndarray[bool]

Test if the coordinates of the points provided are located inside or at the edge of this box.

Parameters:
  • lon – Longitudes coordinates in degrees to check

  • lat – Latitude coordinates in degrees to check

  • num_threads – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Default to 1.

Returns:

A vector containing a flag equal to 1 if the coordinate is located in the box or at the edge otherwise 0.