天地图省级节点加载
天地图·江西
添加资源
在其资源中心页面中,有许多服务, 部分能预览并且可以直接加载到QGIS中去.
以2021年江西省7-18级影像
为例, 服务地址为: `https://jiangxi.tianditu.gov.cn/geostar/JX_IMG_2021/ 从该网页可以得到 KVP 风格的能力文档地址:
https://jiangxi.tianditu.gov.cn/geostar/JX_IMG_2021/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities
TIP
RSET 风格的地址 https://jiangxi.tianditu.gov.cn/geostar/JX_IMG_2021/wmts/1.0.0/WMTSCapabilities.xml , QGIS可以识别图层, 但是无法加载地图
添加到 QGIS 中后, JX_IMG_2021_7_18
图层有 3 个瓦片矩阵集Matrix_0
、Matrix_1
、Matrix_2
, 其中Matrix_0
无法加载、Matrix_2
有较大的偏移、Matrix_1
有微小的偏移.
在其能力文档的描述中, 对瓦片矩阵集的描述如下:
xml
<ows:ExtendedCapabilities>
<ows:Constraint name="GeoGlobeBuildVersion">
<ows:Value>7.6.21214</ows:Value>
</ows:Constraint>
<ows:Constraint name="96DPIPyramidType">
<ows:Value>JX_IMG_2021_7_18_Matrix_0</ows:Value>
</ows:Constraint>
<ows:Constraint name="OGCPyramidType">
<ows:Value>JX_IMG_2021_7_18_Matrix_1</ows:Value>
</ows:Constraint>
<ows:Constraint name="ArcGISPyramidType">
<ows:Value>JX_IMG_2021_7_18_Matrix_2</ows:Value>
</ows:Constraint>
</ows:ExtendedCapabilities>
其中 OGCPyramidType 是最适合 QGIS 加载的, 但是仍然会有一点点的偏移.
修正偏移
观察 OGCPyramidType 的矩阵集, 7级的ScaleDenominator
为4367821.452062846
, QGIS无偏正确的ScaleDenominator
为4367830.269199427
, 因此, 修改一下ScaleDenominator
就可以修改地图的偏移.
删除Matrix_0
、Matrix_2
瓦片矩阵集,修改Matrix_1
瓦片矩阵集中的ScaleDenominator
值.
TIP
<MatrixWidth>
和<MatrixHeight>
的值不需要动,否则可能出现瓦片缺失
修改后的 TileMatrixSet:
xml
<TileMatrixSet>
<ows:Identifier>JX_IMG_2021_7_18_Matrix_1</ows:Identifier>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG::4490</ows:SupportedCRS>
<TileMatrix>
<ows:Identifier>7</ows:Identifier>
<ScaleDenominator>4367830.269199427</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>107</MatrixWidth>
<MatrixHeight>24</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>8</ows:Identifier>
<ScaleDenominator>2183915.1345997173</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>213</MatrixWidth>
<MatrixHeight>47</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>9</ows:Identifier>
<ScaleDenominator>1091957.5672998542</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>425</MatrixWidth>
<MatrixHeight>94</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>545978.783649929</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>850</MatrixWidth>
<MatrixHeight>187</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>11</ows:Identifier>
<ScaleDenominator>272989.3918249645</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1699</MatrixWidth>
<MatrixHeight>373</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>136494.69591248178</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>3397</MatrixWidth>
<MatrixHeight>746</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>13</ows:Identifier>
<ScaleDenominator>68247.34795624108</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>6793</MatrixWidth>
<MatrixHeight>1491</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>14</ows:Identifier>
<ScaleDenominator>34123.67397812058</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>13585</MatrixWidth>
<MatrixHeight>2982</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>15</ows:Identifier>
<ScaleDenominator>17061.83698906029</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>27169</MatrixWidth>
<MatrixHeight>5964</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>16</ows:Identifier>
<ScaleDenominator>8530.918494530137</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>54338</MatrixWidth>
<MatrixHeight>11927</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>17</ows:Identifier>
<ScaleDenominator>4265.459247265068</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>108675</MatrixWidth>
<MatrixHeight>23853</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>18</ows:Identifier>
<ScaleDenominator>2132.729623632539</ScaleDenominator>
<TopLeftCorner>90.0 -180.0</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>217349</MatrixWidth>
<MatrixHeight>47705</MatrixHeight>
</TileMatrix>
</TileMatrixSet>
QGIS 似乎不能加载多时相的图层