From: Travis B. <tra...@gm...> - 2020-08-14 23:03:03
|
Greetings all, I'm trying to get a CQL filter working which can filter out data that's older than X amount from the present, for example, only return data from less than 5 days ago. Following the docs regarding temporal predicates, I can get close: https://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#temporal-predicate I would like to have something like, "time during P5D / PRESENT" where PRESENT is the current date and time. The closest I can find on this is a GIS stack exchange question where someone is trying to do similar, but on that post there's no true answer, as it's said that PRESENT is purely a WMS filter, not available in CQL: https://gis.stackexchange.com/questions/314882/wfs-how-to-do-relative-dates This seems to be true trying it out. If I put today's date in manually, it works exactly as I want it to. However, I want to do it based on the present without a need to adjust the CQL filter. Is there any way of accomplishing this? Or a close workaround? One idea I'm pondering is if the results can be returned in descending order by date, and just having a feature limit, but that may not have date precision, just a vague "recently", which may not be ideal. Cheers, Travis |