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 <[email protected]> On Behalf Of Felix Sent: Thursday, December 3, 2020 1:16 PM To: [email protected] 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 [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
