mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Drop holes that are not inside an outer ring
This commit is contained in:
@@ -829,6 +829,11 @@ drawvec clean_polygon(drawvec const &geom, int z, int detail) {
|
|||||||
|
|
||||||
drawvec ret;
|
drawvec ret;
|
||||||
for (size_t i = 0; i < rings.size(); i++) {
|
for (size_t i = 0; i < rings.size(); i++) {
|
||||||
|
if (rings[i].area < 0 && rings[i].geom.size() != 0) {
|
||||||
|
// drop top-level holes
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto const &g : rings[i].geom) {
|
for (auto const &g : rings[i].geom) {
|
||||||
ret.emplace_back(g.op, g.x / SCALE, g.y / SCALE);
|
ret.emplace_back(g.op, g.x / SCALE, g.y / SCALE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user