mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user