Comments (27)
Merged branch with a fix https://github.com/graphhopper/map-matching/compare/issue_13
from map-matching.
If you change the separatedSearchDistance (to a higher value or something) is this fixed?
from map-matching.
No this did not fix it.
The GPX file I try to match is the below. I try to match it to the Istanbul Metro Extract.
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" version="1.0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd" creator="gpx.py -- https://github.com/tkrajina/gpxpy">
<trk>
<name/>
<type/>
<desc/>
<trkseg>
<trkpt lat="41.0119089" lon="29.08910865">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0118916" lon="29.0892053">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0118725" lon="29.08929845">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01185135" lon="29.08939115">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0118263" lon="29.0894814">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0117989" lon="29.08956945">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0117678" lon="29.08965675">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0117371" lon="29.089747">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0117079" lon="29.08983775">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01167605" lon="29.08992865">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01164325" lon="29.09002255">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.011612" lon="29.0901183">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0115803" lon="29.0902159">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01154605" lon="29.09031725">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01151005" lon="29.09042">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01147355" lon="29.09052405">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01143775" lon="29.0906194">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0114005" lon="29.09071235">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0113635" lon="29.0908039">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01132835" lon="29.0908926">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0112937" lon="29.09098185">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0112593" lon="29.09107005">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0112247" lon="29.0911578">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0111918" lon="29.09124565">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0111619" lon="29.0913338">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.011134" lon="29.0914224">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0111091" lon="29.09151445">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.0110886" lon="29.09160745">
<time>2015-01-01T11:35:02Z</time></trkpt>
<trkpt lat="41.01107275" lon="29.09170405">
<time>2015-01-01T11:35:02Z</time></trkpt></trkseg></trk></gpx>
from map-matching.
Hmmh, I'll have a look in the next days
from map-matching.
Thanks!
from map-matching.
Hmmh, I cannot reproduce this with a car profile. Which profile did you use?
from map-matching.
Where can I set the profile? I guess I used the default profile.
from map-matching.
Hmmh, okay, the default was 'car'. (There is a new command line option 'vehicle=car', the old would have been too hidden via a config.properties)
from map-matching.
I'll give it a try again on Monday with the latest build and let you know my results.
Also we should add this parameter to the readme.
On Feb 27, 2015, at 9:21 PM, Peter [email protected] wrote:
Hmmh, okay, the default was 'car'. (There is a new command line option 'vehicle=car', the old would have been too hidden via a config.properties)
—
Reply to this email directly or view it on GitHub.
from map-matching.
Its already there ;)
from map-matching.
Hm, after cloning the latest build I get the following error:
$ ./map-matching.sh action=match gpx=test.gpx
Exception in thread "main" java.lang.NullPointerException
at com.graphhopper.GraphHopper.getFirstVehicle(GraphHopper.java:128)
at com.graphhopper.GraphHopper.init(GraphHopper.java:602)
at com.graphhopper.matching.MapMatchingMain.start(MapMatchingMain.java:56)
at com.graphhopper.matching.MapMatchingMain.main(MapMatchingMain.java:39)
from map-matching.
That is a GraphHopper issue. I'll fix.
from map-matching.
Would you update the graphhopper and map-matching repo?
from map-matching.
I have the latest map-matching repo. Though I am not using the graphhopper repo. It least I am not aware of it.
from map-matching.
Okay. Then you fetch graphhopper this via the snapshot repo. (which is currently rebuild only every 8 hours or so). You'll have to get it and install it or what 2 hours (will be build at 11 German time again I think)
from map-matching.
I'll wait and let you know what it does after lunch. Thanks for your help meanwhile!
from map-matching.
From this snapshot repo it'll get the version (BTW: it is 12:00 not 11)
from map-matching.
Still get the same error. Probable because I have the wron GrapHopper version. It says:
2015-03-02 13:32:43,830 [main] INFO com.graphhopper.GraphHopper - version 0.4|2015-02-27T17:00:27+0000 (4,11,3,2,2)
Where can I set which GrapHopper it should use/fetch?
from map-matching.
you clone the GraphHopper repo and install it locally: mvn clean install -DskipTests=true
(this will copy a jar into ~/.m2/repository/...)
from map-matching.
Okay, got it to work. However still matches like before. I used the car profile.
Here the full log:
ulrichs-mbp:map-matching ustroetz$ ./map-matching.sh action=import datasource=istanbul_turkey.osm.pbf [vehicle=car]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Map Matching 0.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ map-matching ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ map-matching ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /Users/ustroetz/projects/map-matching/target/classes
[WARNING] /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java: /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java uses unchecked or unsafe operations.
[WARNING] /Users/ustroetz/projects/map-matching/src/main/java/com/graphhopper/matching/MapMatching.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ map-matching ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ map-matching ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /Users/ustroetz/projects/map-matching/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ map-matching ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ map-matching ---
[INFO] Building jar: /Users/ustroetz/projects/map-matching/target/map-matching-0.4-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ map-matching ---
[INFO] Installing /Users/ustroetz/projects/map-matching/target/map-matching-0.4-SNAPSHOT.jar to /Users/ustroetz/.m2/repository/com/graphhopper/map-matching/0.4-SNAPSHOT/map-matching-0.4-SNAPSHOT.jar
[INFO] Installing /Users/ustroetz/projects/map-matching/pom.xml to /Users/ustroetz/.m2/repository/com/graphhopper/map-matching/0.4-SNAPSHOT/map-matching-0.4-SNAPSHOT.pom
[INFO]
[INFO] --- maven-assembly-plugin:2.5.2:single (default-cli) @ map-matching ---
[INFO] Building jar: /Users/ustroetz/projects/map-matching/target/map-matching-0.4-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.501 s
[INFO] Finished at: 2015-03-02T13:55:35+01:00
[INFO] Final Memory: 27M/212M
[INFO] ------------------------------------------------------------------------
2015-03-02 13:55:35,876 [main] INFO com.graphhopper.GraphHopper - version 0.4|2015-03-02T12:51:04+0000 (4,11,3,2,2)
2015-03-02 13:55:35,891 [main] INFO com.graphhopper.GraphHopper - graph GraphHopperStorage|car|RAM_STORE|2D|NoExt|,,,,, details:edges:0(0), nodes:0(0), name: /(0), geo:0(0), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308
2015-03-02 13:55:35,906 [main] INFO com.graphhopper.GraphHopper - start creating graph from istanbul_turkey.osm.pbf
2015-03-02 13:55:35,907 [main] INFO com.graphhopper.GraphHopper - using GraphHopperStorage|car|RAM_STORE|2D|NoExt|,,,,, memory:totalMB:123, usedMB:10
2015-03-02 13:55:36,988 [main] INFO com.graphhopper.reader.OSMReader - creating graph. Found nodes (pillar+tower):583 959, totalMB:221, usedMB:148
2015-03-02 13:55:37,629 [main] INFO com.graphhopper.reader.OSMReader - 824 781, now parsing ways
2015-03-02 13:55:39,722 [main] INFO com.graphhopper.reader.OSMReader - 960 167, now parsing relations
2015-03-02 13:55:39,725 [main] INFO com.graphhopper.reader.OSMReader - finished way processing. nodes: 199503, osmIdMap.size:584047, osmIdMap:8MB, nodeFlagsMap.size:88, relFlagsMap.size:0 totalMB:500, usedMB:186
2015-03-02 13:55:39,726 [main] INFO com.graphhopper.reader.OSMReader - time(pass1): 1 pass2: 2 total:3
2015-03-02 13:55:39,731 [main] INFO com.graphhopper.GraphHopper - start finding subnetworks, totalMB:500, usedMB:186
2015-03-02 13:55:39,920 [main] INFO com.graphhopper.routing.util.PrepareRoutingSubnetworks - optimize to remove subnetworks (311), zero-degree-nodes (0), unvisited-dead-end-nodes(-1), maxEdges/node (8)
2015-03-02 13:55:40,192 [main] INFO com.graphhopper.GraphHopper - edges: 293559, nodes 197990, there were 311 subnetworks. removed them => 1513 less nodes. Remaining subnetworks:2
2015-03-02 13:55:40,192 [main] INFO com.graphhopper.GraphHopper - optimizing ... (totalMB:500, usedMB:192)
2015-03-02 13:55:40,192 [main] INFO com.graphhopper.GraphHopper - finished optimize (totalMB:500, usedMB:192)
2015-03-02 13:55:40,617 [main] INFO com.graphhopper.storage.index.LocationIndexTree - location index created in 0.4226492s, size:233 894, leafs:18 680, precision:300, depth:4, entries:[64, 64, 4, 4], entriesPerLeaf:12.521092
2015-03-02 13:55:40,620 [main] INFO com.graphhopper.GraphHopper - flushing graph GraphHopperStorage|car|RAM_STORE|2D|NoExt|4,11,3,2,2, details:edges:293 559(9), nodes:197 990(3), name: /(1), geo:825 092(4), bounds:28.313012122653696,29.67797695870646,40.73816945563635,41.42083040820428, totalMB:500, usedMB:261)
ulrichs-mbp:map-matching ustroetz$ ./map-matching.sh action=match gpx=test.gpx
2015-03-02 13:56:04,607 [main] INFO com.graphhopper.matching.MapMatchingMain - loading graph from cache
2015-03-02 13:56:04,693 [main] INFO com.graphhopper.matching.MapMatchingMain - Setup lookup index. Accuracy filter is at 15m
2015-03-02 13:56:04,696 [main] INFO com.graphhopper.matching.MapMatchingMain - Now processing 1 files
test.gpx
matches: 7, gps entries:29
gpx length: 237.48259 vs 262.51987
gpx time: 0.0 vs 29.699
export results to:/Users/ustroetz/projects/map-matching/test.gpx.res.gpx
gps import took:0.019526549s, match took: 0.12543204
ulrichs-mbp:map-matching ustroetz$ ./map-matching.sh action=import datasource=istanbul_turkey.osm.pbf [vehicle=car]
from map-matching.
Can you create an integration or even better unit test for it? Maybe we use different PBF files
from map-matching.
I am using this PBF file: https://s3.amazonaws.com/metro-extracts.mapzen.com/istanbul_turkey.osm.pbf
I will look into integration or unit test tomorrow morning.
from map-matching.
I can't find anything in the documentation about integration or unit tests. Maybe you can reference me to documents on how to do that. Else we can also leave this issue for now.
from map-matching.
No problem, an example of a unit test you can find in the source. I tried it with the pbf file you mentioned and can now reproduce it. Will investigate.
from map-matching.
The reason is that the highway (Yunus Emre) is slightly better for the path finding algorithm (e.g. 60kph vs. 30kph). Still here the shorter street should be significantly preferred as there are many GPX points which are also close. This will be fixed.
from map-matching.
(There was a mechanism to prefer edges with many GPX points before but due to other problems I removed it at that time. Will investigate it next week.)
from map-matching.
👍 Sounds great!
from map-matching.
Related Issues (20)
- how i make the .pbf file by myself, i want to test another file, but my file format is .shp, any way to convert the format? Please help HOT 1
- Input Gpx file format HOT 1
- Unexpected Matching Behavior HOT 3
- map matching NPE HOT 1
- "Sequence is broken for submitted track at time step" error when matching a GPX that should be matchable
- Problem with Ineffective
- Encoder for car not found. Existing: foot| HOT 6
- Error saving matching large gpx. HOT 3
- Sequence is broken for submitted track HOT 4
- How to get transition probabilities ?
- Matching performance is very low。What should I do? HOT 1
- How to avoid unnecessary u-turns HOT 1
- Divide measurementErrorSigma into its separate functions HOT 3
- Last point of map-matched output lies too far from actual route HOT 4
- Additional CH config leads to error HOT 2
- Fail to build recent-Core (27 July 2020) HOT 4
- hmm-lib does not compile HOT 1
- Feature Request: Add elevation data from command line HOT 1
- Error building on master branch, map matching core could not be found in central maven
- Is there a way to download matching results? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from map-matching.