rs_clip(raster,polygon) get points offset and points missing
spark3.2.2+sedona1.7.2
raster fully covers the polygon
rs_clip(raster,polygon) to generate a clipped raster then save as a geotiff
If we treat the polygon as static , the clipped raster looks like moving letf one pixel and moving up one pixel , and some pixels are not nodata missing on the raster.
如果我们把polygon看作静止的,剪裁出来的tiff,放在global mapper看,像是向左、向上偏移了各一个像素,并且某些像素不是nodata的,被移除了
Does this relate to this ticket? https://github.com/apache/sedona/pull/2065
I can confirrm that I observed the same when investigating my issue https://github.com/apache/sedona/issues/1944
The clipped raster was indeed shifted and had missing pixels despite them having non null values in the original raster.
I did not mention this RS_Clip weird behavior though (I was focussing on RS_ZonalStats) so you would need to verify that your fix in https://github.com/apache/sedona/pull/2065 does fix that.
I am happy to provide my code if this helps.