graphhopper

Reading OSM Map (or other format) files to determine shortest distance from coordinate to path

南楼画角 提交于 2020-04-19 11:43:43
问题 My App uses openstreetmap files to show waypoint (or coordinates) on a map. Based on an Openstreet map file: how can I determine the shortest distance from a GPS coordinate to the (walking) path. Can I read an OSM (map) or .osm file ... to access the paths? 回答1: There are some misconceptions. First, the OSM file is not the map file. The OSM file can be used to create a format to make map rendering fast e.g. mapsforge format does this. With e.g. GraphHopper you import the OSM file like .pbf or

Reading OSM Map (or other format) files to determine shortest distance from coordinate to path

…衆ロ難τιáo~ 提交于 2020-04-19 11:41:28
问题 My App uses openstreetmap files to show waypoint (or coordinates) on a map. Based on an Openstreet map file: how can I determine the shortest distance from a GPS coordinate to the (walking) path. Can I read an OSM (map) or .osm file ... to access the paths? 回答1: There are some misconceptions. First, the OSM file is not the map file. The OSM file can be used to create a format to make map rendering fast e.g. mapsforge format does this. With e.g. GraphHopper you import the OSM file like .pbf or

Reading OSM Map (or other format) files to determine shortest distance from coordinate to path

為{幸葍}努か 提交于 2020-04-19 11:41:23
问题 My App uses openstreetmap files to show waypoint (or coordinates) on a map. Based on an Openstreet map file: how can I determine the shortest distance from a GPS coordinate to the (walking) path. Can I read an OSM (map) or .osm file ... to access the paths? 回答1: There are some misconceptions. First, the OSM file is not the map file. The OSM file can be used to create a format to make map rendering fast e.g. mapsforge format does this. With e.g. GraphHopper you import the OSM file like .pbf or

Graphhopper: ClassCastException when calculating path with CH Astar/Dikstra Bi

谁都会走 提交于 2020-01-06 18:26:10
问题 Using only WGS84 coordinates I can write the graph and index to disk. In another java project I read graph and index from disk. This also works fine with the following code. FlagEncoder encoder = new CarFlagEncoder(); EncodingManager em = new EncodingManager(encoder); GraphBuilder gb = new GraphBuilder(em). setLocation(testDir). setStore(true). setCHGraph(new FastestWeighting(encoder)); // Load and use the graph GraphHopperStorage graph = gb.load(); // Load index LocationIndex index = new

How to Quickstart Graphhopper with my own multimodal graph

跟風遠走 提交于 2020-01-01 07:13:14
问题 I would like to implement my own routing web service in play framework (due to the fact that it's java and it's a rapid prototyping framework). I also would like to use graphhopper as the routing engine. My Basic requirements are: The routing should be based on our own multimodal graph database (consisting of EDGES/LINKS and NODES and also different properties to derive weights from I want to be able to select different properties for edge weighting during runtime (i.e. an emergency vehicle

Using OSM node/way id in Graphhopper

纵饮孤独 提交于 2019-12-24 16:36:59
问题 I want to use Graphhopper for routing, by marking start and stop points using their OSM id instead of lat,lon coordinates. Is this possible? Is it also possible to get an edge using its OSM id? Thanks 回答1: I do not see the use for GraphHopper, although it can be handy to have for other applications (not sure) but there are drawbacks. E.g. one OSM id matches to a list of edge ids, also the OSM id is not static and therefor not recommended to be used as identifier. E.g. assume the case where

Get Distance per Country with Graphhopper

徘徊边缘 提交于 2019-12-13 05:21:51
问题 We have a running Graphhopper Server in our company for getting routes. Is there a way to find out how far we are driving in each country? e.g if I'm driving from Munich to Vienna I would like to know how many km we are driving in Germany and how many in Austria. 回答1: This is not yet possible out of the box. You'll have to create a feature request for this or implement this on your own: grab the country boundaries, identify the edges/nodes to mark in the graph and then create additional

Graphhopper Route for Pedestrian android

六眼飞鱼酱① 提交于 2019-12-13 02:54:51
问题 How do i set route type to Pedestrian in Graphhopper android? I have been using GHRequest.setVehicle() method in android, and it does not work. I have tried using "foot", and "bike". None worked. Also, it doesn't work when i changed Algorithms too. Only Dijkstra_BI is working now. GHRequest req = new GHRequest(fromLat, fromLon, toLat, toLon). setAlgorithm(Algorithms.DIJKSTRA_BI).setVehicle("foot"); Thanks in Advance. The map data that i have contain following files. I am getting the following

how to enable hybrid mode in graphhopper for traffic data

北城余情 提交于 2019-12-12 04:15:45
问题 how to enable hybrid mode for graphhopper 0.9 version. in the config file, what all we need to enable/disable/change my intention is to use traffic data using the link graphhopper-traffic-data-integration i am not able make it work, when i feed the data using curl, i get below error { "message" : "Not found" } i tried changing the prepare.ch.weightings=hybrid but i get error now web. JAVA_OPTS=-Xmx1000m -Xms1000m -server Exception in thread "main" java.lang.IllegalArgumentException: weighting

Route not found that should be routable on own Graphhopper installation

孤街浪徒 提交于 2019-12-12 03:14:38
问题 The Problem : On my Graphhopper (GH) installation, there are some cases that are not routable, that should be routable in my opinion. The same route is routable on the GH Demo version, while my installation uses the latest GH code. Examples : This route is plannable on GH demo server while I'm getting a "not found" error on my machine. Though when I call the second point in the locationIndex : LocationIndex index = hopper.getLocationIndex(); QueryResult qr = index.findClosest( place.lat,