Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS-T last index used in cache template #253

Open
jlgauthier31 opened this issue Jun 7, 2021 · 1 comment
Open

WMS-T last index used in cache template #253

jlgauthier31 opened this issue Jun 7, 2021 · 1 comment

Comments

@jlgauthier31
Copy link

jlgauthier31 commented Jun 7, 2021

I'm trying to set up a WMS-T server using mapcache/mapserver, and everything is working fine when i use the static configuration for the time dimension:

      <dimension type="values" name="time" default="2017-07-01">
            <value>2017-07-01</value>
            <value>2017-08-01</value>
            <value>2017-09-01</value>
        </dimension>

with the following cache:

      <cache name="orthoglobe" type="disk" layout="template">
          <template>/mapcache/{tileset}/{dim:time}/{z}/{x}/{y}.{ext}</template>
      </cache>

For each date i pass in the request, i have one {dim:time} directory

But when i'm trying to do the same with dynamic configuration, i always have one directory only, the most recent index : 2017-09-01

With sqlite (the query is working fine in a sqlite terminal):

      <dimension type="sqlite" name="time" default="2017-07-01" time="true">
            <dbfile>/mapcache/orthoglobe_T31TCN.db</dbfile>
            <validate_query>
                 SELECT strftime("%Y-%m-%d",ts) FROM orthoglobe WHERE ts &lt;= ":start_timestamp" ORDER BY ts DESC LIMIT 1
            </validate_query>
            <list_query>SELECT * FROM orthoglobe </list_query>
        </dimension>         

and same behavior with postgresql:

      <dimension type="postgresql" name="time" default="2017-07-01" time="true">
           <connection>
             host=172.17.0.3 user=mapcache password=mapcache dbname=times port=5432
           </connection>
           <list_query>SELECT ts FROM timedim</list_query>
           <validate_query>
                SELECT ts FROM timedim
                 WHERE ts &gt;= :start_timestamp
              ORDER BY ts DESC LIMIT 1
           </validate_query>
         </dimension>

If the cache doesn't exit, the cache is created with the good time value set in the request sent to mapserver, the cache content is well generated, but the cache naming is not good, it's always 2017-09-01.

What am i missing?
Thanks

@jbo-ads
Copy link
Member

jbo-ads commented Oct 12, 2021

@jlgauthier31: Sorry for the late answer. I suggest that you submit your issue to mapserver-users mailing list. Maybe other MapCache users have some advice to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants