Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41012: Check for empty spanset prior to trying to transform it #711

Merged
merged 2 commits into from Oct 4, 2023

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Oct 2, 2023

No description provided.

@@ -848,6 +848,11 @@ std::shared_ptr<SpanSet> SpanSet::transformedBy(lsst::geom::AffineTransform cons
}

std::shared_ptr<SpanSet> SpanSet::transformedBy(TransformPoint2ToPoint2 const& t) const {
// Check if it's an empty bounding box
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Check if it's an empty bounding box
// If the SpanSet is empty, its bounding box corners are not meaningful and cannot be transformed.

(but line-wrapped)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside, I think we should make Box2I.getCorners raise an exception if the box is empty. Not suggesting it go on this ticket.

@erykoff erykoff merged commit 29afe69 into main Oct 4, 2023
2 checks passed
@erykoff erykoff deleted the tickets/DM-41012 branch October 4, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants