Commit 9a79981
committed
Add longitude normalization to CUDA inverse projection kernels (#1088)
Six CUDA inverse projection kernels returned raw `lam + lon0` without
wrapping to [-pi, pi]. The CPU Numba kernels all pass through
`_norm_lon_rad()` before converting to degrees. Without normalization,
coordinates far from the central meridian (e.g., near the antimeridian)
can produce longitude values outside [-180, 180].
Added `_d_norm_lon_rad` device function and applied it to:
- LCC inverse (2 return paths)
- AEA inverse
- CEA inverse
- Sinusoidal inverse
- LAEA inverse
- Polar Stereographic inverse
Also removed dead code in `_tmerc_params()` where a loop computed
a value that was immediately overwritten.1 parent 443ed78 commit 9a79981
File tree
3 files changed
+74
-16
lines changed- xrspatial
- reproject
- tests
3 files changed
+74
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
1742 | | - | |
| 1742 | + | |
| 1743 | + | |
1743 | 1744 | | |
1744 | 1745 | | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
1752 | | - | |
| 1746 | + | |
| 1747 | + | |
1753 | 1748 | | |
1754 | 1749 | | |
1755 | 1750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
291 | 300 | | |
292 | 301 | | |
293 | 302 | | |
294 | | - | |
| 303 | + | |
295 | 304 | | |
296 | 305 | | |
297 | 306 | | |
298 | | - | |
| 307 | + | |
299 | 308 | | |
300 | 309 | | |
301 | 310 | | |
| |||
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
358 | | - | |
| 367 | + | |
359 | 368 | | |
360 | 369 | | |
361 | 370 | | |
| |||
404 | 413 | | |
405 | 414 | | |
406 | 415 | | |
407 | | - | |
| 416 | + | |
408 | 417 | | |
409 | 418 | | |
410 | 419 | | |
| |||
476 | 485 | | |
477 | 486 | | |
478 | 487 | | |
479 | | - | |
| 488 | + | |
480 | 489 | | |
481 | 490 | | |
482 | 491 | | |
| |||
594 | 603 | | |
595 | 604 | | |
596 | 605 | | |
597 | | - | |
| 606 | + | |
598 | 607 | | |
599 | 608 | | |
600 | 609 | | |
| |||
670 | 679 | | |
671 | 680 | | |
672 | 681 | | |
673 | | - | |
| 682 | + | |
674 | 683 | | |
675 | 684 | | |
676 | 685 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1315 | 1315 | | |
1316 | 1316 | | |
1317 | 1317 | | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1318 | 1372 | | |
1319 | 1373 | | |
1320 | 1374 | | |
| |||
0 commit comments