Comments (8)
That should indeed not happen. Given your second question, that might be the reason. I might not understand the second question, but the trajectory should be in chronological order. If the tracked object is moving back and forth on the same road it might pick different routes depending on the noise on the signal. The default settings try to avoid a matching that goes back and forth on the same route (because that's more likely to be due to noise than the actual behaviour).
from leuvenmapmatching.
That should indeed not happen. Given your second question, that might be the reason. I might not understand the second question, but the trajectory should be in chronological order. If the tracked object is moving back and forth on the same road it might pick different routes depending on the noise on the signal. The default settings try to avoid a matching that goes back and forth on the same route (because that's more likely to be due to noise than the actual behaviour).
Thank you for your reply, that is exactly what I mean. However, I have another question today :(
I have some track points that seem pretty clear about which road segment they should belong to, but the result is confusing. I have checked that the map obtained through Osmnx package has drivable roads in this part, I wonder if the result can be improved by adjusting the parameters of the algorithm.
from leuvenmapmatching.
My first guess would be that the edges for that street are missing from the map used by the algorithm. You can visualize the edges that are available by setting show_graph=True
in the plot method.
from leuvenmapmatching.
My first guess would be that the edges for that street are missing from the map used by the algorithm. You can visualize the edges that are available by setting
show_graph=True
in the plot method.
Hi, developer! It is the reason for my previous question, thanks for your reply. I found another question about matching details: Matching results are not complete, the algorithm stops when it reaches a GPS point, and it seems that an error has occurred at the point. I checked the road network, the road network around here is complete and the GPS track is in chronological order, I don't know why the matching cannot continue.
from leuvenmapmatching.
This still looks very much like a disconnected graph. In some graphs (e.g. from OpenStreetMap) one can have two nodes on top of each other if map makers forget to connect them. I'd advise to go into the database or the map
object and query for the last two nodes that are matched. I suspect that the second to last matched node (where the path makes a 90 turn) only has 3 neighbors or less instead of the 4 that are expected.
You can print the last three matches using print(matcher.lattice_best[-3:])
. This should show also the names of the nodes that you can use to search the map. For example:
>>> matcher.lattice_best[-3:] # Get last three matches
[1545679251-20910628-14-0, 1545679251-20910628-15-0, 20910628-3663115130-16-0]
>>> matcher.lattice_best[-2].edge_m.l2 # Get the second label in the second to last matched edge
20910628
>>> [label for label, coord in map_con.nodes_nbrto(20910628)] # Query graph for neighbours
[3663115130, 1545679251, 20910628]
from leuvenmapmatching.
This still looks very much like a disconnected graph. In some graphs (e.g. from OpenStreetMap) one can have two nodes on top of each other if map makers forget to connect them. I'd advise to go into the database or the
map
object and query for the last two nodes that are matched. I suspect that the second to last matched node (where the path makes a 90 turn) only has 3 neighbors or less instead of the 4 that are expected.You can print the last three matches using
print(matcher.lattice_best[-3:])
. This should show also the names of the nodes that you can use to search the map. For example:>>> matcher.lattice_best[-3:] # Get last three matches [1545679251-20910628-14-0, 1545679251-20910628-15-0, 20910628-3663115130-16-0] >>> matcher.lattice_best[-2].edge_m.l2 # Get the second label in the second to last matched edge 20910628 >>> [label for label, coord in map_con.nodes_nbrto(20910628)] # Query graph for neighbours [3663115130, 1545679251, 20910628]
Thanks for your reply, it helped me a lot. Did you try other map graphs except for the OSM obtained by Osmnx or are there other ways to get a more complete road network? Because I found there are many disconnected roads on the map graphs obtained by Osmnx, leading to incorrect matching results.
from leuvenmapmatching.
This still looks very much like a disconnected graph. In some graphs (e.g. from OpenStreetMap) one can have two nodes on top of each other if map makers forget to connect them. I'd advise to go into the database or the
map
object and query for the last two nodes that are matched. I suspect that the second to last matched node (where the path makes a 90 turn) only has 3 neighbors or less instead of the 4 that are expected.
You can print the last three matches usingprint(matcher.lattice_best[-3:])
. This should show also the names of the nodes that you can use to search the map. For example:>>> matcher.lattice_best[-3:] # Get last three matches [1545679251-20910628-14-0, 1545679251-20910628-15-0, 20910628-3663115130-16-0] >>> matcher.lattice_best[-2].edge_m.l2 # Get the second label in the second to last matched edge 20910628 >>> [label for label, coord in map_con.nodes_nbrto(20910628)] # Query graph for neighbours [3663115130, 1545679251, 20910628]
Thanks for your reply, it helped me a lot. Did you try other map graphs except for the OSM obtained by Osmnx or are there other ways to get a more complete road network? Because I found there are many disconnected roads on the map graphs obtained by Osmnx, leading to incorrect matching results.
Hi! Have you solved this problem? If yes, how did you manage to solve it? I have the same issue as above, on some point, matcher stops matching with given gps coordinates.
from leuvenmapmatching.
This still looks very much like a disconnected graph. In some graphs (e.g. from OpenStreetMap) one can have two nodes on top of each other if map makers forget to connect them. I'd advise to go into the database or the
map
object and query for the last two nodes that are matched. I suspect that the second to last matched node (where the path makes a 90 turn) only has 3 neighbors or less instead of the 4 that are expected.
You can print the last three matches usingprint(matcher.lattice_best[-3:])
. This should show also the names of the nodes that you can use to search the map. For example:>>> matcher.lattice_best[-3:] # Get last three matches [1545679251-20910628-14-0, 1545679251-20910628-15-0, 20910628-3663115130-16-0] >>> matcher.lattice_best[-2].edge_m.l2 # Get the second label in the second to last matched edge 20910628 >>> [label for label, coord in map_con.nodes_nbrto(20910628)] # Query graph for neighbours [3663115130, 1545679251, 20910628]
Thanks for your reply, it helped me a lot. Did you try other map graphs except for the OSM obtained by Osmnx or are there other ways to get a more complete road network? Because I found there are many disconnected roads on the map graphs obtained by Osmnx, leading to incorrect matching results.
Hi! Have you solved this problem? If yes, how did you manage to solve it? I have the same issue as above, on some point, matcher stops matching with given gps coordinates.
I' m sorry. I haven't solved this problem yet. I am still using map graphs form the OSM obtained by Osmnx, and some of the paths don't match.
from leuvenmapmatching.
Related Issues (20)
- Can someone please put their working example? HOT 5
- Map matching does not work HOT 1
- osmnx, Geopandas, DistanceMatcher HOT 1
- Visualisation HOT 5
- No route satisfies mapmatch criteria HOT 1
- Map object has missing edges when importing from OSMNX HOT 2
- SimpleMatcher math domain error HOT 7
- does timestamp could be used for matching? HOT 1
- Different matching results with the same code and data source HOT 4
- Is it possible to map match a single gps point? HOT 1
- Can the matcher handle the case when there are multiple edges between two nodes? HOT 3
- How to use copy "copy_lastinterface" function and "match_incremental" properly ?
- How to match GPX data that pass through an area with no road network? HOT 7
- match method returns more points than input coordinates HOT 3
- Could you provide test data like "route.gpx" HOT 2
- What does "Stopped early at observation 0, no starting points/edges x found for which |x - (30.57,114.16)| < 250" mean? HOT 1
- I can plot the match results using mmviz.plot_map, but matcher.path_pred_onlynodes is empty. HOT 3
- How to exclude the first/last edges from the match if they have only a small overlap with the source trajectory? HOT 1
- How to fix ValueError: not enough values to unpack (expected 2, got 0) in bb
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 leuvenmapmatching.