<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Jonathan,</p>
    <p>I am aware about the limit in GET requests.</p>
    <p>Are you sure that WMS servers don't support POST requests?</p>
    <p>Some Google hits suggest otherwise</p>
    <p>Geoserver:<br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://anitagraser.com/2010/06/09/getmap-from-geoserver-using-http-post/">https://anitagraser.com/2010/06/09/getmap-from-geoserver-using-http-post/</a></p>
    <p>UMN:</p>
    <p><a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/232215/mapserver-wms-http-post-requests">https://gis.stackexchange.com/questions/232215/mapserver-wms-http-post-requests</a></p>
    <p>I am pretty sure that QGIS Server also allows POST requests, but
      I may be wrong.<br>
    </p>
    <p>Andreas<br>
    </p>
    <div class="moz-cite-prefix">Am 09.04.19 um 19:09 schrieb Jonathan
      Moules:<br>
    </div>
    <blockquote type="cite"
      cite="mid:40d23a6a-e5c7-b9ee-6d14-c3dd84d77a5d@lightpear.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi Andreas,</p>
      <p>Another problem you may hit - the link below is hitting it
        being ~2300 chars - URL's (and thus GET requests) cannot
        reliably be more than about 2000 characters long. At that point
        you need to shift over to POST requests (and I think GetMap is
        GET only...).</p>
      <p><a class="moz-txt-link-freetext"
href="https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers"
          moz-do-not-send="true">https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers</a><br>
      </p>
      <p>Cheers,</p>
      <p>Jonathan<br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 2019-04-09 16:07, Andreas Neumann
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:9e2b63f95b6c91326ff40c085e997b0e@carto.net">Hi Paul <br>
        Thanks - now I know that I have to use SLD_BODY for the case
        where the <br>
        SLD is in the URL. <br>
        Another QGIS-Server specific question: <br>
        Can I count on it that the SLD output by QGIS server with the
        GetStyles <br>
        request can also be consumed again by QGIS server? What about
        complex <br>
        styles (e.g. something with a style that can't easily be
        represented by <br>
        SLD). If I first consume the styles from QGIS server, then
        filter and <br>
        send back, would the complex styles potentially be
        lost/destroyed? <br>
        Again: our intent here is merely to filter categories, not to
        change the <br>
        styles. <br>
        Thanks, <br>
        Andreas <br>
        On 2019-04-09 16:28, pblottiere wrote: <br>
        <br>
        <blockquote type="cite">Hi Andreas, <br>
          <blockquote type="cite">Can you point me to an example how to
            create a valid GetMap request with an SLD submitted? </blockquote>
          <br>
          There's a basic example in unit tests:
          <a class="moz-txt-link-freetext"
href="https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgsserver_wms_getmap.py#L1309-L1325"
            moz-do-not-send="true">https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgsserver_wms_getmap.py#L1309-L1325</a><br>
          <br>
          Regards, <br>
          <br>
          Paul <br>
          On 4/9/19 4:14 PM, Andreas Neumann wrote: <br>
          Hi, <br>
          I did some test: <br>
          Here is a long URL with the SLD (originally sent by QGIS
          server, stripped away some RULES manually) and sending it back
          in a GetMap request: <br>
          <br>
        </blockquote>
        <a class="moz-txt-link-freetext"
href="https://services.geo.zg.ch/ows-oereb/Grundwasserschutz?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=2682932,1225299,2684213,1226054&CRS=EPSG:2056&WIDTH=1615&HEIGHT=952&LAYERS=ch.zg.grundwasserschutz.gwszonen&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&SLD=%3CStyledLayerDescriptor+xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22+xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld+http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.1.0%2FStyledLayerDescriptor.xsd%22+xmlns%3Ase%3D%22http%3A%2F%2Fwww.opengis.net%2Fse%22+version%3D%221.1.0%22+xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%0D%0A+%3CNamedLayer%3E%0D%0A++%3Cse%3AName%3Ech.zg.grundwasserschutz.gwszonen%3C%2Fse%3AName%3E%0D%0A++%3CUserStyle%3E%0D%0A+++%3Cse%3AName%3Edefault%3C%2Fse%3AName%3E%0D%0A+++%3Cse%3AFeatureTypeStyle%3E%0D%0A++++%3Cs"
          moz-do-not-send="true">https://services.geo.zg.ch/ows-oereb/Grundwasserschutz?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=2682932,1225299,2684213,1226054&CRS=EPSG:2056&WIDTH=1615&HEIGHT=952&LAYERS=ch.zg.grundwasserschutz.gwszonen&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&SLD=%3CStyledLayerDescriptor+xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22+xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld+http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.1.0%2FStyledLayerDescriptor.xsd%22+xmlns%3Ase%3D%22http%3A%2F%2Fwww.opengis.net%2Fse%22+version%3D%221.1.0%22+xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%0D%0A+%3CNamedLayer%3E%0D%0A++%3Cse%3AName%3Ech.zg.grundwasserschutz.gwszonen%3C%2Fse%3AName%3E%0D%0A++%3CUserStyle%3E%0D%0A+++%3Cse%3AName%3Edefault%3C%2Fse%3AName%3E%0D%0A+++%3Cse%3AFeatureTypeStyle%3E%0D%0A++++%3Cs</a>
        <br>
