On lundi 25 mai 2020 18:00:35 CEST Cédric Traizet wrote: > Thanks for your answer, In addition to the extraction of values from the > DEM raster, these functions implement the interpolation of the DEM > height on any point. Is there any chance to have this kind of function > in the public API someday ? In my project I want to use the GDAL RPC > algorithms, but I also need to use DEM in other processings, so I wanted > to know if there was a way to reuse these DEM routines. Anyway, it > shouldn't be too hard to re-implement the DEM interpolation in my code.$
I see your point now. You can probably accomplish what you want by using the GDALRasterIOExtraArg argument of the RasterIO function, by setting bFloatingPointWindowValidity to TRUE and setting dfXOff, dfYOff, dfXSize, dfYSize You'll likely have to play with half-pixel shift. If you want an interpolated value at (X_georef, Y_georef), dfXOff = (X_georef - gt[0]) / gt[1] - 0.5 dfYOff = (Y_georef - gt[3]) / gt[5] - 0.5 dfXSize = dfYSize = 1 (untested) Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
