首页 > 其他分享 >valhalla瓦片标准和相关代码

valhalla瓦片标准和相关代码

时间:2023-04-18 09:36:20浏览次数:44  
标签:tiles degree level 代码 Level 瓦片 roads world valhalla

Hierarchies/Levels

Tiles are split up into three levels or hierarchies. Hierarchy 0 contains edges pertaining to roads that are considered highway (motorway, trunk, and primary) roads and are stored in 4 degree tiles. Hierarchy 1 contains roads that are at a arterial level (secondary and tertiary) and are saved in 1 degree tiles. Finally, Hierarchy 2 contains roads that are considered at a local level (unclassified, residential, and service or other). These tiles are saved in .25 degree tiles.

So in python, the levels are defined as:

valhalla_tiles = [{'level': 2, 'size': 0.25}, {'level': 1, 'size': 1.0}, {'level': 0, 'size': 4.0}]

The World at Level 0

The following image shows the world at level 0. Using a world bounding box (-180, -90, 180, 90) the world is split up into 4 degree tiles. The rows and columns start from the bottom left and increase to the top right. Tiles are row ordered increasing from west to east.

 

 


Image generated using http://geojson.io

 

Using a bounding box for Germany, Pennsylvania, and NYC we can show how the regions would be split up into the 3 levels. Level 0 is colored in light blue. Level 1 is light green and level 2 is light red.

 



标签:tiles,degree,level,代码,Level,瓦片,roads,world,valhalla
From: https://www.cnblogs.com/aoldman/p/17328389.html

相关文章

  • 用postman模拟“授权代码授予”模式下获取Azure的用户信息(UserInfo)
    用postman模拟“授权代码授予”模式下获取Azure的用户信息(UserInfo)1.准备参数:图1:图2:2.调用:点击按钮“GetNewAccessToken”,如果成功那么会弹出如下对话框:3.读取AccessToken:点击按钮“Proceed”,如果成功那么会弹出如下对话框:4.调用UserInfo:点击按钮“UseToken......
  • 初学者代码训练Day2(c/c++)
    题目接收两个双精度浮点型数据 a 和 b。输出一个浮点数表示两数相加的结果。(结果保留两位小数)要求:创建两个浮点型变量 a,b。创建两个浮点型指针变量 pa,pb 并分别将其储存的地址设为 a 的地址和 b 的地址。不要使用 a+=b 而是通过指针将变量 b 的值加到变量......
  • 你不卖代码,您出售问题的解决方案。
    不要让客户自我诊断当您在一家软件公司工作时,很容易想到“代码就是我们出售的东西”。这不是真的。对于购买你产品的人来说,他们不关心它用了多少行代码。您如何构建软件并不重要。唯一重要的是——它能解决真正的问题吗?工程与商业在我工作过的许多组织中,存在分歧。工程团队......
  • 【路径规划】基于人工势场法实现多机器人系统的群集编队控制附matlab代码
    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。......
  • 【蝴蝶算法】基于随机惯性权重策略+最优邻域扰动策略+动态转换概率策略的蝴蝶算法求解
    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。......
  • 告别StringUtil:使用Java 11的全新String API优化你的代码
    前言  Java11是Java编程语言的一次主要更新,引入了许多新功能和改进。并且在String类中引入了一些新的方法,能够更好地满足开发的需求,提高编程效率。repeat(intcount):返回一个新的字符串,该字符串是由原字符串重复指定次数形成的。isBlank():检查字符串是否为空白字符序......
  • 百鸡百钱流程图与代码
    问题描述:我国古代数学家张丘建在《算经》一书中曾提出过著名的“百钱买百鸡”问题,该问题叙述如下:鸡翁一,值钱五;鸡母一,值钱三;鸡雏三,值钱一;百钱买百鸡,则翁、母、雏各几何?翻译过来,意思是公鸡一个五块钱,母鸡一个三块钱,小鸡三个一块钱,现在要用一百块钱买一百只鸡,问公鸡、母鸡、小鸡各......
  • 《代码大全》阅读笔记1
    第一部分打好基础第2章隐喻重要的研发成果常常产自类比(analogy)。通过把你不太理解的东西和一些你较为理解、且十分类似的东西做比较,你可以对这些不太理解的东西产生深刻的理解。这种使用隐喻的方法叫做“建模”。目前最合适隐喻:建造软件(BuildingSoftware)第3章前期准备(Measu......
  • 如何将之前编辑的文章HTML源代码导入到TinyMCE编辑器中
    如果你想用TinyMCE来修改你之前写的文章那么你需要将源代码放到TinyMCE中,如果服务器把HTML源码发给我们可是我们应该怎样调用?方法为使用 tinymce.activeEditor.setContent()这个函数具体用法为:tinymce.activeEditor.setContent()//设置TinyMCE编辑器里的内容源代码tin......
  • python魔术方法学习总结代码
    classmyclass:name=Noneage=Nonedef__init__(self,name,age):"""魔术方法!!!类的构造方法:paramname::paramage:"""self.name=nameself.age=age......