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

QgsRectangle isEmpty documentation doesn't match implementation #45563

Closed
2 tasks
strk opened this issue Oct 19, 2021 · 1 comment
Closed
2 tasks

QgsRectangle isEmpty documentation doesn't match implementation #45563

strk opened this issue Oct 19, 2021 · 1 comment
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@strk
Copy link
Contributor

strk commented Oct 19, 2021

What is the bug or the crash?

According to method documentation for QgsRectangle class "An empty rectangle may still be non-null if it contains valid information (e.g. bounding box of a point)" but the bounding box of POINT(0 0) is found to be also Null

Steps to reproduce the issue

QgsRectangle r1( 0, 0, 0, 0 );
QVERIFY( ! r1.isNull() ); // fails
QVERIFY( r1.isEmpty() );

Versions

master

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@strk strk added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 19, 2021
@strk
Copy link
Contributor Author

strk commented Feb 16, 2022

PR aimed at fixing this bug is #47404

@strk strk self-assigned this Feb 16, 2022
strk added a commit to strk/QGIS that referenced this issue Oct 14, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 16, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 17, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 17, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 18, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 19, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 20, 2023
Make sure a Null rectangle is always also considered Empty.
Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Closes qgisGH-45563
strk added a commit to strk/QGIS that referenced this issue Oct 22, 2023
Construct a proper null rectangle by default.

Make sure a Null rectangle is always also considered Empty.

Print Null rectangle as Null, still print details of Empty rectangles.
Update expected QgsRectangle::toString output on Null rectangle

Includes unit tests

Closes qgisGH-45563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant