Skip to content

fix: wrap coordinate transform in try/catch so we don't get random failures#139

Merged
suricactus merged 4 commits intomasterfrom
safe_transform
Mar 4, 2026
Merged

fix: wrap coordinate transform in try/catch so we don't get random failures#139
suricactus merged 4 commits intomasterfrom
safe_transform

Conversation

@suricactus
Copy link
Collaborator

@suricactus suricactus commented Mar 3, 2026

If the coordinate transform of a given bbox fails, just dump all data from that layer.

We are not aware of immediate conversion failing, but better be safe than sorry.

See #138 (comment) . Ping @nirvn

Base automatically changed from QF-7981-minioffliner_apply_filters to master March 3, 2026 12:23
@opengisch opengisch deleted a comment from duke-nyuki Mar 3, 2026
@suricactus suricactus requested a review from nirvn March 3, 2026 12:25
…ilures

If the coordinate transform of a given bbox fails, just dump all data from
that layer.
Copy link
Member

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

Nice.

Qgis,
QgsCoordinateReferenceSystem,
QgsCoordinateTransform,
QgsCsException, # type: ignore[import]
Copy link
Member

Choose a reason for hiding this comment

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

@suricactus , thanks :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you have any idea why the QgsCsException is not available in the python type definitions? But there is no problem importing it in the end.

@suricactus suricactus merged commit 3f466a1 into master Mar 4, 2026
7 checks passed
@suricactus suricactus deleted the safe_transform branch March 4, 2026 08:19
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.

2 participants