Skip to content
Permalink
Browse files

Less verbosity to stdout from labeling plugin

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12508 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 18, 2009
1 parent 9b8a836 commit 54824b722133acdea6d14fce15d90deadce5c48f
Showing with 11 additions and 8 deletions.
  1. +3 −1 src/core/pal/pal.cpp
  2. +3 −3 src/core/qgsgeometry.cpp
  3. +5 −4 src/plugins/labeling/pallabeling.cpp
@@ -493,7 +493,9 @@ namespace pal

Feats *feat;

std::cout << "FIRSST NBFT : " << prob->nbft << std::endl;
#ifdef _VERBOSE_
std::cout << "FIRST NBFT : " << prob->nbft << std::endl;
#endif

// Filtering label positions against obstacles
amin[0] = amin[1] = -DBL_MAX;
@@ -4117,7 +4117,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBLineString:
{
QgsDebugMsg( "Linestring found" );
QgsDebugMsgLevel( "Linestring found", 3 );

QgsPolyline sequence;

@@ -4181,7 +4181,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBPolygon:
{
QgsDebugMsg( "Polygon found" );
QgsDebugMsgLevel( "Polygon found", 3 );

// get number of rings in the polygon
numRings = ( int * )( mGeometry + 1 + sizeof( int ) );
@@ -4223,7 +4223,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBMultiPolygon:
{
QgsDebugMsg( "Multipolygon found" );
QgsDebugMsgLevel( "Multipolygon found", 3 );

QVector<GEOSGeometry*> polygons;

@@ -21,6 +21,7 @@
#include <QTime>
#include <QPainter>

#include <qgslogger.h>
#include <qgsvectorlayer.h>
#include <qgsmaplayerregistry.h>
#include <qgsvectordataprovider.h>
@@ -240,7 +241,7 @@ void LayerSettings::registerFeature( QgsFeature& f )
}
catch ( std::exception* e )
{
std::cerr << "Ignoring feature " << f.id() << " due PAL exception: " << e->what() << std::endl;
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( f.id() ) + QString::fromLatin1( e->what() ) );
return;
}

@@ -431,7 +432,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
}
catch ( std::exception& e )
{
std::cerr << "PAL EXCEPTION :-( " << e.what() << std::endl;
QgsDebugMsg( "PAL EXCEPTION :-( " + QString::fromLatin1( e.what() ) );
mActiveLayers.clear(); // clean up
return;
}
@@ -460,7 +461,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
// find the solution
labels = mPal->solveProblem( problem, mShowingAllLabels );

std::cout << "LABELING work: " << t.elapsed() << "ms ... labels# " << labels->size() << std::endl;
QgsDebugMsg( QString( "LABELING work: %1 ms ... labels# %2" ).arg( t.elapsed() ).arg( labels->size() ) );
t.restart();

painter->setRenderHint( QPainter::Antialiasing );
@@ -477,7 +478,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
drawLabel( *it, painter, xform );
}

std::cout << "LABELING draw: " << t.elapsed() << "ms" << std::endl;
QgsDebugMsg( QString( "LABELING draw: %1 ms" ).arg( t.elapsed() ) );

delete problem;
delete labels;

0 comments on commit 54824b7

Please sign in to comment.
You can’t perform that action at this time.