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

Use appropriate buffer for QgsGeometry::XXXContainedInLine. Fix #10999. #1609

Closed

Conversation

arnaud-morvan
Copy link
Contributor

We have reduced the problem by reducing the size of the buffer used in QgsGeometry::XXXContainedInLine functions.
The error may still occur depending on:
the accuracy of the projection used,
the distance between the object to modify and the nearest point.
So we caught the error, stop capturing and displaying a more specific message.

@luipir
Copy link
Contributor

luipir commented Oct 4, 2014

Tested with Arnaud, and discussed with Giovanni Manghi, I think it is a good compromise to avoid heavy refactoring of the logic of the QgsGeometry::XXXContainedInLine functions.

emit messageEmitted( tr( "An error occurs during the reshaping, capture has been cancelled" ), QgsMessageBar::WARNING );
return;
}

Copy link
Member

Choose a reason for hiding this comment

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

That exception has been addressed recently in 37f1a1 in a slightly better way (handling directly GEOS exception, not any exception). Also, at this point we should not add new translatable strings unless necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's necessary to release the capture, without this you have to close QGIS to get back the maptoolreshape to work correctly.

Copy link
Member

Choose a reason for hiding this comment

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

But with recent changes (see the referenced commit 37f1a1) this is already handled gracefully on a lower level (reshapeGeometry returns 1)

@wonder-sk
Copy link
Member

Applied @jef-n 's correction in 037138f

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

4 participants