Skip to content

Commit

Permalink
Merge pull request #43418 from andreassteffens/master
Browse files Browse the repository at this point in the history
[server][wmts][fix] updated constant to correct resolution in WMTS tile grid initialization
  • Loading branch information
pblottiere committed Jun 8, 2021
2 parents af021f1 + b9ab1b7 commit cd94bfa
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 59 deletions.
5 changes: 2 additions & 3 deletions src/server/services/wmts/qgswmtsutils.cpp
Expand Up @@ -35,8 +35,8 @@ namespace QgsWmts
QgsCoordinateReferenceSystem wgs84 = QgsCoordinateReferenceSystem::fromOgcWmsCrs( geoEpsgCrsAuthId() );

// Constant
int tileSize = 256;
double POINTS_TO_M = 2.83464567 / 10000.0;
const int tileSize = 256;
const double POINTS_TO_M = 2.800005600011068 / 10000.0;

QMap< QString, tileMatrixInfo> fixedTileMatrixInfoMap = populateFixedTileMatrixInfoMap();
QMap< QString, tileMatrixInfo> calculatedTileMatrixInfoMap; // for project without WMTSGrids configuration
Expand Down Expand Up @@ -841,4 +841,3 @@ namespace QgsWmts

} // namespace QgsWmts


112 changes: 56 additions & 56 deletions tests/testdata/qgis_server/wmts_getcapabilities_axis_inverted.txt
Expand Up @@ -228,128 +228,128 @@ Content-Type: text/xml; charset=utf-8
<TileMatrixLimits>
<TileMatrix>1</TileMatrix>
<MinTileCol>0</MinTileCol>
<MaxTileCol>0</MaxTileCol>
<MaxTileCol>1</MaxTileCol>
<MinTileRow>1</MinTileRow>
<MaxTileRow>1</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>2</TileMatrix>
<MinTileCol>1</MinTileCol>
<MaxTileCol>1</MaxTileCol>
<MaxTileCol>2</MaxTileCol>
<MinTileRow>2</MinTileRow>
<MaxTileRow>2</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>3</TileMatrix>
<MinTileCol>3</MinTileCol>
<MaxTileCol>3</MaxTileCol>
<MaxTileCol>4</MaxTileCol>
<MinTileRow>4</MinTileRow>
<MaxTileRow>4</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>4</TileMatrix>
<MinTileCol>7</MinTileCol>
<MaxTileCol>7</MaxTileCol>
<MaxTileCol>8</MaxTileCol>
<MinTileRow>8</MinTileRow>
<MaxTileRow>8</MaxTileRow>
<MaxTileRow>9</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>5</TileMatrix>
<MinTileCol>14</MinTileCol>
<MaxTileCol>15</MaxTileCol>
<MaxTileCol>16</MaxTileCol>
<MinTileRow>17</MinTileRow>
<MaxTileRow>17</MaxTileRow>
<MaxTileRow>18</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>6</TileMatrix>
<MinTileCol>29</MinTileCol>
<MaxTileCol>31</MaxTileCol>
<MaxTileCol>32</MaxTileCol>
<MinTileRow>34</MinTileRow>
<MaxTileRow>35</MaxTileRow>
<MaxTileRow>36</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>7</TileMatrix>
<MinTileCol>58</MinTileCol>
<MaxTileCol>63</MaxTileCol>
<MinTileCol>59</MinTileCol>
<MaxTileCol>64</MaxTileCol>
<MinTileRow>68</MinTileRow>
<MaxTileRow>71</MaxTileRow>
<MaxTileRow>72</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>8</TileMatrix>
<MinTileCol>117</MinTileCol>
<MaxTileCol>127</MaxTileCol>
<MinTileRow>136</MinTileRow>
<MaxTileRow>143</MaxTileRow>
<MinTileCol>118</MinTileCol>
<MaxTileCol>129</MaxTileCol>
<MinTileRow>137</MinTileRow>
<MaxTileRow>145</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>9</TileMatrix>
<MinTileCol>234</MinTileCol>
<MaxTileCol>255</MaxTileCol>
<MinTileRow>272</MinTileRow>
<MaxTileRow>287</MaxTileRow>
<MinTileCol>237</MinTileCol>
<MaxTileCol>258</MaxTileCol>
<MinTileRow>275</MinTileRow>
<MaxTileRow>291</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>10</TileMatrix>
<MinTileCol>468</MinTileCol>
<MaxTileCol>511</MaxTileCol>
<MinTileRow>545</MinTileRow>
<MaxTileRow>575</MaxTileRow>
<MinTileCol>474</MinTileCol>
<MaxTileCol>517</MaxTileCol>
<MinTileRow>551</MinTileRow>
<MaxTileRow>582</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>11</TileMatrix>
<MinTileCol>937</MinTileCol>
<MaxTileCol>1022</MaxTileCol>
<MinTileRow>1090</MinTileRow>
<MaxTileRow>1150</MaxTileRow>
<MinTileCol>948</MinTileCol>
<MaxTileCol>1034</MaxTileCol>
<MinTileRow>1103</MinTileRow>
<MaxTileRow>1164</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>12</TileMatrix>
<MinTileCol>1874</MinTileCol>
<MaxTileCol>2044</MaxTileCol>
<MinTileRow>2180</MinTileRow>
<MaxTileRow>2301</MaxTileRow>
<MinTileCol>1897</MinTileCol>
<MaxTileCol>2069</MaxTileCol>
<MinTileRow>2207</MinTileRow>
<MaxTileRow>2329</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>13</TileMatrix>
<MinTileCol>3748</MinTileCol>
<MaxTileCol>4089</MaxTileCol>
<MinTileRow>4360</MinTileRow>
<MaxTileRow>4602</MaxTileRow>
<MinTileCol>3794</MinTileCol>
<MaxTileCol>4139</MaxTileCol>
<MinTileRow>4414</MinTileRow>
<MaxTileRow>4659</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>14</TileMatrix>
<MinTileCol>7496</MinTileCol>
<MaxTileCol>8178</MaxTileCol>
<MinTileRow>8721</MinTileRow>
<MaxTileRow>9205</MaxTileRow>
<MinTileCol>7589</MinTileCol>
<MaxTileCol>8279</MaxTileCol>
<MinTileRow>8829</MinTileRow>
<MaxTileRow>9318</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>15</TileMatrix>
<MinTileCol>14993</MinTileCol>
<MaxTileCol>16356</MaxTileCol>
<MinTileRow>17442</MinTileRow>
<MaxTileRow>18410</MaxTileRow>
<MinTileCol>15179</MinTileCol>
<MaxTileCol>16559</MaxTileCol>
<MinTileRow>17658</MinTileRow>
<MaxTileRow>18637</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>16</TileMatrix>
<MinTileCol>29987</MinTileCol>
<MaxTileCol>32713</MaxTileCol>
<MinTileRow>34885</MinTileRow>
<MaxTileRow>36820</MaxTileRow>
<MinTileCol>30358</MinTileCol>
<MaxTileCol>33118</MaxTileCol>
<MinTileRow>35316</MinTileRow>
<MaxTileRow>37275</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>17</TileMatrix>
<MinTileCol>59975</MinTileCol>
<MaxTileCol>65426</MaxTileCol>
<MinTileRow>69770</MinTileRow>
<MaxTileRow>73640</MaxTileRow>
<MinTileCol>60717</MinTileCol>
<MaxTileCol>66236</MaxTileCol>
<MinTileRow>70633</MinTileRow>
<MaxTileRow>74551</MaxTileRow>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>18</TileMatrix>
<MinTileCol>119950</MinTileCol>
<MaxTileCol>130853</MaxTileCol>
<MinTileRow>139540</MinTileRow>
<MaxTileRow>147280</MaxTileRow>
<MinTileCol>121434</MinTileCol>
<MaxTileCol>132472</MaxTileCol>
<MinTileRow>141266</MinTileRow>
<MaxTileRow>149102</MaxTileRow>
</TileMatrixLimits>
</TileMatrixSetLimits>
</TileMatrixSetLink>
Expand Down

0 comments on commit cd94bfa

Please sign in to comment.