mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 17:35:42 +02:00
Plumb the bins through to overzoom()
This commit is contained in:
@@ -1022,8 +1022,10 @@ drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_nee
|
|||||||
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
|
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum, std::vector<std::string> const &unidecode_data, double simplification,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
double tiny_polygon_size) {
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
|
std::vector<std::string> const &unidecode_data, double simplification,
|
||||||
|
double tiny_polygon_size, std::vector<mvt_layer> const &bins) {
|
||||||
std::vector<source_tile> decoded;
|
std::vector<source_tile> decoded;
|
||||||
|
|
||||||
for (auto const &t : tiles) {
|
for (auto const &t : tiles) {
|
||||||
@@ -1049,7 +1051,7 @@ std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int n
|
|||||||
decoded.push_back(out);
|
decoded.push_back(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
return overzoom(decoded, nz, nx, ny, detail, buffer, keep, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
|
return overzoom(decoded, nz, nx, ny, detail, buffer, keep, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tile_feature {
|
struct tile_feature {
|
||||||
@@ -1150,8 +1152,10 @@ static struct preservecmp {
|
|||||||
std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int ny,
|
std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum, std::vector<std::string> const &unidecode_data, double simplification,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
double tiny_polygon_size) {
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
|
std::vector<std::string> const &unidecode_data, double simplification,
|
||||||
|
double tiny_polygon_size, std::vector<mvt_layer> const &bins) {
|
||||||
mvt_tile outtile;
|
mvt_tile outtile;
|
||||||
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
||||||
|
|
||||||
@@ -1367,7 +1371,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
|||||||
std::string child = overzoom(sts,
|
std::string child = overzoom(sts,
|
||||||
nz + 1, nx * 2 + x, ny * 2 + y,
|
nz + 1, nx * 2 + x, ny * 2 + y,
|
||||||
detail, buffer, keep, false, NULL,
|
detail, buffer, keep, false, NULL,
|
||||||
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
|
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
|
||||||
if (child.size() > 0) {
|
if (child.size() > 0) {
|
||||||
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -121,7 +121,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
|||||||
bool demultiply, json_object *filter, bool preserve_input_order,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
std::vector<std::string> const &unidecode_data, double simplification,
|
std::vector<std::string> const &unidecode_data, double simplification,
|
||||||
double tiny_polygon_size);
|
double tiny_polygon_size, std::vector<mvt_layer> const &bins);
|
||||||
|
|
||||||
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
|
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
@@ -129,7 +129,7 @@ std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int n
|
|||||||
bool demultiply, json_object *filter, bool preserve_input_order,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
std::vector<std::string> const &unidecode_data, double simplification,
|
std::vector<std::string> const &unidecode_data, double simplification,
|
||||||
double tiny_polygon_size);
|
double tiny_polygon_size, std::vector<mvt_layer> const &bins);
|
||||||
|
|
||||||
draw center_of_mass_mp(const drawvec &dv);
|
draw center_of_mass_mp(const drawvec &dv);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -227,7 +227,7 @@ int main(int argc, char **argv) {
|
|||||||
its.push_back(std::move(t));
|
its.push_back(std::move(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, true, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
|
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, true, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
|
||||||
|
|
||||||
FILE *f = fopen(outfile, "wb");
|
FILE *f = fopen(outfile, "wb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
|||||||
+1
-1
@@ -712,7 +712,7 @@ struct tileset_reader {
|
|||||||
t.y = parent_tile.y;
|
t.y = parent_tile.y;
|
||||||
tv.push_back(std::move(t));
|
tv.push_back(std::move(t));
|
||||||
|
|
||||||
std::string ret = overzoom(tv, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>(), false, &next_overzoomed_tiles, false, NULL, false, std::unordered_map<std::string, attribute_op>(), unidecode_data, 0, 0);
|
std::string ret = overzoom(tv, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>(), false, &next_overzoomed_tiles, false, NULL, false, std::unordered_map<std::string, attribute_op>(), unidecode_data, 0, 0, std::vector<mvt_layer>());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user