[mapserver-users] wms_timeextent from time elements in postgres in mapserver map file

Trygve Aspenes trygve at aspenes.priv.no
Wed Jan 19 22:26:26 PST 2022


Thanks again Dave

Yeah, that's what I did. But the client I'm using is actually using this 
so the client makes the data "available" into the future which is quite 
annoying for the user. So I have to come up with a better solution.

So a dirty fix I came up with is to make a template map file with 
environment variable name for the time extent (updated by some script) 
and then generate the map file using envsubst (from gettext package). 
(Maybe jinja2 also could be used, I have to think about it)

This works, but it does not feel like an elegant solution.

But I think I will go for this if no better solution comes up.

Trygve

Den 2022-01-19 22:41, skrev David Hoese:
> Possibly unhelpful, but since you haven't gotten a response from
> anyone else: I just have mine set to the first available time and a
> time in the year 2040. I don't have data past the current date/time,
> but wms_timeextent isn't wrong either.
> 
> Dave
> 
> On 1/19/22 03:47, Trygve Aspenes wrote:
>> Hi all
>> 
>> My problem is I have new data every 5 minutes updateing a postgres db 
>> with, among others columns, one timestamp column. Thats easy. But its 
>> not easy to automatically update my mapserver map file for the 
>> wms_timeextent element with the same information.
>> 
>> Is it possible to use this time information from my db in the 
>> wms_timeextent definition in my map file? Filling the actual available 
>> time extent dynamically?
>> 
>> Thanks
>> 
>> Trygve
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the MapServer-users mailing list