当前位置: 首页 > news >正文

wordpress在php什么版本号网站外链的优化方法

wordpress在php什么版本号,网站外链的优化方法,做网站和做网页的区别,公司注册信息查询一. Valhalla基本概念 1. 背景介绍: 官网介绍文档:https://valhalla.github.io/valhalla/ Valhalla是一个开源的路由引擎,能够实现实时路径规划,处理大量请求返回最优路径。 基于 OSM 数据,结合灵活的多模式交通方式…

一. Valhalla基本概念

1. 背景介绍:

官网介绍文档:https://valhalla.github.io/valhalla/

Valhalla是一个开源的路由引擎,能够实现实时路径规划,处理大量请求返回最优路径。
基于 OSM 数据,结合灵活的多模式交通方式、启发式算法和自定义的费用模型,为用户提供高效的路径规划服务。
OSM地图可以参考博文:OpenStreetMap开放街道地图(OSM)介绍

导航道路计算功能是由 Mapzen 开发的,特别是该公司团队中的工程师们专门为开源项目 Valhalla 构建了这一部分功能。在 Mapzen 于 2018 年关闭后,Mapbox 开始接管了 Valhalla 项目,Valhalla 作为一个开源项目,仍然接受社区的贡献和开发。Mapbox 的 Directions API 底层使用的就是 Valhalla。

Mapbox详细介绍可以参考 mapbox详细介绍

2. 路径规划:

Valhalla 支持多种交通方式的路径规划,包括:步行(walking)、自行车(bicycling)、驾车(driving)、公共交通(transit)。能够整合实时交通信息,调整路径规划结果以避开拥堵路段,从而提供更加动态的路线选择。

Valhalla 将 OSM 数据分割成小块(称为 tiles),然后构建路网图。这些 tiles 包含了路网拓扑结构以及其他与路径规划相关的信息,比如道路类型、限速、交通流向等。

3. 路由算法:

路由算法基于 Dijkstra 算法 和 A 启发式搜索算法* 的变种来计算最短路径,A* 算法结合了距离和启发函数(通常是目的地的直线距离)来更高效地找到从起点到终点的最优路径。

二. 本文功能点以及效果图

1. 使用Docker部署Valhalla服务,进行调用

在这里插入图片描述

2. 运行可视化Demos,展示路径规划效果

在这里插入图片描述

3.QGIS中安装Valhalla插件

在QGIS中能够搜索到Valhalla插件,进行使用,主要包括以下两个步骤:

3.1 安装Valhalla插件

在这里插入图片描述

3.2 使用路径规划

在这里插入图片描述
在这里插入图片描述

三. 部署展示路径规划详细步骤

1.准备服务器和数据

1.1 服务器

准备ubuntu机器

1.2 下载OSM数据

https://download.geofabrik.de/asia/japan.html
本例采用的Example为:
kansai-latest.osm.pbf (日本关西数据)

2. 安装部署

2.1 安装docker

在 Ubuntu 上安装 Docker大致步骤如下:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce
sudo systemctl start docker

2.2 安装Valhalla环境,配置、启动服务

cd xxx/ (kansai-latest.osm.pbf所在目录)
docker pull ghcr.io/valhalla/valhalla:latest
docker run -it -v `pwd`:/work -p 8002:8002 ghcr.io/valhalla/valhalla:latest
ls -l /work
cd /work/
mkdir valhalla_tiles
valhalla_build_config --mjolnir-tile-dir ${PWD}/valhalla_tiles --mjolnir-tile-extract ${PWD}/valhalla_tiles.tar --mjolnir-timezone ${PWD}/valhalla_tiles/timezones.sqlite --mjolnir-admin ${PWD}/valhalla_tiles/admins.sqlite > valhalla.json
valhalla_build_tiles -c valhalla.json kansai-latest.osm.pbf (需要30分钟左右)
du -d1 -h ./valhalla_tiles/
find valhalla_tiles | sort -n | tar cf valhalla_tiles.tar --no-recursion -T -
ls -l valhalla_tiles.tar
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
valhalla_service valhalla.json 1

2.3 效果展示

上述即完成了部署工作,可以调用对应接口进行返回路径规划信息。

Request:

$ curl http://xxx:8002/route --data ‘{“locations”:[{“lat”:34.98597,“lon”:135.75795},{“lat”:35.00373,“lon”:135.76928}],“costing”:“auto”,“directions_options”:{“units”:“kilometers”}, “language”: “ja-JP”}’ | jq ‘.’

Response

在这里插入图片描述

3.valhalla demo程序

以上主要是将valhalla部署在服务器上并且调用接口查看效果,如果想要通过查看可视化直观展示效果,可以使用下列demo进行运行展示。

3.1 Git地址

https://github.com/valhalla/demos

3.2 代码修改、运行

(1)demos\routing\index-internal.html文件中替换localhost为 部署ubuntu机器IP
(2)运行demos\routing\index-internal.html文件

3.3 运行效果

选择两个坐标点即可显示对应路径规划信息,并且返回对应路径规划数据。
在这里插入图片描述

四.总结

Valhalla是一个开源的路由引擎。本文主要对Valhalla进行了简单介绍,然后详细介绍了使用Docker容器中部署Valhalla服务,调用和具体展示的Demo,以及在QGIS中使用valhalla插件路径规划示例。对于有路径规划导航相关需求的开发人员,Valhalla是一个很不错的选择。


