runtraj.Bounds#

class runtraj.Bounds(*, xmin: float, xmax: float, ymin: float, ymax: float) → None[source]#

Longitude/latitude bounding box, in degrees.

The edges are finite numbers, and -90 <= ymin < ymax <= 90. Longitudes count modulo 360 (contains()), so xmin east of xmax is a box across the dateline. Such a box is refused when it would be more than 180 degrees wide, as when the edges were swapped (xmin=-109, xmax=-114); write a wider one with xmax past 180.

Parameters#

Parameter

Description

Default

xmin

Western edge, in degrees longitude.

Required

xmax

Eastern edge, in degrees longitude.

Required

ymin

Southern edge, in degrees latitude.

Required

ymax

Northern edge, in degrees latitude.

Required

Methods#

contains(longitude, latitude)

Return whether each point is in the box, counting longitudes modulo 360.