在QGis中打开Mapbox地图

编程入门 行业动态 更新时间:2024-10-20 08:44:06
本文介绍了在QGis中打开Mapbox地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在寻找一种在QGis中显示我的Mapbox地图的方法(在mapbox上编辑的基本图层以及从tilemill上载的数据).

I'm looking for a way to display one of my Mapbox map in QGis (baselayer edited on mapbox & data uploaded from tilemill).

这里有人已经找到方法了吗?有功能或插件可以做到这一点吗?

Did someone here already find a way ? Is there a feature or a plugin to do that ?

感谢您将来的回答!

Adrien

推荐答案

昨天,我自己找到了两个解决方案:

Yesterday, I found two solutions by myself :

1)漂亮的官方"TileLayer插件" QGis插件

您必须编写一个TSV文件(制表符分隔值),至少要包含Mapbox地图的名称,名称和URL.该网址应如下所示:

You'll have to write a TSV file (Tab Separated Values) with, at least, the name, the credits and the URL of your Mapbox map. The URL should look like :

a.tiles.mapbox/v3/mapboxId.mapId/{z}/{x}/{y}.png

您只需要用您的ID替换mapboxId和mapId.请参阅插件的github存储库,以获取更多信息和要添加到您的TSV文件中的值(minZoom,maxZoom等).

You just have to replace mapboxId and mapId with your ids. See the github repository of the plugin for further informations and values to add to your TSV file (minZoom, maxZoom, etc).

然后,在插件的设置"菜单中,将插件链接到TSV文件的目录(外部图层目录").

Then, in the "settings" menu of the plugin, link the plugin to the directory of your TSV file ("external layers directory").

最后,在插件的添加"菜单中,选择您的地图,然后单击添加".

Finally, in the "add" menu of the plugin, select your map and click "add".

2)一个解释为栅格的XML文件

使用以下代码编写XML文件:

Write a XML file with this code :

<GDAL_WMS> <Service name="TMS"> <ServerUrl>a.tiles.mapbox/v3/mapboxId.mapId/${z}/${x}/${y}.png</ServerUrl> </Service> <DataWindow> <UpperLeftX>-20037508.34</UpperLeftX> <UpperLeftY>20037508.34</UpperLeftY> <LowerRightX>20037508.34</LowerRightX> <LowerRightY>-20037508.34</LowerRightY> <TileLevel>18</TileLevel> <TileCountX>1</TileCountX> <TileCountY>1</TileCountY> <YOrigin>top</YOrigin> </DataWindow> <Projection>EPSG:3857</Projection> <BlockSizeX>256</BlockSizeX> <BlockSizeY>256</BlockSizeY> <BandsCount>3</BandsCount> <Cache /> </GDAL_WMS>

再次,用您的ID替换ID.然后,以QGis文件格式打开文件.

Once again, replace the ids with yours. Then, open the file in QGis as a raster.

更多推荐

在QGis中打开Mapbox地图

本文发布于:2023-10-13 10:11:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1487663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:地图   QGis   Mapbox

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!