[MapServer-users] OGC API Features does not respond to datetime parameter - howto setup mapfile
Luuk S
luuk.schaminee at gmail.com
Mon Oct 26 01:02:03 PDT 2026
Hi,
I have a dataset with a date field which I would like to use as the field
for the datetime parameter in an OGC API Feature service. This field only
contains dates, no time (e.g. 2002-06-01). I tried several settings in the
map-file but I did not manage to get data from the OGC API Features service
with a datetime, I keep getting the complete dataset, so it looks like the
parameter doesn’t do anything.
The swagger UI from Mapserver generates the following url:
http://localhost/cgi-bin/mapserv.exe/local-demo/ogcapi/collections/lake_abiyata/items?f=json&datetime=2002-06-01&offset=0&additionalProp1=%7B%7D&filter-lang=cql2-text&limit=10
And the result is 10 records instead of 1.
How do I have to set up a layer in my map file so it can output data from
my dataset with the datetime parameter and only get the records for the
given date or date range?
I have the following settings in my map-file:
"ows_timeextent" "1940-01-01/2002-06-01"
"ows_timeitem" "datum"
"ows_timedefault" "1940-01-01"
"ows_timeformat" "YYYY-MM-DD"
I also tried using oga_* instead of ows_* but this did not help either.
Thanks.
Luuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20261026/355184d0/attachment.htm>
More information about the MapServer-users
mailing list