Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_spatial: clarify behaviour #469

Closed
clausmichele opened this issue Oct 12, 2023 · 6 comments · Fixed by #470
Closed

filter_spatial: clarify behaviour #469

clausmichele opened this issue Oct 12, 2023 · 6 comments · Fixed by #470
Assignees
Milestone

Comments

@clausmichele
Copy link
Member

clausmichele commented Oct 12, 2023

The filter_spatial process definition https://processes.openeo.org/#filter_spatial is not clear, since it mentions keeping only the pixels intersected by the geometry and later, under the geometries parameter, mentions that no masking is applied.

We need to decide what's the expected output.
Is it only a filter_bbox process that automatically extracts the AOI from the bounds of the geometries?
Is it the same as mask_polygon?

@jdries said that on their side masking is applied, code here: Open-EO/openeo-geopyspark-driver@4e3ef04

We are waiting for a clarification to proceed with this PR: Open-EO/openeo-processes-dask#170

Tagging some other people for opinions:
@ValentinaHutter @dthiex @soxofaan @SerRichard

@m-mohr
Copy link
Member

m-mohr commented Oct 12, 2023

I just looked at the git history and it's relatively clear that masking should be applied. The confusing part was added with the datacube changes, i.e. only in 2.0.0 rc1 and thus we should clean that up again to align with the 1.x defintion.

@m-mohr
Copy link
Member

m-mohr commented Oct 12, 2023

PR is here: #470

@m-mohr m-mohr added this to the 2.0.0 milestone Oct 12, 2023
@soxofaan
Copy link
Member

Indeed I found this discussion where it is clear that intent is to have masking included:
#131 (comment)

@clausmichele
Copy link
Member Author

clausmichele commented Oct 13, 2023

So the main difference with mask_polygon is that filter_spatial may reduce the spatial dimensions and mask_polygon not?

@masawdah At the implementation side I think that filter_spatial becomes filter_bbox + mask_polygon internally.

@soxofaan
Copy link
Member

So the main difference with mask_polygon is that filter_spatial may reduce the spatial dimensions extent and mask_polygon not?

Indeed.
And note that in the VITO backend implementation we even infer the spatial extent from mask_polygon if no other spatial extent filtering is present in the process graph.

@m-mohr
Copy link
Member

m-mohr commented Oct 13, 2023

Yes, and that mask_polygon has additional options, of course.

@m-mohr m-mohr linked a pull request Oct 26, 2023 that will close this issue
m-mohr added a commit that referenced this issue Oct 27, 2023
* `filter_spatial`: Clarified that a masking get applied for the given geometries. #469
* `filter_bbox`: Clarified that the bounding box is reprojected to the CRS of the spatial data cube dimensions if required.

---------

Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
@m-mohr m-mohr closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants