Closed luukvdmeer closed 1 year ago
Thanks @luukvdmeer for the initiative, we should continue investigating spatial analysis options and it's good to push it further. Just for clarification for me:
I would be happy to contribute to answer follow-up questions, e.g.
entity
and instance
for this purpose)?touches
in this context?The geopandas object is an area provided by the user, and should be a subset of the total AOI. In this way, it can be used to spatially filter pixels for a certain result, just as you can temporally filter pixels e.g. by keeping only those inside a certain year or month within the overall time span.
The intersects operators is implemented already (it uses the centroid of each pixel, i.e. pixels are filtered out if their centroid does not intersect with the provided area). For now I don't think it is needed to add more, lets first see if this feature is useful at all. Also note that this functionality is not "ported" to the Sen2Cube frontend, since we don't have a block to define spatial polygons.
Description
In the current version we have already specific temporal relational operators (during, after and before) next to the regular relational operators (equal, greater, less, ..). These are meant for usage on arrays that have timestamps as their pixel values. Such arrays are obtained when extracting the time dimension coordinates from a spatio-temporal array. They are mainly useful when applying temporal filters.
Following the same idea, there should also be specific spatial relational operators that can be used on arrays that have x,y coordinate tuples as their pixel values. Such arrays are obtained when extracting the space dimension from a spatio-temporal array. They will mainly be useful when applying spatial filters.
The right-hand side in such a spatial relational expression would then be an object of class
SpatialExtent
which during query recipe construction can be referenced by e.g.sq.geometry()
(just likesq.time_instant()
andsq.time_interval()
can already be used to referenceTemporalExtent
objects).Spatial relational operators include:
An instruction using such expression could look like:
Additional context
See here