lsst.geom
15.0+8
|
Public Member Functions | |
def | __init__ (self, args) |
def | wraps (self) |
def | getBoundingBox (self) |
def | getMin (self) |
def | getMax (self) |
def | getThetaExtent (self) |
def | getCenter (self) |
def | isEmpty (self) |
def | isFull (self) |
def | containsPoint (self, p) |
def | contains (self, pointOrRegion) |
def | intersects (self, pointOrRegion) |
def | extend (self, pointOrRegion) |
def | shrink (self, box) |
def | setEmpty (self) |
def | setFull (self) |
def | __repr__ (self) |
def | __eq__ (self, other) |
def | __hash__ (self) |
Static Public Member Functions | |
def | edge (v1, v2, n) |
Public Attributes | |
min | |
max | |
A spherical coordinate space bounding box. This is similar to a bounding box in cartesian space in that it is specified by a pair of points; however, a spherical box may correspond to the entire unit-sphere, a spherical cap, a lune or the traditional rectangle. Additionally, spherical boxes can span the 0/360 degree longitude angle discontinuity. Note that points falling exactly on spherical box edges are considered to be inside (contained by) the box.
def lsst.geom.geometry.SphericalBox.__init__ | ( | self, | |
args | |||
) |
Creates a new spherical box. If no arguments are supplied, then an empty box is created. If the arguments consist of a single SphericalRegion, then a copy of its bounding box is created. Otherwise, the arguments must consist of a pair of 2 (spherical) or 3 (cartesian 3-vector) element coordinate tuples/lists that specify the minimum/maximum longitude/latitude angles for the box. Latitude angles must be within [-90, 90] degrees, and the minimum latitude angle must be less than or equal to the maximum. If both minimum and maximum longitude angles lie in the range [0.0, 360.0], then the maximum can be less than the minimum. For example, a box with min/max longitude angles of 350/10 deg spans the longitude angle ranges [350, 360) and [0, 10]. Otherwise, the minimum must be less than or equal to the maximum, though values can be arbitrary. If the two are are separated by 360 degrees or more, then the box spans longitude angles [0, 360). Otherwise, both values are range reduced. For example, a spherical box with min/max longitude angles specified as 350/370 deg spans longitude angle ranges [350, 360) and [0, 10].
def lsst.geom.geometry.SphericalBox.__repr__ | ( | self | ) |
Returns a string representation of this spherical box.
def lsst.geom.geometry.SphericalBox.contains | ( | self, | |
pointOrRegion | |||
) |
Returns True if this spherical box completely contains the given point or spherical region. Note that the implementation is conservative where ellipses are concerned: False may be returned for an ellipse that is actually completely contained in this box.
def lsst.geom.geometry.SphericalBox.containsPoint | ( | self, | |
p | |||
) |
Returns True if this spherical box contains the given point, which must be specified in spherical coordinates.
|
static |
Returns a spherical bounding box for the great circle edge connecting v1 to v2 with plane normal n. All arguments must be cartesian unit vectors.
def lsst.geom.geometry.SphericalBox.extend | ( | self, | |
pointOrRegion | |||
) |
Extends this box to the smallest spherical box S containing the union of this box with the specified point or spherical region.
def lsst.geom.geometry.SphericalBox.getBoundingBox | ( | self | ) |
Returns a bounding box for this spherical region.
def lsst.geom.geometry.SphericalBox.getCenter | ( | self | ) |
Returns an 2-tuple of floats corresponding to the longitude/latitude angles (in degrees) of the center of this spherical box.
def lsst.geom.geometry.SphericalBox.getMax | ( | self | ) |
Returns the maximum longitude and latitude angles of this spherical box as a 2-tuple of floats (in units of degrees).
def lsst.geom.geometry.SphericalBox.getMin | ( | self | ) |
Returns the minimum longitude and latitude angles of this spherical box as a 2-tuple of floats (in units of degrees).
def lsst.geom.geometry.SphericalBox.getThetaExtent | ( | self | ) |
Returns the extent in longitude angle of this box.
def lsst.geom.geometry.SphericalBox.intersects | ( | self, | |
pointOrRegion | |||
) |
Returns True if this spherical box intersects the given point or spherical region. Note that the implementation is conservative: True may be returned for a region that does not actually intersect this box.
def lsst.geom.geometry.SphericalBox.isEmpty | ( | self | ) |
Returns True if this spherical box contains no points.
def lsst.geom.geometry.SphericalBox.isFull | ( | self | ) |
Returns True if this spherical box contains every point on the unit sphere.
def lsst.geom.geometry.SphericalBox.setEmpty | ( | self | ) |
Empties this spherical box.
def lsst.geom.geometry.SphericalBox.setFull | ( | self | ) |
Expands this spherical box to fill the unit sphere.
def lsst.geom.geometry.SphericalBox.shrink | ( | self, | |
box | |||
) |
Shrinks this box to the smallest spherical box containing the intersection of this box and the specified one.
def lsst.geom.geometry.SphericalBox.wraps | ( | self | ) |
Returns True if this spherical box wraps across the 0/360 degree longitude angle discontinuity.