mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-23 18:40:17 +00:00
If a point divides one border, it divides any that touch there
This commit is contained in:
parent
57cc343855
commit
d35dc4936a
16
tile.cpp
16
tile.cpp
@ -645,6 +645,7 @@ void find_common_edges(std::vector<partial> &partials) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::map<drawvec, size_t> arcs;
|
std::map<drawvec, size_t> arcs;
|
||||||
|
std::set<draw> necessaries;
|
||||||
|
|
||||||
// Now mark all the points where the set of rings using the edge on one side
|
// Now mark all the points where the set of rings using the edge on one side
|
||||||
// is not the same as the set of rings using the edge on the other side.
|
// is not the same as the set of rings using the edge on the other side.
|
||||||
@ -726,15 +727,30 @@ void find_common_edges(std::vector<partial> &partials) {
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
#endif
|
#endif
|
||||||
g[a + k].necessary = 1;
|
g[a + k].necessary = 1;
|
||||||
|
necessaries.insert(g[a + k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a = b - 1;
|
a = b - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Roll rings that include a necessary point around so they start at one
|
// Roll rings that include a necessary point around so they start at one
|
||||||
|
|
||||||
|
for (size_t i = 0; i < partials.size(); i++) {
|
||||||
|
if (partials[i].t == VT_POLYGON) {
|
||||||
|
for (size_t j = 0; j < partials[i].geoms.size(); j++) {
|
||||||
|
drawvec &g = partials[i].geoms[j];
|
||||||
|
|
||||||
|
for (size_t k = 0; k < g.size(); k++) {
|
||||||
|
if (necessaries.count(g[k]) != 0) {
|
||||||
|
g[k].necessary = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t k = 0; k < g.size(); k++) {
|
for (size_t k = 0; k < g.size(); k++) {
|
||||||
if (g[k].op == VT_MOVETO) {
|
if (g[k].op == VT_MOVETO) {
|
||||||
ssize_t necessary = -1;
|
ssize_t necessary = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user