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 (pyinterp.geodectic.Point2D) – point to test.

Returns

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

Return type

bool

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

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

Parameters
  • lon (numpy.ndarray) – Longitudes coordinates in degrees to check

  • lat (numpy.ndarray) – Latitude coordinates in degrees to check

  • num_threads (int, optional) – 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.

Return type

numpy.ndarray