Closed m-mohr closed 11 months ago
One related question that came up: How is filter_bbox handled if the CRS of the bbox is different from the data cube CRS? Do you reproject the bbox to the data cube CRS first to align? Otherwise, you may also get an outside area that you may need to null. I think we should clarify that, too. What do the implementation do? @clausmichele @soxofaan @dthiex
How is filter_bbox handled if the CRS of the bbox is different from the data cube CRS? Do you reproject the bbox to the data cube CRS first to align? Otherwise, you may also get an outside area that you may need to null.
Yes we reproject (e.g. typically from lon-lat to UTM) and I should double check the implementation details, but I think the intent is to use the tightest bbox in target CRS (e.g. UTM) that covers the specified bbox (e.g. in lon-lat). So indeed, you might get more pixels outside of the original bbox, but I don't think that is a problem in most use cases. And if it is a problem you should use explicit masking (e.g. with mask_polygon or filter_spatial) anyway.
We also reproject the bbox first to match the data projection, here is the implementation: https://github.com/Open-EO/openeo-processes-dask/blob/597d1005a91bb36823d191cb14507f5a1ee716f1/openeo_processes_dask/process_implementations/cubes/_filter.py#L105
Thanks, I've added a clarifying remark to filter_bbox in this PR.
Fixes #469