Skip to content

ApproximateDistance(int, int, int, int): Assertion `lat1 != MIN_INT') failed #119

@DrVanScott

Description

@DrVanScott

After one of the last changes i now get

osrm-routed: Server/../DataStructures/ExtractorStructs.h:351: double ApproximateDistance(int, int, int, int): Assertion `lat1 != (-2147483647 - 1)' failed.

sometimes when dragging start/stop or viapoint. i suppose this happens if the point is to far from the next suitable way (large forest, out of area).
I worked around that problem by just returning 0 in such cases:

inline double ApproximateDistance( const int lat1, const int lon1, const int lat2, const int lon2 ) { if (lat1 == INT_MIN || lat2 == INT_MIN || lon1 == INT_MIN || lon2 == INT_MIN) { return 0; } //... }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions