109 """Return whether the given bounding box overlaps the tract given a WCS. 113 tract : `lsst.skymap.TractInfo` 114 TractInfo specifying a tract. 115 imageWcs : `lsst.afw.geom.SkyWcs` 116 World coordinate system for the image. 117 imageBox : `lsst.geom.Box2I` 118 Bounding box for the image. 123 `True` if the bounding box overlaps the tract; `False` otherwise. 125 tractPoly = tract.getOuterSkyPolygon()
129 imageSkyCorners = imageWcs.pixelToSky(imagePixelCorners)
130 except lsst.pex.exceptions.LsstCppException
as e:
132 if (
not isinstance(e.message, lsst.pex.exceptions.DomainErrorException)
and 133 not isinstance(e.message, lsst.pex.exceptions.RuntimeErrorException)):
138 return tractPoly.intersects(imagePoly)
A floating-point coordinate rectangle geometry.
static ConvexPolygon convexHull(std::vector< UnitVector3d > const &points)
convexHull returns the convex hull of the given set of points if it exists and throws an exception ot...
def imageOverlapsTract(tract, imageWcs, imageBox)