mapcache
mapcache copied to clipboard
Allow applying dimensions through WMS filter
Support dimensions in WMS sources through WMS FILTER parameter.
<source name="layer1" type="wms">
<getmap>
<params>
<LAYERS>layer1</LAYERS>
<FILTER>layer1:"floor" = '{dim:FLOOR}'</FILTER>
</params>
</getmap>
...
</source>
Useful for creating tilesets with dimensions from WMS layers without dimensions (note that QGIS server does not support WMS dimensions for the moment).
@tbonfort @jmckenna @rouault : What do you think about this, if accepted I would create a nem PR to update the mapserver documentation.
@tbonfort : Hello Thomas, I did not get feedback on this pull request openned 2 months ago, do you think this could be merged ?
Hello, how about merging this new feature ?
Sorry for the long delay, hope this is not too late.
Before merging I have some comments:
-
Removing duplicate code into
_apply_dimensions()
is a goot idea. Just take care thatrdim->cached_value
is now replaced byrdim->requested_value
(see issue #212). -
The same loop on dimensions is performed twice. Is it possible to group both computations into only one loop?
-
Template with named dimension is handled (
{dim:floor}
). What about template with all dimensions:{dim}
? Like incache_sqlite.c
for instance (remember to replacerdim->cached_value
byrdim->requested_value
).
@arnaud-morvan - Is this pull request still relevant?
Seems that we do not need this anymore for QGIS which support WMS dimensions now : https://changelog.qgis.org/en/qgis/version/3.10/#wms-dimension But this could still be interesting when using an external service as source that do not expose the dimensions we would like in mapcache.
I put this in my todo list and will try to find some time to spend on this rebase.
Great! Thank you.