-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json_render is not accurate for osm node ID #7016
Comments
If a rollback is performed, it will cause more serious problems, resulting in incorrect map match results. In addition, I found that the ID type used by OSRM elsewhere is int32, with a maximum of 10 digits. If only this place is modified, there seem to be problems elsewhere. |
thanks for your quick response. I see your point. how about just relax it to 11, like |
@fenwuyaoji I think you can fork this repository and modify it, but I don’t recommend doing so. Many parts of the code use the INT32 type for OSM IDs. Therefore, I suggest that you keep your IDs within the INT32 range and then use OSRM to process the data. |
okay, I will look through the code and see whether I can do anything better to solve it. |
Hi, I found that in the file osrm-backend/include/util/typedefs.hpp Line 71 in 203314b
OSMNodeID is typed of uint64, while NodeID /EdgeID /NameID are uint32. As also mentioned in #6341, I think the internal osm ID should be max to 34-bit. what you said 'Many parts of the code use the INT32 type for OSM IDs.' I think it's NodeID , not OSMNodeID .please see this summary: #6341 (comment) many guys are facing the same issue, e.g. #6758, #6594. I think it's worth to relax it to 11 in json_render. @mjjbell HI, do you have any idea on this issue? |
I thank you are right, it seems reasonable to expand to 11 digits and you can submit a PR to see the administrator's opinion. |
Issue
@Rejudge-F, @DennisOSRM, @SiarheiFedartsou Hi, all. We are facing an inaccurate OSM node ID format issue and I found it's related to #6531.
The case is:
original node ID: 11117421192, after format: 1.111742119e+10.
The reason I think is that
PackedOSMIDs
osrm-backend/include/extractor/packed_osm_ids.hpp
Line 12 in 203314b
Steps to reproduce
Add below test case to
unit_tests/util/json_render.cpp
.The text was updated successfully, but these errors were encountered: