I have WMS layer from PostGIS data source with two temporal attributes (start and end attribute). I want to get by default (without adding any temporal filters) the latest data. Because of that I chose option for default value "Use biggest domain value". But I'm always getting two records. Because one feature has start_time = T1, End_time = T2, and other has start_time = T2 and end_time T3 (where T1 < T2 < T3).

With option "biggest domain value" I get two records because (if I understood correctly) this option returns biggest domain value for start and end time. If I include temporal filter time=T2 I get only feature 2. With biggest domain value I get both feature 1 and 2.

Then, I tried to use "Use the domain value nearest to the reference value". Reference value is MAX(start_time). I also tried to set reference value as MAX(end_time). But, again I get two values.

If I set temporal filter like this: &time=T2-1/T2+1 then I get also two features because filter is being compared to both start and end time. If I set temporal filter as &time=T3/T3+1, then I get only the latest feature.

Question: 1. When specifying filter for time dimension, this is compared to both time attributes. Is there a way to get (by default, without specifying temporal filter) only newest data by start_time attribute?

enter image description here

  • Please ask one question per Question, as per the Tour.
    – Vince
    Jan 13, 2019 at 12:49
  • These are two related sub-questions. Main question is Is there a way to get (by default, without specifying temporal filter) only newest data by start_time attribute? The first one is just request for confirmation of my thinking. Jan 14, 2019 at 8:00

1 Answer 1


After testing various options I resolved my problem. If start and end time of dimension are set then specifying time filter returns all features which satisfy that criterion on both dimensions (start and end). That is how Geoserver behaves. In order to filter features only by start time I added also CQL_FILTER (e.g. (&TIME=T1&CQL_FILTER=start_time=T1)).

If I would use only CQL filter (without TIME filter) for a layer where time dimension is enabled, I would get nothing since GeoServer would return only one slice of time dimension (either oldest, newest,... depending on how layer time dimension is set). So both, time and CQL filter have to be specified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.