Hi @kvlachos.geo,
Parameter interpolate_pixel_wise
actually originates from a technical problem that Python doesn’t have the best support to implement an interpolation on a large number of pixel time series that would work fast.
If interpolate_pixel_wise
is set to True
this will use a Python for
loop to iterate over spatial dimensions and interpolate values for each pixel over the temporal dimension. Because of that the process will be very slow.
If interpolate_pixel_wise
is set to False
then we use a trick that we stack pixel time series one after another in a 1D array and interpolate all of them at once. This runs much faster but there is a very small side effect that each pair of neighboring time series have on each other.
It turns out that for LinearInterpolation
task we don’t have to do that. Instead we can loop over pixel time series as if interpolate_pixel_wise=True
and use numba
to speed up the computation. That gives us the best result and the fastest time performance. Unfortunately, the same is not possible for other types of interpolations.
So to sum up:
- For
LinearInterpolation
parameter interpolate_pixel_wise
has no effect whatsoever.
- For most of the other interpolation tasks
interpolate_pixel_wise
can be used to choose between computation performance and accuracy of results.
@maleksandrov
Hi Matej, thank you so much for you detailed explanation.
So, any interpolation approach implemented in eolearn
is a per-pixel temporal interpolation, so to say. Is that right? Which means that there are no spatial (per-image) or spatiotemporal interpolation approaches implemented.
Thanks in advance,
Kostas
@maleksandrov Hi there, I second Kostas’ question: Are there any spatial interpolation built-in methods right now?