Skip to content
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

fix: merge line if it needs to be simplified #244

Merged
merged 3 commits into from
Jun 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: merge line if it needs to be simplified
This ensure we still simplify passed line to `mergeLineStrings` even if there is only one
  • Loading branch information
farfromrefug authored May 31, 2022
commit 3eef5b97b91a1e8071ce90a1d91c1f0780aafe63
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public static List<VectorTile.Feature> mergeLineStrings(List<VectorTile.Feature>
// - only 1 element in the group
// - it doesn't need to be clipped
// - and it can't possibly be filtered out for being too short
if (groupedFeatures.size() == 1 && buffer == 0d && lengthLimit == 0) {
// - and it does not need to be simplified
if (groupedFeatures.size() == 1 && buffer == 0d && lengthLimit == 0 && tolerance == 0) {
result.add(feature1);
} else {
LineMerger merger = new LineMerger();
Expand Down