<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>@Patrick :</p>
    <p>Yes, I know that it is possible to use FILTER in request, but I'm
      not sure all layers will have the same field name for "floor".</p>
    <p>So I would prefer to define a filter in each layer definition in
      the project file using a common variable name.</p>
    <p>And I would like to have the same behavior on desktop side (using
      a UI plugin that set the variable value and refresh the canvas).<br>
    </p>
    <p>@Mathias :</p>
    <p>Yes after taking a look, WMS dimensions is exactly the idea I
      have in mind. <br>
    </p>
    <p>In mapserver documentation about WMS dimension I see that the
      dimension field is defined in each layer.<br>
    </p>
    <pre><span class="k">LAYER</span>
  <span class="k">NAME</span> <span class="s">"lakes_elev"</span>
  <span class="k">METADATA</span>
    <span class="s">"wms_title"</span>         <span class="s">"Lakes"</span>
    <span class="s">"wms_description"</span>   <span class="s">"Lakes"</span>
    <span class="s">"wms_dimensionlist"</span> <span class="s">"elevation, text_dimension"</span>
    <span class="s">"wms_elevation_item"</span> <span class="s">"ELEV"</span>
    <span class="s">"wms_elevation_extent"</span> <span class="s">"500, 490, 480"</span>
    <span class="s">"wms_elevation_units"</span> <span class="s">"meters"</span>
    <span class="s">"wms_elevation_default"</span> <span class="s">"500"</span>
    <span class="s">"wms_text_dimension_item"</span> <span class="s">"text_dimen"</span>
    <span class="s">"wms_text_dimension_extent"</span> <span class="s">"first, second, third"</span>
     <span class="s">"wms_text_dimension_units"</span> <span class="s">"my_units"</span>
     <span class="s">"wms_enable_request"</span> <span class="s">"*"</span>
  <span class="k">END</span>
  <span class="k">TYPE</span> <span class="nb">POLYGON</span>
  <span class="p">..</span>

<span class="k">END</span>


</pre>
    Is there something about WMS dimensions in QGIS server roadmap ?<br>
    <br>
    <br>
    For now we do it in mapserver using normal template variables, for
    example :
    <p>LAYER</p>
    <p>    <span class="pl-s">VALIDATION</span>
    </p>
    <p><span class="pl-s">        "floor" "[+-][0-9A]+"<span
          class="pl-pds">'</span></span></p>
    <p>    END</p>
    <p>    DATA "geom FROM (SELECT * FROM mytable WHERE etage =
      '%floor%' OR etage IS NULL OR '%floor%' = 'NULL') AS foo USING
      UNIQUE id USING srid=3945"<br>
    </p>
    <p>END</p>
    <p>Note that here the default is no filter at all (all features
      displayed when the parameter is missing), and features with etage
      == NULL are displayed on all floors.<br>
    </p>
    <pre><span class="k">

</span></pre>
    <pre class="moz-signature" cols="72">Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 58 48 20 32

Camptocamp France SAS
18 rue du Lac Saint André
Savoie Technolac - Bâtiment Le Dauphin
F-73370 Le Bourget du Lac
<a class="moz-txt-link-freetext" href="http://www.camptocamp.com">http://www.camptocamp.com</a></pre>
    <div class="moz-cite-prefix">Le 23/11/2017 à 14:49, Patrick
      Valsecchi a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKOK4jjUxcpOcrt6=gNtKDmmZLPSt4cVdaniBMC_dtq15W9M7A@mail.gmail.com">
      <div dir="ltr">You could do that using the filter parameter with
        something like that:
        <div>FILTER=layer_name:"floor" = 3</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Nov 23, 2017 at 2:38 PM,
          Matthias Kuhn <span dir="ltr"><<a
              href="mailto:matthias@opengis.ch" target="_blank"
              moz-do-not-send="true">matthias@opengis.ch</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Like WMS
            dimension?<br>
            <br>
            <a href="http://mapserver.org/ogc/wms_dimension.html"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://mapserver.org/ogc/wms_<wbr>dimension.html</a><br>
            <span class="HOEnZb"><font color="#888888"><br>
                Matthias<br>
              </font></span>
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                On 11/23/17 2:11 PM, Arnaud Morvan wrote:<br>
                > Hello,<br>
                ><br>
                > I would like GetMap and GetFeature request extra
                parameters to be<br>
                > accessible as variables in server.<br>
                ><br>
                > So we could define, in QGIS project, a variable
                "floor", used to<br>
                > filter layers.<br>
                ><br>
                > On desktop side, we could have a desktop plugin
                named FloorSlider to<br>
                > change the "floor" value.<br>
                ><br>
                > And on the server side, the floor value could be
                passed as extra<br>
                > parameter.<br>
                ><br>
                > So it would be easy to handle multi-floor layers in
                a project file.<br>
                ><br>
                ><br>
                > Arnaud Morvan<br>
                > Ingénieur logiciel<br>
                > Tél: <a
                  href="tel:%2B33%20%280%294%2058%2048%2020%2032"
                  value="+33458482032" moz-do-not-send="true">+33 (0)4
                  58 48 20 32</a><br>
                ><br>
                > Camptocamp France SAS<br>
                > 18 rue du Lac Saint André<br>
                > Savoie Technolac - Bâtiment Le Dauphin<br>
                > F-73370 Le Bourget du Lac<br>
                > <a href="http://www.camptocamp.com"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">http://www.camptocamp.com</a><br>
                ><br>
                > Le 22/11/2017 à 18:05, René-Luc Dhont a écrit :<br>
                >> Hi Arnaud,<br>
                >><br>
                >> Is it like updated a QGIS project variables ?<br>
                >><br>
                >> Regards,<br>
                >><br>
                >> René-Luc<br>
                >><br>
                >><br>
                >> Le 22/11/2017 à 15:31, Arnaud Morvan a écrit :<br>
                >>> Hello,<br>
                >>><br>
                >>> With mapserver, request extra parameters
                are accessible as template<br>
                >>> variables in mapfile.<br>
                >>><br>
                >>> I would like to implement the same
                possibility in QGIS Server, extra<br>
                >>> parameters may be accessible in project as
                expression variables.<br>
                >>><br>
                >>> For example : I would like to pass in a
                GetMap request an extra<br>
                >>> parameter FLOOR.<br>
                >>><br>
                >>> This parameter could be handled by QGIS
                Server as a variable value,<br>
                >>> so this could be used in the project to
                filter some layers using an<br>
                >>> expression.<br>
                >>><br>
                >>> Do you think this could be acceptable
                directly in QGIS Server, or<br>
                >>> may I have to wrote a plugin.<br>
                >>><br>
                >>> Maybe this type of plugin already exists ?<br>
                >>><br>
                >>> Note that I'm not familiar with server
                part.<br>
                >>><br>
                >>> Best regards<br>
                >>><br>
                >><br>
                >> ______________________________<wbr>_________________<br>
                >> QGIS-Developer mailing list<br>
                >> <a
                  href="mailto:QGIS-Developer@lists.osgeo.org"
                  moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
                >> List info: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
                >> Unsubscribe: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
                ><br>
                > ______________________________<wbr>_________________<br>
                > QGIS-Developer mailing list<br>
                > <a href="mailto:QGIS-Developer@lists.osgeo.org"
                  moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
                > List info: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
                > Unsubscribe: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
                ><br>
                <br>
                ______________________________<wbr>_________________<br>
                QGIS-Developer mailing list<br>
                <a href="mailto:QGIS-Developer@lists.osgeo.org"
                  moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
                List info: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
                Unsubscribe: <a
                  href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </body>
</html>