Hi Javier

I regularly use PROJ for that. It’s a bit of a hack but it works. Here’s a 
demonstration using the DVR90_2023 geoid. The lower left grid point is at 
(7,53.5) and the horizontal grid spacing is 0.1 degree. Below I first get the 
actual grid values at two adjacent grid points and then lastly interpolate the 
grid value in between those two points:

echo 7 53.5  | cct -t0 -z0  +proj=vgridshift +grids=dk_sdfi_dvr90_2023.tif 
+multiplier=1
  7.0000000000   53.5000000000       40.2720        0.0000

(fire-dev) C:\Temp\fire\obs-beregning>echo 7 53.51  | cct -t0 -z0  
+proj=vgridshift +grids=dk_sdfi_dvr90_2023.tif +multiplier=1
  7.0000000000   53.5100000000       40.2590        0.0000

(fire-dev) C:\Temp\fire\obs-beregning>echo 7 53.505  | cct -t0 -z0  
+proj=vgridshift +grids=dk_sdfi_dvr90_2023.tif +multiplier=1
  7.0000000000   53.5050000000       40.2655        0.0000

The grid values are obviously the third component of the output coordinates.

/Kristian


From: gdal-dev <gdal-dev-boun...@lists.osgeo.org> On Behalf Of Javier Jimenez 
Shaw via gdal-dev
Sent: 24. april 2024 10:33
To: gdal dev <gdal-dev@lists.osgeo.org>
Subject: [gdal-dev] Reading interpolated values on DSM

Hi

I would like to read in QGIS or GDAL an interpolated value in a DSM (well, 
actually it is a geoid model, but it is the same behaviour). See that I do not 
want the pixel value, but the linear interpolation among the neighbour pixels, 
assuming that the pixel value is in the center of the pixel.
For instance, this file
https://www.isgeoid.polimi.it/Geoid/Asia/Japan/japan2000_g.html

Is there any way to get it (without implementing the interpolation myself)?
If I understood correctly gdallocationinfo is not interpolating, just giving 
the pixel value.

Thanks

.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to