[gdal-dev] Sampling raster bands at irregular points
Joaquim Manuel Freire Luís
jluis at ualg.pt
Thu Dec 3 08:44:32 PST 2020
Another option is the GMT program grdtrack (https://docs.generic-mapping-tools.org/dev/grdtrack.html). It's pure C and extremely fast.
-----Original Message-----
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of Felix
Sent: Thursday, December 3, 2020 1:16 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Sampling raster bands at irregular points
Hello All,
I'm here for some suggestions on how to sample from a raster band at _non-regular_ points. Non-regular in this context means that the points have arbitrary coordinates and do not lie on a regular lattice/mesh like all pairs of integers would do.
In my application, there is an irregular set of points for which we require bathymetric data (i.e. topographical data/elevation). I started out by manually reading in the ETOPO1 dataset (for now, we might use
Earth2014 later) and then interpolating around each point sequentially.
As we have up to hundred-tousands of points and doing the computation sequentially in Python/numpy, this is currently running for days (well, we canceled it at that point).
Ideally, I'd like to use something like the "gdal_grid" tool, where the interpolation algorithm can be configured and the heavy-lifting is done in C rather than in Python. But it only supports creating a new _regular_ grid. The inverse distance interpolation with cutoff radii would be ideal.
Does such a tool/such functionality exist in in GDAL or was my search rightfully fruitless? I mainly searched in the raster programs, the
(C++) API of GDALRasterBand and of course generally in the internet.
Thank you for your suggestions, in advance!
Cheers and Stay Safe
Felix Divo
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list