Skip to content

Conversation

@VladyslavOdobesku-TomTom

The title is quite self-explanatory. I've seen this code in simplify.hpp

inline void simplify(std::vector<vt_point>& points, double tolerance) {
    const size_t len = points.size();

    // always retain the endpoints (1 is the max value)
    points[0].z = 1.0;
    points[len - 1].z = 1.0;

    simplify(points, 0, len - 1, tolerance * tolerance);
}

where simplification factor is enforced to be 1.0 for initial projected line ends, however, when the line is clipped into pieces there is no mechanism to also ensure that ends of clipped lines are not dropped.

We've found this bug in the wild only in 2 lines so far. The fix works for us as we've patched it on our end. It was suggested to also raise a PR into upstream library.

simplification factor thus important parts of a line
can be dropped in the last step of conversion to vector tile.
@VladyslavOdobesku-TomTom
Copy link
Author

@mourner maybe you can review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant