mapcache icon indicating copy to clipboard operation
mapcache copied to clipboard

Allow applying dimensions through WMS filter

Open arnaud-morvan opened this issue 6 years ago • 8 comments

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).

arnaud-morvan avatar Jul 02 '18 13:07 arnaud-morvan

@tbonfort @jmckenna @rouault : What do you think about this, if accepted I would create a nem PR to update the mapserver documentation.

arnaud-morvan avatar Aug 03 '18 14:08 arnaud-morvan

@tbonfort : Hello Thomas, I did not get feedback on this pull request openned 2 months ago, do you think this could be merged ?

arnaud-morvan avatar Aug 31 '18 08:08 arnaud-morvan

Hello, how about merging this new feature ?

arnaud-morvan avatar Sep 17 '18 07:09 arnaud-morvan

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 that rdim->cached_value is now replaced by rdim->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 in cache_sqlite.c for instance (remember to replace rdim->cached_value by rdim->requested_value).

jbo-ads avatar Feb 04 '20 10:02 jbo-ads

@arnaud-morvan - Is this pull request still relevant?

jbo-ads avatar Mar 10 '21 12:03 jbo-ads

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.

arnaud-morvan avatar Mar 10 '21 12:03 arnaud-morvan

I put this in my todo list and will try to find some time to spend on this rebase.

arnaud-morvan avatar Mar 10 '21 12:03 arnaud-morvan

Great! Thank you.

jbo-ads avatar Mar 10 '21 12:03 jbo-ads