GRASS GSoC 2026 Parallelizing r.proj and Raster Processing Modules in GRASS
| Student Name | Kaushik Raja |
| Organization | NumFOCUS |
| Mentor Name | Huidae Cho, Anna Petrasova, Vaclav Petras |
| GitHub Fork | View Repo |
| LinkedIn Profile | View LinkedIn |
Abstract
r.proj is one of the most commonly used modules in GRASS, reprojecting raster maps between coordinate systems. Despite running on modern multi-core hardware, it is entirely single-threaded, leaving most CPU cores idle and making large raster reprojections slower than necessary.
This project parallelizes r.proj using OpenMP. The main obstacles are GRASS's readcell tile cache, and the PROJ library. The readcell tile cache is not thread-safe and the PROJ library requires each thread to have its own context. The solution is a two-path memory architecture: a fast RAM buffer for maps that fit in memory, and a thread-local tile cache for larger maps. The project will also resolve issue #5776, which makes the progress reporting function G_percent unsafe in parallel code.
The same RAM preload pattern applies directly to r.param.scale, a terrain analysis module whose sequential sliding buffer currently prevents row-level parallelism. r.geomorphon will also be parallelized as a third module. Together, these changes establish a reusable parallelization framework for future GRASS contributors.
Project Scope
- Implement the two-path memory architecture for r.proj: RAM buffer for maps within the memory threshold, thread-local tile caches for larger maps
- Implement per-thread PJ_CONTEXT initialization for PROJ library thread safety
- Fix issue #5776: replace unsafe G_percent calls in parallel code with atomic counter and master-thread-only progress reporting
- Add a user-controlled memory threshold parameter
- Parallelize r.param.scale by replacing the sequential sliding buffer with a RAM preload pattern
- Parallelize r.geomorphon as a third module
- Write pixel parity regression tests and scalability benchmarks across multiple core counts
- Document all parallelized modules
Timeline
| Period | Timeline | Tasks | Status |
|---|---|---|---|
| Community Bonding Period | May 1 - May 25 |
|
|
| Official Coding Period | May 25 - June 8 |
|
|
| June 9 - June 22 |
|
||
| June 23 - July 6 |
|
||
| July 7 - July 11 |
|
||
| July 7 - July 20 |
|
||
| July 21 - August 3 |
|
||
| August 4 - August 11 |
|
||
| August 12 - August 18 |
|
||
| Final Week | August 19 - August 26 |
|