Commit 4800ae7
Fix inverted resolution check in _line_to_pnts
The warning meant to flag under-resolved line exposures in
`climada.util.lines_polys_handler._line_to_pnts` used an inverted
comparison: it counted lines *longer* than `10 * resolution` while its
comment and message describe lines *shorter* than that. As a result,
genuinely under-resolved lines (which collapse to too few points and
overestimate the re-aggregated impact) were skipped silently, while
well-resolved long lines produced a spurious, self-contradicting warning.
Flip the comparison to `< 10 * res`, correct the message wording and
typos, and update `test_resolution_warning` accordingly.
Fixes #1302
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 222a6e5 commit 4800ae7
3 files changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
| 960 | + | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
965 | | - | |
966 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
967 | 968 | | |
968 | 969 | | |
969 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
1100 | 1102 | | |
1101 | 1103 | | |
1102 | 1104 | | |
| |||
1109 | 1111 | | |
1110 | 1112 | | |
1111 | 1113 | | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1116 | 1119 | | |
1117 | 1120 | | |
1118 | 1121 | | |
| |||
0 commit comments