Open jks-liu opened 2 years ago
Root cause for this issue is: One GPS points will match more than one points in the road graph.
Some GPS points are too far, so that the road the belong to are not adjacent, so some points (road) are added on the fly to make match roads are all adjacent.
I am facing the same issue. Did you find any solution?
I'll post a solution in few days.
This solution was published by the author @arthurdjn By adding the two lines of code, the index out of bound issue can be solved. Please correct me if I am wrong! ++++++++++++++++++++++++++ Ok, I found the error. It seems it is a particular case of the map. The last GPS point is near two good candidates, thus they are both kept in leuven package which leads to an error in the indexing.
If you want to update the code to handle this specific case, you just need to add two extra lines at noiseplanet/matcher/model/leuven.py, line 121:
for idx, m in enumerate(lat_nodes):
+ if idx >= len(track):
+ break
lat, lon = m.edge_m.pi[:2]
lat_corr.append(lat)
lon_corr.append(lon)
This is some crappy code and won't update the git repository, at least for now. I need to rearrange the whole project, but as it is old I don't have the courage to clean and update it.
@pimakshay The solution can walk around the "index out of bound" error. However the result turns out to be a little bit wrong. Result index are mismatched.
@jks-liu Hi,I am facing the same issue. Did you find any solution?Looking for your message!!!
error:
PS: Origin issue is from user @1213314896
https://github.com/arthurdjn/noiseplanet/issues/11#issuecomment-1003295828