Open cchwala opened 5 months ago
This need to be discussed again. One can also argue that nnear = 9
anyway does not take the 8 surrounding pixels in all cases even if a equidistant projected grid is used.
Hence, it might maybe be better to correctly implement using the "9er field" with the matching pixel plus the 8 surrounding ones, which should work the same in lon-lat and projected coordinates.
The implementation for
GridAtPoints
that I will merge soon via #41 will uselon
andlat
, because I have no time to change that now. Ifnnear > 1
the nearest-neighbor-lookup will not be correct because of distorted distances in lon-lat-space.Hence, we need to either reproject on the fly or force the usage of projected coordinates and not
lon
and 'lat`.A related discussion happened already in https://github.com/OpenSenseAction/poligrain/issues/15#issuecomment-1908078372 and in https://github.com/OpenSenseAction/poligrain/pull/43#issuecomment-2039598286.