Using GeoServer I want to deliver some objects/features with WFS and WMS. The objects and their attributes have a date range during which they are valid. Say, we have street lamps and each street lamp has an ID, POINT (geom), start_date, end_date.

The WMS and WFS request can use the time parameter to filter the resulting objects (see WFS GetFeature with time, WMS GetMap with time). Using the time filter, only the street lamps that a within start_date and end_date would be returned by GeoServer .

However, I now saw that for time the respective time column must be stored with a date type. That is, in geoserver one cannot configure start or end date columns for a WMS or WFS layer. It is only possible to configure a single date column (same for MapServer).

What's the best way to store my street lamps in PostgreSQL/PostGIS? For a lamp that was created on Jan 01, 2014 and destroyed on Jan 20, 2014 would I need to have 20 data sets in my database:

01 xy   2014-01-01
01 xy   2014-01-02
01 xy   2014-01-19
01 xy   2014-01-20

Is there a way to store date ranges in PostgreSQL/PostGIS that can be used by GeoServer? Or is this impossible?

  • Wow, that's ridiculous - surely there must be a way to specify a range. Ideally for this you'd use PostgreSQL's tsrange data type, but just a pair of timestamps would be quite sufficient in a pinch. May 15, 2014 at 12:31
  • It's possible that this isn't yet supported - feel free to contribute code that does implement it. - It is unlikely to be possible to use a tsrange as GeoServer (and GeoTools) have to function over a lot of datastores
    – Ian Turton
    May 15, 2014 at 13:13

1 Answer 1


In GeoServer you can specify a start and an end date column, see the documentation at http://docs.geoserver.org/latest/en/user/webadmin/data/layers.html#edit-dimensions.

All you need is two date columns i.e. two columns with date datatype in your database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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