111 """Return whether the given bounding box overlaps the tract given a WCS.
115 tract : `lsst.skymap.TractInfo`
116 TractInfo specifying a tract.
117 imageWcs : `lsst.afw.geom.SkyWcs`
118 World coordinate system for the image.
119 imageBox : `lsst.geom.Box2I`
120 Bounding box for the image.
125 `True` if the bounding box overlaps the tract; `False` otherwise.
127 tractPoly = tract.getOuterSkyPolygon()
131 imageSkyCorners = imageWcs.pixelToSky(imagePixelCorners)
132 except lsst.pex.exceptions.LsstCppException
as e:
134 if (
not isinstance(e.message, lsst.pex.exceptions.DomainErrorException)
135 and not isinstance(e.message, lsst.pex.exceptions.RuntimeErrorException)):
140 return tractPoly.intersects(imagePoly)