mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Remove debug logging
This commit is contained in:
@@ -1850,8 +1850,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
strategy strategy;
|
strategy strategy;
|
||||||
strategy.detail_reduced = detail_reduced;
|
strategy.detail_reduced = detail_reduced;
|
||||||
|
|
||||||
fprintf(stderr, "@@@@@ reading features in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
for (size_t seq = 0;; seq++) {
|
for (size_t seq = 0;; seq++) {
|
||||||
serial_feature sf;
|
serial_feature sf;
|
||||||
ssize_t which_serial_feature = -1;
|
ssize_t which_serial_feature = -1;
|
||||||
@@ -2216,8 +2214,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
coalesced_area = 0;
|
coalesced_area = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@@ done reading features in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
// We are done reading the features.
|
// We are done reading the features.
|
||||||
// Close the prefilter if it was opened.
|
// Close the prefilter if it was opened.
|
||||||
// Close the output files for the next zoom level.
|
// Close the output files for the next zoom level.
|
||||||
@@ -2290,16 +2286,12 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
// Reorder and coalesce.
|
// Reorder and coalesce.
|
||||||
// Sort back into input order or by attribute value
|
// Sort back into input order or by attribute value
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ sorting shared nodes in %d/%d/%d\n", z, tx, ty);
|
|
||||||
std::stable_sort(shared_nodes.begin(), shared_nodes.end());
|
std::stable_sort(shared_nodes.begin(), shared_nodes.end());
|
||||||
fprintf(stderr, "@@@@ done sorting shared nodes in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
for (auto &kv : layers) {
|
for (auto &kv : layers) {
|
||||||
std::string const &layername = kv.first;
|
std::string const &layername = kv.first;
|
||||||
std::vector<std::shared_ptr<serial_feature>> &features = kv.second.features;
|
std::vector<std::shared_ptr<serial_feature>> &features = kv.second.features;
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing retain_points_multiplier in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (retain_points_multiplier > 1) {
|
if (retain_points_multiplier > 1) {
|
||||||
// mapping from input sequence to current sequence within this tile
|
// mapping from input sequence to current sequence within this tile
|
||||||
std::vector<std::pair<size_t, size_t>> feature_sequences;
|
std::vector<std::pair<size_t, size_t>> feature_sequences;
|
||||||
@@ -2324,8 +2316,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing cluster stuff in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
for (size_t i = 0; i < features.size(); i++) {
|
for (size_t i = 0; i < features.size(); i++) {
|
||||||
serial_feature &p = *features[i];
|
serial_feature &p = *features[i];
|
||||||
|
|
||||||
@@ -2372,8 +2362,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing detect shared borders in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (additional[A_DETECT_SHARED_BORDERS]) {
|
if (additional[A_DETECT_SHARED_BORDERS]) {
|
||||||
find_common_edges(features, z, line_detail, simplification, maxzoom, merge_fraction);
|
find_common_edges(features, z, line_detail, simplification, maxzoom, merge_fraction);
|
||||||
}
|
}
|
||||||
@@ -2383,8 +2371,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
tasks = 1;
|
tasks = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing simplification in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
pthread_t pthreads[tasks];
|
pthread_t pthreads[tasks];
|
||||||
std::vector<simplification_worker_arg> args;
|
std::vector<simplification_worker_arg> args;
|
||||||
@@ -2434,14 +2420,10 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
|
|
||||||
std::vector<std::shared_ptr<serial_feature>> &layer_features = features;
|
std::vector<std::shared_ptr<serial_feature>> &layer_features = features;
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing reorder in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (additional[A_REORDER]) {
|
if (additional[A_REORDER]) {
|
||||||
std::stable_sort(layer_features.begin(), layer_features.end(), coalindexcmp_comparator());
|
std::stable_sort(layer_features.begin(), layer_features.end(), coalindexcmp_comparator());
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing coalesce in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (additional[A_COALESCE]) {
|
if (additional[A_COALESCE]) {
|
||||||
// coalesce adjacent identical features if requested
|
// coalesce adjacent identical features if requested
|
||||||
|
|
||||||
@@ -2466,8 +2448,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
layer_features.resize(out);
|
layer_features.resize(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing coalesce cleanup in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// clean up coalesced linestrings by simplification
|
// clean up coalesced linestrings by simplification
|
||||||
// and coalesced polygons by cleaning
|
// and coalesced polygons by cleaning
|
||||||
@@ -2503,24 +2483,18 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
layer_features.resize(out);
|
layer_features.resize(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing input order in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (prevent[P_INPUT_ORDER]) {
|
if (prevent[P_INPUT_ORDER]) {
|
||||||
auto clustered = assemble_multiplier_clusters(layer_features);
|
auto clustered = assemble_multiplier_clusters(layer_features);
|
||||||
std::stable_sort(clustered.begin(), clustered.end(), preservecmp);
|
std::stable_sort(clustered.begin(), clustered.end(), preservecmp);
|
||||||
layer_features = disassemble_multiplier_clusters(clustered);
|
layer_features = disassemble_multiplier_clusters(clustered);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing size order in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (order_by.size() != 0) {
|
if (order_by.size() != 0) {
|
||||||
auto clustered = assemble_multiplier_clusters(layer_features);
|
auto clustered = assemble_multiplier_clusters(layer_features);
|
||||||
std::stable_sort(clustered.begin(), clustered.end(), ordercmp());
|
std::stable_sort(clustered.begin(), clustered.end(), ordercmp());
|
||||||
layer_features = disassemble_multiplier_clusters(clustered);
|
layer_features = disassemble_multiplier_clusters(clustered);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing limit in %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (z == maxzoom && limit_tile_feature_count_at_maxzoom != 0) {
|
if (z == maxzoom && limit_tile_feature_count_at_maxzoom != 0) {
|
||||||
if (layer_features.size() > limit_tile_feature_count_at_maxzoom) {
|
if (layer_features.size() > limit_tile_feature_count_at_maxzoom) {
|
||||||
// this is maxzoom; ok to stop early still because they said to limit abruptly
|
// this is maxzoom; ok to stop early still because they said to limit abruptly
|
||||||
@@ -2545,8 +2519,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
std::vector<std::shared_ptr<serial_feature>> &layer_features = layer_iterator->second.features;
|
std::vector<std::shared_ptr<serial_feature>> &layer_features = layer_iterator->second.features;
|
||||||
feature_count += layer_features.size();
|
feature_count += layer_features.size();
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing conversion to mvt_layer %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
mvt_layer layer;
|
mvt_layer layer;
|
||||||
layer.name = layer_iterator->first;
|
layer.name = layer_iterator->first;
|
||||||
layer.version = 2;
|
layer.version = 2;
|
||||||
@@ -2639,8 +2611,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing feature count check mvt_layer %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
// Again, adjust the retabulated feature count to estimate
|
// Again, adjust the retabulated feature count to estimate
|
||||||
// how many total features there would have been if we hadn't
|
// how many total features there would have been if we hadn't
|
||||||
// hit the limit and started dropping early.
|
// hit the limit and started dropping early.
|
||||||
@@ -2738,23 +2708,17 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing tile_encoding %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
std::string compressed;
|
std::string compressed;
|
||||||
std::string pbf = tile.encode();
|
std::string pbf = tile.encode();
|
||||||
|
|
||||||
tile.layers.clear();
|
tile.layers.clear();
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing tile compression %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (!prevent[P_TILE_COMPRESSION]) {
|
if (!prevent[P_TILE_COMPRESSION]) {
|
||||||
compress(pbf, compressed, true);
|
compress(pbf, compressed, true);
|
||||||
} else {
|
} else {
|
||||||
compressed = pbf;
|
compressed = pbf;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ doing size checks %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
// And similarly, adjust the compressed byte size to estimate
|
// And similarly, adjust the compressed byte size to estimate
|
||||||
// what it would have been if we hadn't stopped dropping features early
|
// what it would have been if we hadn't stopped dropping features early
|
||||||
|
|
||||||
@@ -2859,16 +2823,12 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
|||||||
exit(EXIT_IMPOSSIBLE);
|
exit(EXIT_IMPOSSIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ writing to mbtiles %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (outdb != NULL) {
|
if (outdb != NULL) {
|
||||||
mbtiles_write_tile(outdb, z, tx, ty, compressed.data(), compressed.size());
|
mbtiles_write_tile(outdb, z, tx, ty, compressed.data(), compressed.size());
|
||||||
} else if (outdir != NULL) {
|
} else if (outdir != NULL) {
|
||||||
dir_write_tile(outdir, z, tx, ty, compressed);
|
dir_write_tile(outdir, z, tx, ty, compressed);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "@@@@ done writing to mbtiles %d/%d/%d\n", z, tx, ty);
|
|
||||||
|
|
||||||
if (pthread_mutex_unlock(&db_lock) != 0) {
|
if (pthread_mutex_unlock(&db_lock) != 0) {
|
||||||
perror("pthread_mutex_unlock");
|
perror("pthread_mutex_unlock");
|
||||||
exit(EXIT_PTHREAD);
|
exit(EXIT_PTHREAD);
|
||||||
|
|||||||
Reference in New Issue
Block a user