Skip to content

Commit 897c7b9

Browse files
committed
Replace coordinate-only benchmarks with end-to-end reproject/merge tables (#1045)
README now shows full pipeline times (transform + resampling) and merge times, both compared against rioxarray. More useful than the previous coordinate-transform-only table since users care about total wall time.
1 parent c535ef2 commit 897c7b9

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@ write_vrt('mosaic.vrt', ['tile1.tif', 'tile2.tif']) # generate VRT
215215
| [Reproject](xrspatial/reproject/__init__.py) | Reprojects a raster to a new CRS with Numba JIT / CUDA coordinate transforms and resampling | Standard (inverse mapping) | ✅️ | ✅️ | ✅️ | ✅️ |
216216
| [Merge](xrspatial/reproject/__init__.py) | Merges multiple rasters into a single mosaic with configurable overlap strategy | Standard (mosaic) | ✅️ | ✅️ | 🔄 | 🔄 |
217217

218-
Built-in Numba JIT and CUDA projection kernels bypass pyproj for common CRS pairs:
218+
Built-in Numba JIT and CUDA projection kernels bypass pyproj for common CRS pairs. Other CRS pairs fall back to pyproj automatically.
219219

220220
| Projection | EPSG examples | CPU Numba | CUDA GPU |
221221
|:-----------|:-------------|:---------:|:--------:|
222222
| Web Mercator | 3857 | ✅️ | ✅️ |
223-
| UTM (Transverse Mercator, Krueger 6th-order) | 326xx, 327xx, 269xx | ✅️ | ✅️ |
223+
| UTM / Transverse Mercator | 326xx, 327xx, State Plane | ✅️ | ✅️ |
224224
| Ellipsoidal Mercator | 3395 | ✅️ | ✅️ |
225225
| Lambert Conformal Conic | 2154, State Plane | ✅️ | ✅️ |
226226
| Albers Equal Area | 5070 | ✅️ | ✅️ |
@@ -229,28 +229,28 @@ Built-in Numba JIT and CUDA projection kernels bypass pyproj for common CRS pair
229229
| Lambert Azimuthal Equal Area | 3035, 6931, 6932 | ✅️ | ✅️ |
230230
| Polar Stereographic | 3031, 3413, 3996 | ✅️ | ✅️ |
231231

232-
Other CRS pairs fall back to pyproj automatically.
232+
**Reproject performance** (end-to-end, bilinear, vs rioxarray):
233233

234-
**Coordinate transform performance** (4096x4096 = 16.8M pixels, A6000 GPU):
234+
| Transform | 1024x1024 | | 4096x4096 | |
235+
|:---|---:|---:|---:|---:|
236+
| | xrspatial | rioxarray | xrspatial | rioxarray |
237+
| WGS84 -> UTM 33N | 33ms | 72ms (2.2x) | 627ms | 1.09s (1.7x) |
238+
| WGS84 -> Web Mercator | 16ms | 44ms (2.9x) | 526ms | 741ms (1.4x) |
239+
| WGS84 -> Albers CONUS | 72ms | 196ms (2.7x) | 649ms | 1.78s (2.7x) |
240+
| WGS84 -> LAEA Europe | 47ms | 74ms (1.6x) | 677ms | 1.03s (1.5x) |
241+
| WGS84 -> Polar Stere S | 34ms | 580ms (17x) | 839ms | 9.13s (11x) |
235242

236-
| Projection | Numba CPU | CUDA GPU | pyproj |
243+
Times include coordinate transform + bilinear resampling. Speedup in parentheses is rioxarray/xrspatial. The Polar Stereographic advantage comes from rioxarray computing a much larger output grid for the same input extent.
244+
245+
**Merge performance** (4 overlapping same-CRS tiles, vs rioxarray):
246+
247+
| Tile size | xrspatial | rioxarray | Speedup |
237248
|:---|---:|---:|---:|
238-
| Web Mercator | 148ms (6x) | 6ms (146x) | 858ms |
239-
| UTM zone 33N | 221ms (8x) | 21ms (84x) | 1.78s |
240-
| Ell. Mercator | 273ms (10x) | 26ms (102x) | 2.64s |
241-
| LCC France | 329ms (9x) | 39ms (78x) | 3.02s |
242-
| Albers CONUS | 172ms (7x) | 14ms (92x) | 1.25s |
243-
| CEA EASE-Grid | 146ms (6x) | 43ms (19x) | 839ms |
244-
| Sinusoidal (MODIS) | 191ms (5x) | 18ms (56x) | 1.01s |
245-
| LAEA Europe | 196ms (8x) | 18ms (92x) | 1.65s |
246-
| Polar Stere Antarctic | 376ms (10x) | 57ms (64x) | 3.63s |
247-
| Polar Stere Arctic | 354ms (11x) | 57ms (67x) | 3.84s |
248-
| State Plane ME (tmerc) | 223ms (9x) | 23ms (88x) | 2.03s |
249-
| State Plane CA (lcc, ftUS) | 426ms (11x) | 36ms (124x) | 4.47s |
250-
251-
Speedups in parentheses are relative to pyproj. The Numba kernels port the PROJ C math (Krueger 6th-order series for Transverse Mercator, Newton iteration for LCC/Mercator inverse, authalic latitude Fourier series for equal-area projections) to `@njit(parallel=True)`. CUDA kernels use `@cuda.jit(device=True)` for the same per-pixel math.
252-
253-
These times measure the coordinate transform alone. Total `reproject()` time also includes resampling (bilinear/cubic interpolation), which adds roughly the same amount again. CRS pairs not in the table go through pyproj automatically with no accuracy or functionality loss.
249+
| 512x512 | 11ms | 50ms | **4.5x** |
250+
| 1024x1024 | 82ms | 125ms | **1.5x** |
251+
| 2048x2048 | 347ms | 604ms | **1.7x** |
252+
253+
Same-CRS tiles skip reprojection entirely and are placed by direct coordinate alignment.
254254

255255
-------
256256

0 commit comments

Comments
 (0)