Generate label points after simplification, not before. (#27)

* Generate labels points after simplification, not before.

Previously there were some cases where dropping the smallest
polygons would never reduce the number of labels.

* Also wait until after polygon cleaning to make labels

* Remove the extra newlines after the TILES ONLY COMPLETE message
This commit is contained in:
Erica Fischer
2022-10-21 13:59:36 -07:00
committed by GitHub
parent b763625862
commit 5b03b18f31
6 changed files with 40 additions and 17 deletions
+11
View File
@@ -92,6 +92,17 @@ void to_tile_scale(drawvec &geom, int z, int detail) {
}
}
drawvec from_tile_scale(drawvec const &geom, int z, int detail) {
drawvec out;
for (size_t i = 0; i < geom.size(); i++) {
draw d = geom[i];
d.x <<= (32 - detail - z);
d.y <<= (32 - detail - z);
out.push_back(d);
}
return out;
}
drawvec remove_noop(drawvec geom, int type, int shift) {
// first pass: remove empty linetos