Mapbox矢量图块MVT缺少数据 [英] Mapbox vector tile MVT is missing data

查看:608
本文介绍了Mapbox矢量图块MVT缺少数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Mapbox MVT矢量图块制作自己的渲染器,但遇到了障碍,无法找到答案.我的问题是,从Mapbox服务器下载的MVT磁贴包含所有道路,但只有几个扩建数字(对于给定区域应该更多)而没有土地类型(在地图上为大面积)和建筑物.

有人遇到同样的问题或知道答案吗?

我用来下载图块的

链接是: https://api.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/18/143415/87627.mvt?access_token= {access_token}

相同区域的栅格图块下方:

解决方案

诀窍在于解码MVT切片(使用 mapbox-vector-tile-java ),以对其进行正确解析 MvtReader.RING_CLASSIFIER_V1 :

final JtsMvt result = MvtReader.loadMvt(f, new GeometryFactory(), new TagKeyValueMapConverter(), MvtReader.RING_CLASSIFIER_V1);

已解决,感谢在mapsforge/vtm上的粗体提交

I'm trying to make my own renderer for Mapbox MVT vector tiles, but I have hit the obstacle and couldn't find the answer. My problem is that MVT tile downloaded form Mapbox server contains all roads, but only a few bulding numbers (should be much more for given area) and no land types (grean area on map) and buildings.

Anyone had same problem or know the answer?

link I use to download tile is: https://api.mapbox.com/v4/mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7/18/143415/87627.mvt?access_token={access_token}

Below raster tile for the same area:

解决方案

The trick is in decoding MVT tiles (using mapbox-vector-tile-java), to parse it properly MvtReader.RING_CLASSIFIER_V1 needs to be used:

final JtsMvt result = MvtReader.loadMvt(f, new GeometryFactory(), new TagKeyValueMapConverter(), MvtReader.RING_CLASSIFIER_V1);

Resolved thanks to boldtrn commit on mapsforge/vtm

这篇关于Mapbox矢量图块MVT缺少数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