e%3ARule%3E%0D%0A+++++%3Cse%3AName%3EGrundwasserschutzzone+S1%3C%2Fse%3AName%3E%0D%0A+++++%3Cse%3ADescription%3E%0D%0A++++++%3Cse%3ATitle%3EGrundwasserschutzzone+S1%3C%2Fse%3ATitle%3E%0D%0A+++++%3C%2Fse%3ADescription%3E%0D%0A+++++%3Cogc%3AFilter+xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%0D%0A++++++%3Cogc%3APropertyIsEqualTo%3E%0D%0A+++++++%3Cogc%3APropertyName%3Etyp_code%3C%2Fogc%3APropertyName%3E%0D%0A+++++++%3Cogc%3ALiteral%3ES1%3C%2Fogc%3ALiteral%3E%0D%0A++++++%3C%2Fogc%3APropertyIsEqualTo%3E%0D%0A+++++%3C%2Fogc%3AFilter%3E%0D%0A+++++%3Cse%3APolygonSymbolizer%3E%0D%0A++++++%3Cse%3AFill%3E%0D%0A+++++++%3Cse%3ASvgParameter+name%3D%22fill%22%3E%23003bb3%3C%2Fse%3ASvgParameter%3E%0D%0A++++++%3C%2Fse%3AFill%3E%0D%0A++++++%3Cse%3AStroke%3E%0D%0A+++++++%3Cse%3ASvgParameter+name%3D%22stroke%22%3E%23000080%3C%2Fse%3ASvgParameter%3E%0D%0A+++++++%3Cse%3ASvgParameter+name%3D%22stroke-width%22%3E1%3C%2Fse%3ASvgParameter%3E%0D%0A+++++++%3Cse%3ASvgParameter+name%3D%22stroke-linej
        <br>
