Dear OpenEO forum,
I am struggling to get my datacube sampled on my target sampling grid, e. g. something defined by a CRS, the coordinate of the upper-left pixel (either center or upper-left corner of this pixel), spacing between pixels and number of pixels in both direction.
According to the documentation, resample_cube_spatial(*target*, *method='near'* )
can do that but I would need to create a dummy datacube with the correct sampling grid to be used as the target
parameter.
On the other end, resample_spatial(*resolution*, *projection=None*, *method='near'*, *align='upper-left'* )
allows to resample to another spatial resolution but gives no control over the sampling grid, which I believe is computed from the input datacube.
This is a very important capability when working with two different sensors. I am currently working with Sentinel-2 (10m) and Landsat series (30m), and I do not want OpenEO to resample everything to 10m (which I can do with resample_spatial
). I want both series to retain their native resolution, but I want them sampled so that they footprints match exactly, meaning that the upper-left corner of their upper-left pixels and lower right corner of their lower-right pixels align. I can only do that by resampling both of them to user defined phased sampling grid, hence this question.
What I would need is an extended version of the resample_spatial
method:
resample_spatial(upper_left_pixel_center_coords, resolution, grid_size, projection=None, method=‘near’)
Where:
upper_left_pixel_center_coords
is the coordinates of the center of the upper-left pixelgrid_size
is the number of pixels in each spatial dimension
If the backend relies on Gdal, I am pretty sure this is only a matter of extending the API.
Many thanks for your help,
Regards,
Julien