Skip to content

Pdok 18835/vervanging trex v2 exit without geoms - #49

Merged
DvBree merged 2 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-exit-without-geoms
Sep 18, 2026
Merged

DvBree merged 2 commits into
PDOK-18835/vervanging-trex-v2-vertegelingfrom
PDOK-18835/vervanging-trex-v2-exit-without-geoms

Conversation

@DvBree

@DvBree DvBree commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix: there was undesireable behaviour when a geometry disappears after snapping (e.g., because it degenerates to points and lines). In this PR we replicate the behaviour from the current master version of texel in the vervanging-trex feature branch.

Example; if g is such a geometry, then the current feature branch behaviour (incorrect) is roughly to set newGeometries[zoomLevel] = nil. The fixed behaviour is to leave newGeometries[zoomLevel] to be unset.

Aside from undesirable behaviour, this did cause the program to crash when using BBox for tile detection, since it would try to encode a nil geometry. This is a side effect of the fact that BBox does not discount degenerate parts of the polygon. Whether this is desirable is another issue.

Type of change

  • Bugfix

Checklist:

  • I've double-checked the code in this PR myself
  • I've left the code better than before (boy scout rule)
  • The code is readable, comments are added that explain hard or non-obvious parts.
  • I've expanded/improved the (unit) tests, when applicable
  • I've run (unit) tests that prove my solution works
  • There's no sensitive information like credentials in my PR

@DvBree
DvBree merged commit 427c0ef into PDOK-18835/vervanging-trex-v2-vertegeling Sep 18, 2026
2 checks passed
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.

3 participants