Polygon.covered_by(*args, **kwargs)

Overloaded function.

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

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


point (pyinterp.geodectic.Point2D) – point to test.


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

Return type


  1. covered_by(self: pyinterp.core.geodetic.Polygon, 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 polygon.

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


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

Return type