【发布时间】:2021-07-13 10:14:21
【问题描述】:
如何设置路线配置文件'foot'?使用默认配置文件“汽车”,我无法计算任何位置(在树林中)和附近人行道之间的距离。
我得到的错误信息是:
> Encoding does not match: Graphhopper config:
> foot|speed_factor=1.0|speed_bits=4|turn_costs=false|version=5 Graph:
> car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=2 Change
> configuration to match the graph or delete ...
> gelederland-latest.osm-gh/
我的代码是:
graphHopper = new GraphHopper().forMobile();
EncodingManager encodingManager = EncodingManager.create( FlagEncoderFactory.FOOT);
graphHopper.setEncodingManager(encodingManager);
graphHopper.setProfiles(Arrays.asList( new ProfileConfig("my_foot").setVehicle("foot").setWeighting("fastest")));
graphHopper.load(getRoutingDataFolder());
我使用的路由数据?首先,我通过http://download.geofabrik.de/europe/netherlands/gelderland.html 检索了原始 OSM 文件。之后我通过命令准备了 Graphhopper 路由数据:
./graphhopper.sh -a import -i gelderland-latest.osm.pbf
更新:这就够了吗?我正在尝试:
./graphhopper.sh -a import -p foot,bike,car -i netherlands-latest.osm.pbf
【问题讨论】:
标签: graphhopper