-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to do the difference between two times? #191
Comments
I think this would call for subsetting functions/operators. Something like:
where the first parameter is the field, the second the list of dimensions to slice on, and the last parameter the values. We could have a similar Trim() function taking a low and high set of values.
|
We will test the following syntax"es" in ODC and get back properties=b01 Perform((b8 - b4)/(b8 + b4), Slice(thing, time, 2017) - Slice(thing, time, 2012)) --> |
In fact, a mixed syntax should also work: The "First" date is imposed by time("2018-04-28"). The "Second" date is overwritten by the slice function with ['time'],['2018-04-18'] We can also think if there is a need to overwrite the filter adding a 4th parameter to slice: Slice('(B08_10m-B04_10m)/(B08_10m%2BB04_10m)',['time'],['2018-04-18'],'(SCL_20m=4) or (SCL_20m=5) or (SCL_20m=6)') The use of quotes is questionable but it is very practical in the python implementation. |
Yes, I do question it very strongly ;) I really don't think there should be quotes there. Ideally there would be a way for your Python implementation to do exactly what it's doing right now with the expression losing those quotes.
I would not mix the concept of |
Ok, I spend some time creating a python function that adds internally the quotes, in preparation for the internal evaluation of the expression, making the quotes in the OGC API coverage URL unnecessary. BTW, I have made my development public, even if it is not finalized, so you can still find some "dirty tricks" in it. |
I have a coverage that has connectivity maps for several years as a time series. Last is 2017 but this are also available for 1987, 1992, 1997, 2002, 2007 and 2012. With properties+filters we can do alot using mathematics among bands but, I do not see the way I can do one of the most common things in GIS: calculate the change between two time instances (a difference operation). Can we express this somehow? properties=Forest(time=2017)-Forest(time=2012)?
The text was updated successfully, but these errors were encountered: