Skip to content

Commit 9806475

Browse files
committedApr 18, 2019
[Bugfix][Server] WMTS: layer scale base visibility has not been well used
This has been fixed in master and QGIS 3.6, but has been probably not well backported.
1 parent d673c6f commit 9806475

File tree

2 files changed

+259
-7
lines changed

2 files changed

+259
-7
lines changed
 

‎src/server/services/wmts/qgswmtsutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ namespace QgsWmts
440440
}
441441
else
442442
{
443-
pLayer.maxScale = l->maximumScale();
444-
pLayer.minScale = l->minimumScale();
443+
pLayer.maxScale = 0.0;
444+
pLayer.minScale = 0.0;
445445
}
446446

447447
wmtsLayers.append( pLayer );

‎tests/testdata/qgis_server/wmts_getcapabilities.txt

Lines changed: 257 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
1+
Content-Length: 45696
22
Content-Type: text/xml; charset=utf-8
33

4-
<Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" xmlns="http://www.opengis.net/wmts/1.0" version="1.0.0" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
4+
<Capabilities xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns="http://www.opengis.net/wmts/1.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink">
55
<ows:ServiceIdentification>
66
<ows:ServiceType>OGC WMTS</ows:ServiceType>
77
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
@@ -20,21 +20,21 @@ Content-Type: text/xml; charset=utf-8
2020
<ows:Operation name="GetCapabilities">
2121
<ows:DCP>
2222
<ows:HTTP>
23-
<ows:Get xlink:href="?"/>
23+
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server_accesscontrol/project_groups.qgs&amp;"/>
2424
</ows:HTTP>
2525
</ows:DCP>
2626
</ows:Operation>
2727
<ows:Operation name="GetTile">
2828
<ows:DCP>
2929
<ows:HTTP>
30-
<ows:Get xlink:href="?"/>
30+
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server_accesscontrol/project_groups.qgs&amp;"/>
3131
</ows:HTTP>
3232
</ows:DCP>
3333
</ows:Operation>
3434
<ows:Operation name="GetFeatureInfo">
3535
<ows:DCP>
3636
<ows:HTTP>
37-
<ows:Get xlink:href="?"/>
37+
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server_accesscontrol/project_groups.qgs&amp;"/>
3838
</ows:HTTP>
3939
</ows:DCP>
4040
</ows:Operation>
@@ -718,6 +718,132 @@ Content-Type: text/xml; charset=utf-8
718718
<MinTileRow>0</MinTileRow>
719719
<MaxTileRow>1</MaxTileRow>
720720
</TileMatrixLimits>
721+
<TileMatrixLimits>
722+
<TileMatrix>3</TileMatrix>
723+
<MinTileCol>1</MinTileCol>
724+
<MaxTileCol>6</MaxTileCol>
725+
<MinTileRow>1</MinTileRow>
726+
<MaxTileRow>3</MaxTileRow>
727+
</TileMatrixLimits>
728+
<TileMatrixLimits>
729+
<TileMatrix>4</TileMatrix>
730+
<MinTileCol>2</MinTileCol>
731+
<MaxTileCol>12</MaxTileCol>
732+
<MinTileRow>3</MinTileRow>
733+
<MaxTileRow>7</MaxTileRow>
734+
</TileMatrixLimits>
735+
<TileMatrixLimits>
736+
<TileMatrix>5</TileMatrix>
737+
<MinTileCol>4</MinTileCol>
738+
<MaxTileCol>24</MaxTileCol>
739+
<MinTileRow>7</MinTileRow>
740+
<MaxTileRow>15</MaxTileRow>
741+
</TileMatrixLimits>
742+
<TileMatrixLimits>
743+
<TileMatrix>6</TileMatrix>
744+
<MinTileCol>8</MinTileCol>
745+
<MaxTileCol>49</MaxTileCol>
746+
<MinTileRow>14</MinTileRow>
747+
<MaxTileRow>31</MaxTileRow>
748+
</TileMatrixLimits>
749+
<TileMatrixLimits>
750+
<TileMatrix>7</TileMatrix>
751+
<MinTileCol>16</MinTileCol>
752+
<MaxTileCol>99</MaxTileCol>
753+
<MinTileRow>28</MinTileRow>
754+
<MaxTileRow>63</MaxTileRow>
755+
</TileMatrixLimits>
756+
<TileMatrixLimits>
757+
<TileMatrix>8</TileMatrix>
758+
<MinTileCol>33</MinTileCol>
759+
<MaxTileCol>198</MaxTileCol>
760+
<MinTileRow>57</MinTileRow>
761+
<MaxTileRow>127</MaxTileRow>
762+
</TileMatrixLimits>
763+
<TileMatrixLimits>
764+
<TileMatrix>9</TileMatrix>
765+
<MinTileCol>66</MinTileCol>
766+
<MaxTileCol>396</MaxTileCol>
767+
<MinTileRow>115</MinTileRow>
768+
<MaxTileRow>254</MaxTileRow>
769+
</TileMatrixLimits>
770+
<TileMatrixLimits>
771+
<TileMatrix>10</TileMatrix>
772+
<MinTileCol>133</MinTileCol>
773+
<MaxTileCol>792</MaxTileCol>
774+
<MinTileRow>230</MinTileRow>
775+
<MaxTileRow>508</MaxTileRow>
776+
</TileMatrixLimits>
777+
<TileMatrixLimits>
778+
<TileMatrix>11</TileMatrix>
779+
<MinTileCol>267</MinTileCol>
780+
<MaxTileCol>1584</MaxTileCol>
781+
<MinTileRow>460</MinTileRow>
782+
<MaxTileRow>1017</MaxTileRow>
783+
</TileMatrixLimits>
784+
<TileMatrixLimits>
785+
<TileMatrix>12</TileMatrix>
786+
<MinTileCol>534</MinTileCol>
787+
<MaxTileCol>3168</MaxTileCol>
788+
<MinTileRow>921</MinTileRow>
789+
<MaxTileRow>2034</MaxTileRow>
790+
</TileMatrixLimits>
791+
<TileMatrixLimits>
792+
<TileMatrix>13</TileMatrix>
793+
<MinTileCol>1068</MinTileCol>
794+
<MaxTileCol>6336</MaxTileCol>
795+
<MinTileRow>1842</MinTileRow>
796+
<MaxTileRow>4068</MaxTileRow>
797+
</TileMatrixLimits>
798+
<TileMatrixLimits>
799+
<TileMatrix>14</TileMatrix>
800+
<MinTileCol>2136</MinTileCol>
801+
<MaxTileCol>12672</MaxTileCol>
802+
<MinTileRow>3684</MinTileRow>
803+
<MaxTileRow>8137</MaxTileRow>
804+
</TileMatrixLimits>
805+
<TileMatrixLimits>
806+
<TileMatrix>15</TileMatrix>
807+
<MinTileCol>4273</MinTileCol>
808+
<MaxTileCol>25344</MaxTileCol>
809+
<MinTileRow>7368</MinTileRow>
810+
<MaxTileRow>16274</MaxTileRow>
811+
</TileMatrixLimits>
812+
<TileMatrixLimits>
813+
<TileMatrix>16</TileMatrix>
814+
<MinTileCol>8547</MinTileCol>
815+
<MaxTileCol>50689</MaxTileCol>
816+
<MinTileRow>14736</MinTileRow>
817+
<MaxTileRow>32548</MaxTileRow>
818+
</TileMatrixLimits>
819+
<TileMatrixLimits>
820+
<TileMatrix>17</TileMatrix>
821+
<MinTileCol>17094</MinTileCol>
822+
<MaxTileCol>101378</MaxTileCol>
823+
<MinTileRow>29473</MinTileRow>
824+
<MaxTileRow>65097</MaxTileRow>
825+
</TileMatrixLimits>
826+
<TileMatrixLimits>
827+
<TileMatrix>18</TileMatrix>
828+
<MinTileCol>34188</MinTileCol>
829+
<MaxTileCol>202756</MaxTileCol>
830+
<MinTileRow>58947</MinTileRow>
831+
<MaxTileRow>130194</MaxTileRow>
832+
</TileMatrixLimits>
833+
<TileMatrixLimits>
834+
<TileMatrix>19</TileMatrix>
835+
<MinTileCol>68377</MinTileCol>
836+
<MaxTileCol>405512</MaxTileCol>
837+
<MinTileRow>117895</MinTileRow>
838+
<MaxTileRow>260388</MaxTileRow>
839+
</TileMatrixLimits>
840+
<TileMatrixLimits>
841+
<TileMatrix>20</TileMatrix>
842+
<MinTileCol>136755</MinTileCol>
843+
<MaxTileCol>811025</MaxTileCol>
844+
<MinTileRow>235791</MinTileRow>
845+
<MaxTileRow>520776</MaxTileRow>
846+
</TileMatrixLimits>
721847
</TileMatrixSetLimits>
722848
</TileMatrixSetLink>
723849
<TileMatrixSetLink>
@@ -737,6 +863,132 @@ Content-Type: text/xml; charset=utf-8
737863
<MinTileRow>0</MinTileRow>
738864
<MaxTileRow>0</MaxTileRow>
739865
</TileMatrixLimits>
866+
<TileMatrixLimits>
867+
<TileMatrix>2</TileMatrix>
868+
<MinTileCol>1</MinTileCol>
869+
<MaxTileCol>6</MaxTileCol>
870+
<MinTileRow>0</MinTileRow>
871+
<MaxTileRow>1</MaxTileRow>
872+
</TileMatrixLimits>
873+
<TileMatrixLimits>
874+
<TileMatrix>3</TileMatrix>
875+
<MinTileCol>2</MinTileCol>
876+
<MaxTileCol>12</MaxTileCol>
877+
<MinTileRow>0</MinTileRow>
878+
<MaxTileRow>3</MaxTileRow>
879+
</TileMatrixLimits>
880+
<TileMatrixLimits>
881+
<TileMatrix>4</TileMatrix>
882+
<MinTileCol>4</MinTileCol>
883+
<MaxTileCol>24</MaxTileCol>
884+
<MinTileRow>1</MinTileRow>
885+
<MaxTileRow>7</MaxTileRow>
886+
</TileMatrixLimits>
887+
<TileMatrixLimits>
888+
<TileMatrix>5</TileMatrix>
889+
<MinTileCol>8</MinTileCol>
890+
<MaxTileCol>49</MaxTileCol>
891+
<MinTileRow>3</MinTileRow>
892+
<MaxTileRow>15</MaxTileRow>
893+
</TileMatrixLimits>
894+
<TileMatrixLimits>
895+
<TileMatrix>6</TileMatrix>
896+
<MinTileCol>16</MinTileCol>
897+
<MaxTileCol>99</MaxTileCol>
898+
<MinTileRow>7</MinTileRow>
899+
<MaxTileRow>31</MaxTileRow>
900+
</TileMatrixLimits>
901+
<TileMatrixLimits>
902+
<TileMatrix>7</TileMatrix>
903+
<MinTileCol>33</MinTileCol>
904+
<MaxTileCol>198</MaxTileCol>
905+
<MinTileRow>14</MinTileRow>
906+
<MaxTileRow>63</MaxTileRow>
907+
</TileMatrixLimits>
908+
<TileMatrixLimits>
909+
<TileMatrix>8</TileMatrix>
910+
<MinTileCol>66</MinTileCol>
911+
<MaxTileCol>396</MaxTileCol>
912+
<MinTileRow>28</MinTileRow>
913+
<MaxTileRow>127</MaxTileRow>
914+
</TileMatrixLimits>
915+
<TileMatrixLimits>
916+
<TileMatrix>9</TileMatrix>
917+
<MinTileCol>133</MinTileCol>
918+
<MaxTileCol>792</MaxTileCol>
919+
<MinTileRow>57</MinTileRow>
920+
<MaxTileRow>255</MaxTileRow>
921+
</TileMatrixLimits>
922+
<TileMatrixLimits>
923+
<TileMatrix>10</TileMatrix>
924+
<MinTileCol>267</MinTileCol>
925+
<MaxTileCol>1584</MaxTileCol>
926+
<MinTileRow>115</MinTileRow>
927+
<MaxTileRow>511</MaxTileRow>
928+
</TileMatrixLimits>
929+
<TileMatrixLimits>
930+
<TileMatrix>11</TileMatrix>
931+
<MinTileCol>534</MinTileCol>
932+
<MaxTileCol>3168</MaxTileCol>
933+
<MinTileRow>230</MinTileRow>
934+
<MaxTileRow>1022</MaxTileRow>
935+
</TileMatrixLimits>
936+
<TileMatrixLimits>
937+
<TileMatrix>12</TileMatrix>
938+
<MinTileCol>1068</MinTileCol>
939+
<MaxTileCol>6336</MaxTileCol>
940+
<MinTileRow>460</MinTileRow>
941+
<MaxTileRow>2045</MaxTileRow>
942+
</TileMatrixLimits>
943+
<TileMatrixLimits>
944+
<TileMatrix>13</TileMatrix>
945+
<MinTileCol>2136</MinTileCol>
946+
<MaxTileCol>12672</MaxTileCol>
947+
<MinTileRow>920</MinTileRow>
948+
<MaxTileRow>4091</MaxTileRow>
949+
</TileMatrixLimits>
950+
<TileMatrixLimits>
951+
<TileMatrix>14</TileMatrix>
952+
<MinTileCol>4273</MinTileCol>
953+
<MaxTileCol>25344</MaxTileCol>
954+
<MinTileRow>1841</MinTileRow>
955+
<MaxTileRow>8182</MaxTileRow>
956+
</TileMatrixLimits>
957+
<TileMatrixLimits>
958+
<TileMatrix>15</TileMatrix>
959+
<MinTileCol>8547</MinTileCol>
960+
<MaxTileCol>50689</MaxTileCol>
961+
<MinTileRow>3682</MinTileRow>
962+
<MaxTileRow>16364</MaxTileRow>
963+
</TileMatrixLimits>
964+
<TileMatrixLimits>
965+
<TileMatrix>16</TileMatrix>
966+
<MinTileCol>17094</MinTileCol>
967+
<MaxTileCol>101378</MaxTileCol>
968+
<MinTileRow>7365</MinTileRow>
969+
<MaxTileRow>32729</MaxTileRow>
970+
</TileMatrixLimits>
971+
<TileMatrixLimits>
972+
<TileMatrix>17</TileMatrix>
973+
<MinTileCol>34188</MinTileCol>
974+
<MaxTileCol>202756</MaxTileCol>
975+
<MinTileRow>14730</MinTileRow>
976+
<MaxTileRow>65459</MaxTileRow>
977+
</TileMatrixLimits>
978+
<TileMatrixLimits>
979+
<TileMatrix>18</TileMatrix>
980+
<MinTileCol>68377</MinTileCol>
981+
<MaxTileCol>405512</MaxTileCol>
982+
<MinTileRow>29460</MinTileRow>
983+
<MaxTileRow>130918</MaxTileRow>
984+
</TileMatrixLimits>
985+
<TileMatrixLimits>
986+
<TileMatrix>19</TileMatrix>
987+
<MinTileCol>136755</MinTileCol>
988+
<MaxTileCol>811025</MaxTileCol>
989+
<MinTileRow>58921</MinTileRow>
990+
<MaxTileRow>261836</MaxTileRow>
991+
</TileMatrixLimits>
740992
</TileMatrixSetLimits>
741993
</TileMatrixSetLink>
742994
</Layer>

0 commit comments

Comments
 (0)
Please sign in to comment.