Add a tile counter in verbose time to monitor the progress.
This commit is contained in:
parent
7b304da14b
commit
ce084fcf73
|
@ -172,7 +172,18 @@ namespace Tramontana {
|
||||||
loadTiles();
|
loadTiles();
|
||||||
//bool debugOn = false;
|
//bool debugOn = false;
|
||||||
//bool written = false;
|
//bool written = false;
|
||||||
|
size_t processedTiles = 0;
|
||||||
for ( Element& element : _tiles ) {
|
for ( Element& element : _tiles ) {
|
||||||
|
processedTiles++;
|
||||||
|
if (tty::enabled()) {
|
||||||
|
cmess2 << " <tile:" << tty::bold << right << setw(10) << setfill('0')
|
||||||
|
<< processedTiles << tty::reset
|
||||||
|
<< " remains:" << right << setw(10) << setfill('0')
|
||||||
|
<< (_tiles.size() - processedTiles)
|
||||||
|
<< setfill(' ') << tty::reset << ">" << tty::cr;
|
||||||
|
cmess2.flush ();
|
||||||
|
}
|
||||||
|
|
||||||
Tile* tile = element.getTile();
|
Tile* tile = element.getTile();
|
||||||
TileIntv tileIntv ( tile, tile->getYMin(), tile->getYMax() );
|
TileIntv tileIntv ( tile, tile->getYMin(), tile->getYMax() );
|
||||||
// if (tile->getOccurrence().getEntity()->getId() == 3348) {
|
// if (tile->getOccurrence().getEntity()->getId() == 3348) {
|
||||||
|
@ -301,7 +312,8 @@ namespace Tramontana {
|
||||||
query.setBasicLayer( layer );
|
query.setBasicLayer( layer );
|
||||||
query.doQuery();
|
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() ) ) {
|
// for ( Occurrence occurrence : getCell()->getOccurrencesUnder( getCell()->getBoundingBox() ) ) {
|
||||||
// vector<Tile*> tiles;
|
// vector<Tile*> tiles;
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace Tramontana {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (not (flags & ForceLayer) and not component->getLayer()->contains(layer)) {
|
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"
|
cerr << Error( "Tile::create(): Component layer \"%s\" does not contains \"%s\".\n"
|
||||||
" (%s)\n"
|
" (%s)\n"
|
||||||
" component :%s\n"
|
" component :%s\n"
|
||||||
|
@ -163,10 +163,10 @@ namespace Tramontana {
|
||||||
) << endl;
|
) << endl;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (rectilinear->getId() == 3367) {
|
// if (rectilinear->getId() == 3367) {
|
||||||
DebugSession::open( 160, 169 );
|
// DebugSession::open( 160, 169 );
|
||||||
cdebug_log(160,0) << "Tiling: " << rectilinear << endl;
|
// cdebug_log(160,0) << "Tiling: " << rectilinear << endl;
|
||||||
}
|
// }
|
||||||
vector<Box> boxes;
|
vector<Box> boxes;
|
||||||
rectilinear->getAsRectangles( boxes );
|
rectilinear->getAsRectangles( boxes );
|
||||||
for ( Box bb : boxes ) {
|
for ( Box bb : boxes ) {
|
||||||
|
@ -176,9 +176,9 @@ namespace Tramontana {
|
||||||
cdebug_log(160,0) << "| " << tile << endl;
|
cdebug_log(160,0) << "| " << tile << endl;
|
||||||
if (not rootTile) rootTile = tile;
|
if (not rootTile) rootTile = tile;
|
||||||
}
|
}
|
||||||
if (rectilinear->getId() == 3367) {
|
// if (rectilinear->getId() == 3367) {
|
||||||
DebugSession::close();
|
// DebugSession::close();
|
||||||
}
|
// }
|
||||||
return rootTile;
|
return rootTile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue