简体   繁体   English

在地图上绘制时会裁剪Mapzen建筑物多边形

[英]Mapzen buildings polygons are clipped when draw on map

I have been using the Mapzen Vector Tile Service . 我一直在使用Mapzen Vector Tile Service。 When I request a certain area I get different results. 当我请求某个区域时,会得到不同的结果。

hxxps://tile.mapzen.com/mapzen/vector/v1/all/18/214238/114415.json?api_key=[my_key] hxxps://tile.mapzen.com/mapzen/vector/v1/all/18/214238/114415.json?api_key = [my_key]

Note: that my key is muted. 注意:我的按键已静音。

This is from mapzen 这是来自mapzen

This is from my server 这是从我的服务器

They are both called with the same parameter 18/214238/114415.json , however the request from my server have my buildings clipped. 它们都使用相同的参数18/214238/114415.json ,但是服务器发出的请求限制了我的建筑物。

I want the builds to be not clipped, I have tested that a building is bounded to 1 tile, if it is larger than the tile it will be clipped. 我希望构建不会被裁剪,我已经测试过将建筑物绑定到1个图块,如果该图块大于将被裁剪的图块,则该图块将被裁剪。 However Mapzen servers seems to not getting the clip issue so I am guessing there is something wrong with my settings. 但是,Mapzen服务器似乎没有出现剪辑问题,因此我猜我的设置有问题。

What setting am I missing? 我缺少什么设置? Is there any setting from tileserver,tileqeue or vectordata-source I am missing? 我缺少的tileserver,tileqeue或vectordata-source是否有任何设置?

Try the clip_factor parameter. 尝试使用clip_factor参数。

Here is Mapzen's configuration: https://github.com/tilezen/vector-datasource/blob/e87ac739b3e98f7c5363df3af06944bcec774c1c/queries.yaml#L231 这是Mapzen的配置: https : //github.com/tilezen/vector-datasource/blob/e87ac739b3e98f7c5363df3af06944bcec774c1c/queries.yaml#L231

A clip_factor: 3.0 will clip buildings only when they span more than three tiles. clip_factor: 3.0仅在建筑物跨越三个以上的图块时才对其进行裁剪。

We suspect you're using master of all the Tilezen repos instead of the latest tagged releases. 我们怀疑您使用的是所有Tilezen存储库的主版本,而不是最新的已标记版本。 The recommended production combo is documented in the release notes here (this is what's used in Mapzen's production stack today): 推荐的生产组合在此处的发行说明中有所记录(今天在Mapzen的生产堆栈中使用的组合):

https://github.com/tilezen/vector-datasource/releases/tag/v1.4.0-docs1 https://github.com/tilezen/vector-datasource/releases/tag/v1.4.0-docs1

Using v1.4.0 the clip_factor should be respected. 使用v1.4.0时,应注意clip_factor But that is currently not supported in master due to some large refactoring that's on-going. 但是,由于正在进行一些大的重构,因此master中目前不支持该功能。 We may add it back to solve some landuse kind intersection bugs we're seeing, but that work is not yet scheduled. 我们可以将其添加回去,以解决我们看到的一些土地用途的相交错误,但这项工作尚未安排。

If you want to hack on master yourself the relevant clip to expand is here: 如果您想自己掌握母带,可以在此处扩展相关剪辑:

https://github.com/tilezen/vector-datasource/blob/82127d1b1040ae6f1b9a38ab8b348cb3b6f97e4f/queries/planet_osm_polygon.jinja2#L17 https://github.com/tilezen/vector-datasource/blob/82127d1b1040ae6f1b9a38ab8b348cb3b6f97e4f/queries/planet_osm_polygon.jinja2#L17

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM