[gdal-dev] gdalwarp: question about methods implemented when source grid is denser than target.
Even Rouault
even.rouault at spatialys.com
Thu May 25 12:51:16 PDT 2023
Hi,
to briefly answer your question, for the methods bilinear, cubic,
cubicspline and lanczos who have nominal kernel radius of respective
values 1, 2, 2 and 3 (and thus a diameter double that size), the radius
is extended by a factor source_size / dest_size to take into account the
downsampling ( Cf lines 1188-1195 in alg/gdalwarpkernel.cpp), and the
weights of the resampling kernel are evaluated with a scale factor too
(cf lines 3713-3715 / 3741-3743)
Even
Le 24/05/2023 à 16:29, Ramiro Espada Guerrero a écrit :
> Hi,
>
> I would like to know if gdalwarp does any "average" regriding when the
> source grid is denser than the target grid regardless of the chosen
> method for the interpolation. And if there is any document where I can
> follow exactly the calculations. I tried to follow the code on github
> but it is pretty difficult to follow.
>
> I've programmed my own bilinear interpolation function in fortran and
> I got smoother results when I applied -r bilinear with gdalwarp. So i
> wonder if there is a pre-average regriding subroutine that is not in
> the documentation page.
>
> Thanks!
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the gdal-dev
mailing list