Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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. – Craig Ringer May 15 '14 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 – iant May 15 '14 at 13:13
up vote 4 down vote accepted

In GeoServer you can specify a start and an end date column, see the documentation at

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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