[Qgis-developer] QGIS Server SLD GetStyles method bug?
Marco Hugentobler
marco.hugentobler at sourcepole.ch
Thu Jan 9 00:40:25 PST 2014
Hi Alessandro
Pull request is applied. Good work!
One thing I noticed is that QgsProjectParser::getStyles uses
QgsProjectParser::mapLayerFromTypeName. Like that, the styles are only
returned for layers published as WFS. Is that intentional? Otherwise,
QgsProjectParser::mapLayerFromStyle might be a better option, as it
returns the layers published via WMS.
Regards,
Marco
On 06.01.2014 11:37, Alessandro Pasotti wrote:
> 2014/1/6 Marco Hugentobler <marco.hugentobler at sourcepole.ch
> <mailto:marco.hugentobler at sourcepole.ch>>
>
> Hi
>
> QGIS server has its own GetStyle method because implementation of
> the server started based on WMS 1.3/SLD1.1. It seems OGC GetStyles
> is only present in WMS1.1.1/SLD1.0 and has been dropped
> afterwards. So it seems to me the bug in the server code is that
> GetStyles is directed to QGIS GetStyle.
>
> I'm aware that WMS 1.1.1/SLD1.0 are very frequently used. So a
> patch to add OGC GetStyles behaviour for 1.1.1 is very welcome.
>
>
>
>
> Hi Marco,
>
> thank you for clarifying, you are absolutely right and it seems that
> it was dropped after 1.0, my issue is related to "GetStyles" request,
> (please notice the trailing "s"), I used this documentation
> (02-070_Styled_Layer_Descriptor_Implementation_Specification.pdf,
> http://portal.opengeospatial.org/files/?artifact_id=1188) :
>
> 13.1. GetStyles
> The GetStyles operation is used to retrieve user-defined styles from a
> WMS. The
> parameters of the HTTP-GET method are defined as follows:
> Parameter Required Description VERSION Required
> Version as required by OGC interfaces.
> REQUEST Required Value must be “GetStyles”.
> LAYERS Required Comma-separated list of named layers for which to
> retrieve style
> descriptions.
> SLDVER Optional The SLD version requested for the SLD document. The
> default is
> to return the highest version supported by the server. If a version
> is requested that the server does not support, then the next lower
> supported version is supported by the server is returned, or the
> server’s lowest supported version. This is similar to WMS version
> negotiation.
>
> If I understand this correctly, we should split GetStyle and GetStyles
> calls and support the second one only if SLDVER is set and
> SLDVER=1.0.0, raise an exception if not match.
>
> GetStyles should then accept the following parameters:
>
> REQUEST=GetStyles
> LAYERS=comma separated list of TypeNames
> SLDVER=1.0.0 (this seems the only version that supports GetStyles)
>
>
> BTW: does anybody know what method took the place of GetStyles after
> it was dropped?
>
>
> --
> Alessandro Pasotti
> w3: www.itopen.it <http://www.itopen.it>
--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140109/bdc4752f/attachment-0001.html>
More information about the Qgis-developer
mailing list