2

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:

ID GEOM DATE
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?

asked May 15, 2014 at 12:27
2
  • 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. Commented 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 Commented May 15, 2014 at 13:13

1 Answer 1

4

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.

answered May 15, 2014 at 13:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.