mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Fix too_small geometry test for multigeometries
This commit is contained in:
@@ -1556,15 +1556,18 @@ static bool line_is_too_small(drawvec const &geometry, int z, int detail) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
long long x = std::round((double) geometry[0].x / (1LL << (32 - detail - z)));
|
long long x = 0, y = 0;
|
||||||
long long y = std::round((double) geometry[0].y / (1LL << (32 - detail - z)));
|
|
||||||
|
|
||||||
for (auto &g : geometry) {
|
for (auto &g : geometry) {
|
||||||
long long xx = std::round((double) g.x / (1LL << (32 - detail - z)));
|
if (g.op == VT_MOVETO) {
|
||||||
long long yy = std::round((double) g.y / (1LL << (32 - detail - z)));
|
x = std::llround((double) g.x / (1LL << (32 - detail - z)));
|
||||||
|
y = std::llround((double) g.y / (1LL << (32 - detail - z)));
|
||||||
|
} else {
|
||||||
|
long long xx = std::llround((double) g.x / (1LL << (32 - detail - z)));
|
||||||
|
long long yy = std::llround((double) g.y / (1LL << (32 - detail - z)));
|
||||||
|
|
||||||
if (xx != x || yy != y) {
|
if (xx != x || yy != y) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user