[mapserver-users] WMS Time layer from geojson

Jesper Kempe jesper.kempe at gmail.com
Thu Feb 11 00:40:47 PST 2021


Hi

I am trying to get WMS time to work for a vector layer from GeoJSON-data.
The data has a property start that is a DateTime that I want to filter the
items in the geojson based on TIME in the WMS query.

Ogrinfo shows:
OGRFeature(debug_wmstime):0
  level (String) = high
  start (DateTime) = 2021/02/09 14:00:00+00
  POLYGON ((10.87646484375 61.7627288304727,10.9423828125
60.0758034247597,17.73193359375 60.1633760564878,17.7978515625
61.7835133871372,10.87646484375 61.7627288304727))

But no matter how I configure the mapfile I can´t get it to work.
As soon as I add
 "wms_timeitem" "start"
to Layer METADATA the image goes blank.
And the debug logfile gives no errors.

I can get ogrinfo to filter the data in the geojson with:
ogrinfo -where "start='2021-02-09T14:00:00Z'" debug_wmstime.geojson
debug_wmstime

But not get Mapserver to work with TIME=2021-02-09T14:00:00Z in a
WMS-request.


Attached is the geojson file and a simple mapfile I have used for testing.

A wms query like this is what I am testing:
/debug_wmstime.map?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&STYLES&LAYERS=time_debug&SRS=EPSG%3A4326&WIDTH=200&HEIGHT=464&BBOX=10,47,18,62&TIME=2021-02-09T14:00:00Z

The expected result is to to only see a yellow square at the top of the
image. The other features in the geojson should not be visible with this
TIME.


Does anyone have a clue what I might be doing wrong?
Cause it should be possible to do this right?

Any help is appreciated!
Jesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210211/556edc67/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_wmstime.geojson
Type: application/octet-stream
Size: 3198 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210211/556edc67/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_wmstime.map
Type: application/octet-stream
Size: 1312 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210211/556edc67/attachment-0001.obj>


More information about the mapserver-users mailing list