From ce084fcf731d0fc74b4ca66125ca68ee278a9583 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 14 Jul 2023 12:31:38 +0200 Subject: [PATCH] Add a tile counter in verbose time to monitor the progress. --- tramontana/src/SweepLine.cpp | 14 +++++++++++++- tramontana/src/Tile.cpp | 16 ++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/tramontana/src/SweepLine.cpp b/tramontana/src/SweepLine.cpp index 317e4b23..cbc918f4 100644 --- a/tramontana/src/SweepLine.cpp +++ b/tramontana/src/SweepLine.cpp @@ -172,7 +172,18 @@ namespace Tramontana { loadTiles(); //bool debugOn = false; //bool written = false; + size_t processedTiles = 0; for ( Element& element : _tiles ) { + processedTiles++; + if (tty::enabled()) { + cmess2 << " " << tty::cr; + cmess2.flush (); + } + Tile* tile = element.getTile(); TileIntv tileIntv ( tile, tile->getYMin(), tile->getYMax() ); // if (tile->getOccurrence().getEntity()->getId() == 3348) { @@ -301,7 +312,8 @@ namespace Tramontana { query.setBasicLayer( layer ); query.doQuery(); } - cmess2 << " - Loaded " << query.getGoMatchCount() << " tiles." << endl; + cmess2 << " - Loaded " << _tiles.size() << " tiles (from " + << query.getGoMatchCount() << " gos)." << endl; // for ( Occurrence occurrence : getCell()->getOccurrencesUnder( getCell()->getBoundingBox() ) ) { // vector tiles; diff --git a/tramontana/src/Tile.cpp b/tramontana/src/Tile.cpp index e6863ae4..aa31b95c 100644 --- a/tramontana/src/Tile.cpp +++ b/tramontana/src/Tile.cpp @@ -122,7 +122,7 @@ namespace Tramontana { return nullptr; } if (not (flags & ForceLayer) and not component->getLayer()->contains(layer)) { - cerr << "Intersect:" << component->getLayer()->getMask().intersect(layer->getMask()) << endl; + //cerr << "Intersect:" << component->getLayer()->getMask().intersect(layer->getMask()) << endl; cerr << Error( "Tile::create(): Component layer \"%s\" does not contains \"%s\".\n" " (%s)\n" " component :%s\n" @@ -163,10 +163,10 @@ namespace Tramontana { ) << endl; return nullptr; } - if (rectilinear->getId() == 3367) { - DebugSession::open( 160, 169 ); - cdebug_log(160,0) << "Tiling: " << rectilinear << endl; - } + // if (rectilinear->getId() == 3367) { + // DebugSession::open( 160, 169 ); + // cdebug_log(160,0) << "Tiling: " << rectilinear << endl; + // } vector boxes; rectilinear->getAsRectangles( boxes ); for ( Box bb : boxes ) { @@ -176,9 +176,9 @@ namespace Tramontana { cdebug_log(160,0) << "| " << tile << endl; if (not rootTile) rootTile = tile; } - if (rectilinear->getId() == 3367) { - DebugSession::close(); - } + // if (rectilinear->getId() == 3367) { + // DebugSession::close(); + // } return rootTile; }