Skip to content

Commit

Permalink
Fix: Server WMS Dimension nearestValue and multipleValues
Browse files Browse the repository at this point in the history
* The WMS Dimension GetCapabilities nearestValue attribute has to be 0 or 1 and not 48.
* The WMS Dimension GetCapabilities multipleValue attribute does not exist.
* The WMS Dimension GetCapabilities multipleValues attribute has to be 0 or 1 and not 49.
  • Loading branch information
rldhont authored and nyalldawson committed Jan 12, 2021
1 parent ffea349 commit 8b13ca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -1271,8 +1271,8 @@ namespace QgsWms
{
dimElem.setAttribute( QStringLiteral( "default" ), dim.referenceValue.toString() );
}
dimElem.setAttribute( QStringLiteral( "multipleValue" ), '1' );
dimElem.setAttribute( QStringLiteral( "nearestValue" ), '0' );
dimElem.setAttribute( QStringLiteral( "multipleValues" ), QStringLiteral( "1" ) );
dimElem.setAttribute( QStringLiteral( "nearestValue" ), QStringLiteral( "0" ) );
// values list
QStringList strValues;
for ( const QVariant &v : values )
Expand Down
Expand Up @@ -142,7 +142,7 @@ Content-Type: text/xml; charset=utf-8
<OnlineResource xlink:href="https://www.qgis.org/?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server_accesscontrol/project_with_dimensions.qgs&amp;SERVICE=WMS&amp;VERSION=1.3.0&amp;REQUEST=GetLegendGraphic&amp;LAYER=Contours&amp;FORMAT=image/png&amp;STYLE=default&amp;SLD_VERSION=1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"/>
</LegendURL>
</Style>
<Dimension name="elevation" units="meters" unitSymbol="m" nearestValue="48" multipleValue="49">0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000</Dimension>
<Dimension name="elevation" units="meters" unitSymbol="m" nearestValue="0" multipleValues="1">0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000</Dimension>
</Layer>
<Layer queryable="1">
<Name>Slopes</Name>
Expand All @@ -166,7 +166,7 @@ Content-Type: text/xml; charset=utf-8
<OnlineResource xlink:href="https://www.qgis.org/?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server_accesscontrol/project_with_dimensions.qgs&amp;SERVICE=WMS&amp;VERSION=1.3.0&amp;REQUEST=GetLegendGraphic&amp;LAYER=Slopes&amp;FORMAT=image/png&amp;STYLE=default&amp;SLD_VERSION=1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"/>
</LegendURL>
</Style>
<Dimension name="range_elevation" units="meters" unitSymbol="m" nearestValue="48" multipleValue="49">0, 500, 1000, 1500, 2000, 2500, 3000</Dimension>
<Dimension name="range_elevation" units="meters" unitSymbol="m" nearestValue="0" multipleValues="1">0, 500, 1000, 1500, 2000, 2500, 3000</Dimension>
</Layer>
<Layer queryable="1">
<Name>dem</Name>
Expand Down

0 comments on commit 8b13ca6

Please sign in to comment.