[mapserver-users] [EXTERNAL] Re: MapCache Time Dimensions Problem
Michael Smith
michael.smith.erdc at gmail.com
Wed Jun 10 04:22:13 PDT 2015
Stephan,
Yes I did run directly on the sqlite file and its got an absolute path. I
get all the responses back I think I should get
eg:
Select
strftime('%Y-%m-%dT%H:%M:%SZ',start_time)||'/'||strftime('%Y-%m-%dT%H:%M:%S
Z',end_time) from time where source_id='earthquakes';
..
2014-03-03T23:41:21Z/2014-03-03T23:41:21Z
2014-03-07T23:47:22Z/2014-03-07T23:47:22Z
2014-03-07T00:53:09Z/2014-03-07T00:53:09Z
2014-03-06T02:51:31Z/2014-03-06T02:51:31Z
...
and it all seems to work with default values. Its only when I try to pass
a TIME value on the URL that I get an error.
"GET
/gridvm1mc/mapcache/?LAYERS=earthquakes&SERVICE=WMS&VERSION=1.1.1&REQUEST=G
etMap&STYLES=&SRS=EPSG%3A3857&BBOX=-28119042.469324,-9960050.5336716,281190
42.469324,9960050.5336716&WIDTH=1437&HEIGHT=509 HTTP/1.1" 200 34113
"GET
/gridvm1mc/mapcache/?LAYERS=earthquakes&SERVICE=WMS&VERSION=1.1.1&REQUEST=G
etMap&STYLES=&SRS=EPSG%3A3857&BBOX=-28119042.469324,-9960050.5336716,281190
42.469324,9960050.5336716&WIDTH=1437&HEIGHT=509&TIME=2014-03-06T02:51:31Z
HTTP/1.1" 404 244
And the error is
no matching entry for given TIME dimension "TIME" in tileset
"earthquakes"
----
Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.smith at usace.army.mil
-----Original Message-----
From: Stephan Meißl <stephan at meissl.name>
Date: Tuesday, June 9, 2015 at 4:37 PM
To: "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Subject: [EXTERNAL] Re: [mapserver-users] MapCache Time Dimensions Problem
Resent-From: Michael Smith <michael.smith at usace.army.mil>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi Mike,
>
>did you try running the query directly in sqlite substituting :tileset,
>:start_timestamp, and :end_timestamp with actual values? What schema
>does your sqlite database have? Is the path to the dbfile absolute and
>readable?
>
>I could send you a working example if you want. Let me know.
>
>cu
>Stephan
>
>
>On 06/07/2015 01:13 AM, Michael Smith wrote:
>> I've created a timedimension tileset in MapCache and created the backend
>> sqlite db that has the available times. The mapserver backend handles
>> the WMS TIME requests without a problem. And when I query mapcache
>> without a &TIME=, I get my the default output.
>>
>> However, if I specify a &TIME= parameter to MapCache (as a WMS or WMTS
>> request), I get
>>
>> no matching entry for given TIME dimension "TIME" in tileset
>>"earthquakes"
>>
>> I don't know what I need to change to get MapCache to recognize the TIME
>> parameter. From the docs on RFC-96
>> (http://mapserver.org/development/rfc/ms-rfc-96.html) I don't see what
>> else to specify to set MapCache to understand TIME requests.
>>
>> I can see MapCache making the backend requests to generate images from
>> the time values in the sqlite DB but only with the default specified in
>> the <timedimension>. It never understands new ranges passed with &TIME=.
>>
>> My tileset looks like
>>
>> <tileset name="earthquakes">
>> <source>earthquakes</source>
>> <cache>sqlite</cache>
>> <grid>GoogleMapsCompatible</grid>
>> <format>PNG</format>
>> <metatile>5 5</metatile>
>> <metabuffer>10</metabuffer>
>> <expires>3600</expires>
>> <timedimension type="sqlite" default="2014-03-25T12Z" >
>> <dbfile>/u02/mapcache/dbtime2.db</dbfile>
>> <query>select
>>
>>strftime('%Y-%m-%dT%H:%M:%SZ',start)||'/'||strftime('%Y-%m-%dT%H:%M:%SZ',
>>end)
>> from time
>> where source_id=:tileset
>> and
>>start_time>=datetime(:start_timestamp,'unixepoch')
>> and end_time<=datetime(:end_timestamp,'unixepoch')
>> order by end_time
>> </query>
>> </timedimension>
>> </tileset>
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1
>
>iQIcBAEBAgAGBQJVd06lAAoJEKNQXeNWi+qta2kQAMVFCsQ95RFUQbe8h7AkpnZD
>Io7OYrziPm7mx62F8OJmdaL4EQLVXIUqlNgxEDq4yu4phNr008mmyV26h4B1xcvA
>7v3XHsw0Mm+rBbfdC+H110woUnfhNLjlO03sgd8MEpinrsxnhAi0RZOIbJpXQRyH
>UiRTxtpnCKapeY1ApIORznf450GMrHx4rGAQ5DWUinnWFlKFuARwkyI+brLdae/j
>gUXQYIyDzpaURCPDfaYPdUlNiKLM2GDeZY59WvBozU68LXKJS236DNXj0NBIuBal
>Y4JD5DbwOYqYE5kA69cMDwOB5whNjkoQFvOUGS9mDB1Bn0mUBWUGI4alkTOIoBsl
>St4QiX6CdcSkcN8c39ErR4C3b+oEbrWwEje0aAhNT7Bp9dOaRahcoSGcGXuIHnB9
>VQ/efIbaVpeGnTYtV65VpKBNiy5iqcygig6a3y2fnMO4G3eQkLAA12GxoSJHv+Fl
>ZqQmtUBFtdQUYb19E0MWJhjs06IX2lqh3uo9CcgDFygO5LJ4m6r096Bq7+dbbzOn
>hWZCM1MtsQ31FGjAVcgKsmBPBamOqNuNi+X8YvH1nP2fjJx+0PIeYFzWRgAKuX3F
>dehpryaXwAG3N8TDNYd/2lIucAsKowamEDcQ38k017vxl7q1/RflGcmveK0Xqe5B
>Xyk+HREWcAb2B6oGFVro
>=mBOf
>-----END PGP SIGNATURE-----
>_______________________________________________
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list