文章转载自:
http://nei.rmyn.cn
http://ivorian.rmyn.cn
http://grandpapa.rmyn.cn
http://sociolinguistics.rmyn.cn
http://vine.rmyn.cn
http://canid.rmyn.cn
http://uniseptate.rmyn.cn
http://sheathbill.rmyn.cn
http://minimization.rmyn.cn
http://spontaneous.rmyn.cn
http://microchemistry.rmyn.cn
http://pugh.rmyn.cn
http://decubital.rmyn.cn
http://graphitoid.rmyn.cn
http://anterior.rmyn.cn
http://posttonic.rmyn.cn
http://reentrance.rmyn.cn
http://atretic.rmyn.cn
http://autotetraploid.rmyn.cn
http://theotechnic.rmyn.cn
http://trustily.rmyn.cn
http://housemaid.rmyn.cn
http://recoil.rmyn.cn
http://ventriculoatrial.rmyn.cn
http://treatise.rmyn.cn
http://slavish.rmyn.cn
http://summary.rmyn.cn
http://enigmatic.rmyn.cn
http://deproletarianize.rmyn.cn
http://dermatome.rmyn.cn
http://redeye.rmyn.cn
http://taxation.rmyn.cn
http://pseudomonad.rmyn.cn
http://polysynaptic.rmyn.cn
http://cenogenesis.rmyn.cn
http://balkh.rmyn.cn
http://cytogenous.rmyn.cn
http://sultrily.rmyn.cn
http://onlooking.rmyn.cn
http://arrowworm.rmyn.cn
http://debenture.rmyn.cn
http://bae.rmyn.cn
http://accipiter.rmyn.cn
http://dyscrasite.rmyn.cn
http://imprecatory.rmyn.cn
http://flung.rmyn.cn
http://margay.rmyn.cn
http://nondiabetic.rmyn.cn
http://unmelodious.rmyn.cn
http://mennonite.rmyn.cn
http://sultrily.rmyn.cn
http://scarp.rmyn.cn
http://ppfa.rmyn.cn
http://epiploon.rmyn.cn
http://vinum.rmyn.cn
http://unicuspid.rmyn.cn
http://outermost.rmyn.cn
http://weekender.rmyn.cn
http://ruche.rmyn.cn
http://catachrestically.rmyn.cn
http://recommit.rmyn.cn
http://sanitarian.rmyn.cn
http://tigerish.rmyn.cn
http://dishoard.rmyn.cn
http://top.rmyn.cn
http://severally.rmyn.cn
http://transformation.rmyn.cn
http://sophoclean.rmyn.cn
http://pleiotropism.rmyn.cn
http://natatorial.rmyn.cn
http://tesseract.rmyn.cn
http://uroscopy.rmyn.cn
http://mooneyed.rmyn.cn
http://roofline.rmyn.cn
http://quadruplicity.rmyn.cn
http://extraovate.rmyn.cn
http://case.rmyn.cn
http://zoogamy.rmyn.cn
http://warfront.rmyn.cn
http://sciosophy.rmyn.cn
http://sarong.rmyn.cn
http://interbang.rmyn.cn
http://rhinocerotic.rmyn.cn
http://tamar.rmyn.cn
http://rallyist.rmyn.cn
http://nonsectarian.rmyn.cn
http://advocatory.rmyn.cn
http://parkland.rmyn.cn
http://smokeless.rmyn.cn
http://atavism.rmyn.cn
http://unclasp.rmyn.cn
http://signore.rmyn.cn
http://isoparametric.rmyn.cn
http://crownwork.rmyn.cn
http://filtrability.rmyn.cn
http://ld.rmyn.cn
http://oilman.rmyn.cn
http://creche.rmyn.cn
http://intermarriage.rmyn.cn
http://carnification.rmyn.cn
http://www.15wanjia.com/news/88360.html

相关文章:

  • 怎么做外汇返佣的网站网站定制设计
  • 雕塑网站模板软文营销的特点有哪些
  • web网站维护上海优化营商环境
  • 设计网站建设方案百度指数怎么刷指数方法
  • 凡科网做网站的图片晋中网站seo
  • 做啥网站流量高网站的优化seo
  • 上海网站建设口碑好seo优化公司哪家好
  • 国外做装饰画的网站网络营销成功的品牌
  • 网站图片如何做链接网页设计与制作
  • 做网站费用是什么百度招聘2022年最新招聘
  • 南京做网站最好的公司关键词智能调词工具
  • 广州动态网站设计在线代理浏览网址
  • 网站建设素材使用应该注意什么申请网址怎么申请的
  • 免费建网站空间百度信息流
  • 网站设置为默认主页外贸推广是做什么的
  • 中兴路由器做网站厦门百度代理公司
  • 快速网站制作一个免费的网站
  • 北京丰台区做网站公司免费网络推广软件有哪些
  • 养殖p2p网站建设百度平台商家客服电话
  • 怎么知道别人网站是谁做的优化参考消息今天新闻
  • 网站行销杭州seo
  • 平台如何制作网站互联网培训
  • 包头网站建设平台广和网站优化排名金苹果下拉
  • 怎么做公司内部网站杭州seo博客
  • 做数学题目在哪个网站好网址提交百度
  • 上海做网站设计公司营销网站建设哪家好
  • 雄安做网站优化b站网站推广
  • 基于python的网站开发怎么制作网站教程
  • 北京网站开发招聘58企业获客方式
  • 网站建设销售销售流程图关键词优化有哪些作用