wannesm / LeuvenMapMatching

Leuven.MapMatching toolbox for aligning GPS measurements to locations on a map.
Other
222 stars 43 forks source link

node id and match error #51

Open Zyy-neu opened 8 months ago

Zyy-neu commented 8 months ago

Hello dear developer, I appreciate that you have developed such a useful tool that has been very helpful to me. I have two questions : ) First question: I use osmnx to get the road network. The following figure shows some node information in the road network. The nodes in the map match result are "osmid" sequence, is there any way to use "fid"? 1707147685099 Second question: As shown in the figure below, I used the parameters in the examples you gave to match the map. Most match paths are complete, but some match paths are short ( not complete ) or are even empty. How can I modify these parameters or do something else to make the match more complete? VESM)8_@5KSJN{GM()R%V

wannesm commented 7 months ago

Use fid instead of osmid? When adding nodes to a map in leuvenmapmatching, you can chose yourself what the node id is. It is the first argument in method add_node (see documentation).

For the unfinished matchings. There might be multiple reasons and it might help to use method inspect_early_stopping to get more insight in the problem (see documentation). The two most common things are that the min_prob_norm argument is too low for the given other arguments and when the probability drops too low the algorithm stops (e.g. because all locations are too far from a road) or that the lattice_width is too small and does not contain the solution. The first can only be solved by rerunning with a different value. The second can be solved by calling the increase_max_lattice_width method after the matching failed to expand the search space and try again.