Commit 6fc8a2e
🐛 Fix Invalid Geometry in JSON Outputs (#1057)
- Replace direct `Polygon` construction with validated geometry via `feature2geometry` and `make_valid_poly`.
- Ensure all shapes are repaired and valid before JSON export.
- Prevents malformed or invalid polygons from breaking QuPath JSON outputs.
---------
Co-authored-by: Jiaqi Lv <lvjiaqi9@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 36ecfa6 commit 6fc8a2e
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
| |||
3535 | 3534 | | |
3536 | 3535 | | |
3537 | 3536 | | |
3538 | | - | |
3539 | | - | |
3540 | | - | |
3541 | | - | |
3542 | | - | |
3543 | | - | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
3544 | 3547 | | |
3545 | 3548 | | |
3546 | 3549 | | |
| |||
3584 | 3587 | | |
3585 | 3588 | | |
3586 | 3589 | | |
3587 | | - | |
| 3590 | + | |
3588 | 3591 | | |
3589 | 3592 | | |
3590 | 3593 | | |
| |||
0 commit comments