geotips icon indicating copy to clipboard operation
geotips copied to clipboard

Compare `sf::gdal_utils()`, `terra` and `gdalraster`

Open atsyplenkov opened this issue 10 months ago • 4 comments

Hey @kadyb 👋

Are you accepting PRs? Would be interesting to see how the relatively new gdalraster performs in comparison with sf and terra. I can prepare a benchmark.

atsyplenkov avatar Feb 04 '25 02:02 atsyplenkov

Hey, thanks for the message. I have the benchmark repositories here with packages for vector and raster data processing, but I haven't updated it in a long time. We also had some discussions about the performance of gdalraster for loading rasters here.

What exactly would you be interested in?

kadyb avatar Feb 04 '25 13:02 kadyb

Thanks! I haven't seen those benchmarks before. I don’t have a specific function/tool in mind—I just started a new project and thought it would be a great opportunity to finally test gdalraster in action. Over the past couple of years, your geotips have been my go-to resource.

Therefore, I came here yesterday looking for a performance comparison and advice on which package is better to use.

atsyplenkov avatar Feb 04 '25 20:02 atsyplenkov

I also thought about comparing gdalraster in the context of rasters. Chris recently added initial support for vectors too. The most important difference between packages, e.g. terra and sf is they are high-level interfaces, while gdalraster is low-level, so it would require writing additional code. We would have to see what could be reasonably compared. In gdalraster, I don't think there are zonal statistics, raster cropping or pixel value extraction (but there is PR for that now).

kadyb avatar Feb 04 '25 20:02 kadyb

@atsyplenkov, the new version of GDAL includes many new tools (https://gdal.org/en/latest/programs/index.html#gdal-application), e.g. focal statistics, zonal statistics, raster cropping, raster algebra, so now it would be possible to compare different spatial packages and native implementations of algorithms in GDAL.

kadyb avatar Oct 23 '25 08:10 kadyb