oin%22%3Ebevel%3C%2Fse%3ASvgParameter%3E%0D%0A++++++%3C%2Fse%3AStroke%3E%0D%0A+++++%3C%2Fse%3APolygonSymbolizer%3E%0D%0A++++%3C%2Fse%3ARule%3E%0D%0A+++%3C%2Fse%3AFeatureTypeStyle%3E%0D%0A++%3C%2FUserStyle%3E%0D%0A+%3C%2FNamedLayer%3E%0D%0A%3C%2FStyledLayerDescriptor%3E
        <blockquote type="cite"> <br>
          The response is: <br>
          <br>
          <ServiceExceptionReport xmlns=<a
            class="moz-txt-link-rfc2396E"
            href="http://www.opengis.net/ogc" moz-do-not-send="true">"http://www.opengis.net/ogc"</a>
          version="1.3.0"> <br>
          <ServiceException code="Invalid Parameter"> SLD
          ('<StyledLayerDescriptor xmlns=<a
            class="moz-txt-link-rfc2396E"
            href="http://www.opengis.net/sld" moz-do-not-send="true">"http://www.opengis.net/sld"</a>
          [1] xmlns:xlink=<a class="moz-txt-link-rfc2396E"
            href="http://www.w3.org/1999/xlink" moz-do-not-send="true">"http://www.w3.org/1999/xlink"</a>
          [2] xmlns:xsi=<a class="moz-txt-link-rfc2396E"
            href="http://www.w3.org/2001/XMLSchema-instance"
            moz-do-not-send="true">"http://www.w3.org/2001/XMLSchema-instance"</a>
          [3] xsi:schemaLocation=<a class="moz-txt-link-rfc2396E"
href="http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"
            moz-do-not-send="true">"http://www.opengis.net/sld
            http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"</a>
          [4] xmlns:se=<a class="moz-txt-link-rfc2396E"
            href="http://www.opengis.net/se" moz-do-not-send="true">"http://www.opengis.net/se"</a>
          [5] version="1.1.0" xmlns:ogc=<a class="moz-txt-link-rfc2396E"
            href="http://www.opengis.net/ogc" moz-do-not-send="true">"http://www.opengis.net/ogc"</a>
          [6]> <NamedLayer>
          <se:Name>ch.zg.grundwasserschutz.gwszonen</se:Name>
          <UserStyle> <se:Name>default</se:Name>
          <se:FeatureTypeStyle> <se:Rule>
          <se:Name>Grundwasserschutzzone S1</se:Name>
          <se:Description> <se:Title>Grundwasserschutzzone
          S1</se:Title> </se:Description> <ogc:Filter
          xmlns:ogc=<a class="moz-txt-link-rfc2396E"
            href="http://www.opengis.net/ogc" moz-do-not-send="true">"http://www.opengis.net/ogc"</a>
          [6]> <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>typ_code</ogc:PropertyName>
          <ogc:Literal>S1</ogc:Literal>
          </ogc:PropertyIsEqualTo> </ogc:Filter>
          <se:PolygonSymbolizer> <se:Fill>
          <se:SvgParameter
          name="fill">#003bb3</se:SvgParameter>
          </se:Fill> <se:Stroke> <se:SvgParameter <br>
        </blockquote>
        name="stroke">#000080</se:SvgParameter>
        <se:SvgParameter
        name="stroke-width">1</se:SvgParameter>
        <se:SvgParameter
        name="stroke-linejoin">bevel</se:SvgParameter>
        </se:Stroke> </se:PolygonSymbolizer>
        </se:Rule> </se:FeatureTypeStyle> </UserStyle>
        </NamedLayer> </StyledLayerDescriptor>') cannot be
        converted into QString
        <blockquote type="cite"></ServiceException>
          </ServiceExceptionReport> <br>
          So apparently the SLD cannot be converted to a QString. Is my
          encoding in the URL above wrong or am I missing a required
          additional parameter? <br>
          Can you point me to an example how to create a valid GetMap
          request with an SLD submitted? <br>
          Thanks a lot, Andreas <br>
          On 2019-04-09 15:38, Andreas Neumann wrote: <br>
          Hi, <br>
          Does QGIS-Server support SLD styles to filter away RULEs in a
          GetMap Request? <br>
          I would assume, yes, but in what encoding would I submit such
          an SLD in a GET request? I know that one should rather use
          POST reqests for such long parameters, but for experimenting,
          it would be ok to use GET. <br>
          The idea would be to allow users to enable/disable categories
          within a given layer. <br>
          The WMS client would first request the available rules with a
          GetStyles command (that part works fine) and would then filter
          the RULE (strip away the unwanted RULEs) and resubmit the
          GetMap with an SLD. Does that work with QGIS server? <br>
          I know that one can also use the FILTER parameter, but we want
          to do it in an OGC compatible way, since the client being
          developed should work with any OGC compatible WMS server. <br>
          Thanks for your reply, <br>
          Andreas _______________________________________________ <br>
          QGIS-Developer mailing list <br>
          <a class="moz-txt-link-abbreviated"
            href="mailto:QGIS-Developer@lists.osgeo.org"
            moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a> <br>
          List info: <a class="moz-txt-link-freetext"
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
          <br>
          Unsubscribe: <a class="moz-txt-link-freetext"
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
          <br>
          _______________________________________________ <br>
          QGIS-Developer mailing list <br>
          <a class="moz-txt-link-abbreviated"
            href="mailto:QGIS-Developer@lists.osgeo.org"
            moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a> <br>
          List info: <a class="moz-txt-link-freetext"
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
          <br>
          Unsubscribe: <a class="moz-txt-link-freetext"
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
          <br>
        </blockquote>
        <br>
        _______________________________________________ <br>
        QGIS-Developer mailing list <br>
        <a class="moz-txt-link-abbreviated"
          href="mailto:QGIS-Developer@lists.osgeo.org"
          moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a> <br>
        List info: <a class="moz-txt-link-freetext"
          href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
          moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
        <br>
        Unsubscribe: <a class="moz-txt-link-freetext"
          href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
          moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
        <br>
        <br>
        <br>
        Links: <br>
        ------ <br>
        [1] <a class="moz-txt-link-freetext"
          href="http://www.opengis.net/sld" moz-do-not-send="true">http://www.opengis.net/sld</a>
        <br>
        [2] <a class="moz-txt-link-freetext"
          href="http://www.w3.org/1999/xlink" moz-do-not-send="true">http://www.w3.org/1999/xlink</a>
        <br>
        [3] <a class="moz-txt-link-freetext"
          href="http://www.w3.org/2001/XMLSchema-instance"
          moz-do-not-send="true">http://www.w3.org/2001/XMLSchema-instance</a>
        <br>
        [4] <br>
        <a class="moz-txt-link-freetext"
href="http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"
          moz-do-not-send="true">http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd</a>
        <br>
        [5] <a class="moz-txt-link-freetext"
          href="http://www.opengis.net/se" moz-do-not-send="true">http://www.opengis.net/se</a>
        <br>
        [6] <a class="moz-txt-link-freetext"
          href="http://www.opengis.net/ogc" moz-do-not-send="true">http://www.opengis.net/ogc</a>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
      </blockquote>
    </blockquote>
  </body>
</html>