Google Maps and Bing Maps are drifting away. I won’t say why. What I want to share with you today is how to use QGIS XYZ Tiles to access the four major map services with Internet map service qualifications, including Tianditu, Gaode Map, Tencent Map and Baidu Map. All URLs can be opened and used in the pro-test. The method and import file are in section 05.
01 day map
Tiantu has released four types of data: vector, image, terrain and global boundary, and provides two types of coordinate systems: spherical Mercator projection and latitude and longitude coordinate system. You can choose the corresponding base map according to your needs.
-
Spherical Mercator projection
Vector :
https://t3.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Vector notes :
http://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Vector English Note :
http://t0.tianditu.gov.cn/eva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=eva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Image :
http://t0.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk=ec899a50c7830ea2416ca182285236f3
Image annotation :
http://t0.tianditu.gov.cn/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk=ec899a50c7830ea2416ca182285236f3
English annotations of the image :
http://t0.tianditu.gov.cn/eia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=eia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Terrain shading :
http://t0.tianditu.gov.cn/ter_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ter&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Terrain shading notes :
http://t0.tianditu.gov.cn/cta_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cta&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Global boundary :
http://t0.tianditu.gov.cn/ibo_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ibo&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
-
Longitude and Latitude Coordinate System
Vector :
http://t0.tianditu.gov.cn/vec_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Vector notes :
http://t0.tianditu.gov.cn/cva_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Vector English Note :
http://t0.tianditu.gov.cn/eva_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=eva&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Image :
http://t0.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Image annotation :
http://t0.tianditu.gov.cn/cia_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
English annotations of the image :
http://t0.tianditu.gov.cn/eia_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=eia&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Terrain :
http://t0.tianditu.gov.cn/ter_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ter&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Topography Note :
http://t0.tianditu.gov.cn/cta_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cta&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
Global boundary :
http://t0.tianditu.gov.cn/ibo_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ibo&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
02 Gaode Map
Image :
https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}
Vector :
http://webrd03.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}
Road network (without notes) :
https://wprd02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=8
Road network (including notes) :
https://wprd02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=8
03 Tencent Map
Tencent Road Network :
http://rt0.map.gtimg.com/tile?z={z}&x={x}&y={-y}&type=vector&styleid=3&version=628
04 Baidu Map
Vector :
https://maponline3.bdimg.com/tile/?qt=vtile&x={x}&y={-y}&z={z}&styles=pl&udt=20210108&scaler=1&showtext=1
05 How to use
You can manually enter the URL. Open QGIS, find the [XYZ Tiles] node in the browser panel, right-click, select [New Connection...], in the pop-up dialog box, enter any character as the name, such as "Sky Map Vector", and then fill in the corresponding URL Address is fine.
In addition to importing one by one, QGIS also provides a batch import method. The URL compiled in this article has been exported as an XML file and uploaded to Baidu SkyDrive. The connection is:
Link: https://pan.baidu.com/s/1f5WbPmUTu2preNXjR4spIQ
Extraction code: gi1u
Friends in need can download the file and import it into QGIS in batches, eliminating the need for manual input one by one. The steps for batch import are: right-click the [XYZ Tiles] node, select [Load Connection...], browse the local directory to find the downloaded XML file, and you can see the map connection name contained in the file in the pop-up [Manage Connections] dialog box , Click [Select All] -> [Import] button to import all the connections contained in the file into QGIS.
06 A few notes
1.
To access Tianditu, you need to register and apply for permission. Note that when creating the Tianditu application, you should select the "browser side" application type, and then replace the generated key with the tk parameter value in the URL provided in this article. For example, the URL of the Mercator projection vector basemap is:
https://t3.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileRow={y}&TileCol={x}&tk=ec899a50c7830ea2416ca182285236f3
The red part uses my own key. If the key quota exceeds the limit and cannot be accessed, you can replace it with your own key.
2.
Each manufacturer generally provides XYZ tile services by multiple servers. For example, the second-level domain name of Tiandi is composed of t0-t7, representing 8 servers, so when using URL, any second-level domain name can be accessed normally, such as : Http:// t2 .tianditu.gov.cn/vec_c/wmts?tk=your key.
3.
The tiles of Tencent Maps are organized by TMS (Tile Map Service), and their origin is in the lower left corner, so the y parameter in the URL can be reversed to display normally, and in QGIS, the map with a zoom level less than 4 is blank, so If the map window is blank when the Tencent map is in the full map state, don't worry, you can see the map after zooming in to level 4.
4.
Baidu Map uses its own coordinate system, which cannot be superimposed with other base maps. Similarly, if you find that the map window is blank, zoom in to the lower left corner to see the map.
Copyright Notice
This article welcomes reprinting, please indicate the source when reprinting.