QGIS API Documentation  2.12.0-Lyon
Static Public Member Functions | List of all members
pal::CostCalculator Class Reference

#include <costcalculator.h>

Static Public Member Functions

static void addObstacleCostPenalty (LabelPosition *lp, pal::FeaturePart *obstacle)
 Increase candidate's cost according to its collision with passed feature. More...
 
static bool candidateSortGrow (const LabelPosition *c1, const LabelPosition *c2)
 Sorts label candidates in ascending order of cost. More...
 
static bool candidateSortShrink (const LabelPosition *c1, const LabelPosition *c2)
 Sorts label candidates in descending order of cost. More...
 
static int finalizeCandidatesCosts (Feats *feat, int max_p, RTree< pal::FeaturePart *, double, 2, double > *obstacles, double bbx[4], double bby[4])
 Sort candidates by costs, skip the worse ones, evaluate polygon candidates. More...
 
static void setCandidateCostFromPolygon (LabelPosition *lp, RTree< pal::FeaturePart *, double, 2, double > *obstacles, double bbx[4], double bby[4])
 Set cost to the smallest distance between lPos's centroid and a polygon stored in geoetry field. More...
 
static void setPolygonCandidatesCost (int nblp, QList< LabelPosition * > &lPos, RTree< pal::FeaturePart *, double, 2, double > *obstacles, double bbx[4], double bby[4])
 

Detailed Description

Definition at line 25 of file costcalculator.h.

Member Function Documentation

void pal::CostCalculator::addObstacleCostPenalty ( LabelPosition lp,
pal::FeaturePart obstacle 
)
static

Increase candidate's cost according to its collision with passed feature.

Definition at line 41 of file costcalculator.cpp.

bool pal::CostCalculator::candidateSortGrow ( const LabelPosition c1,
const LabelPosition c2 
)
static

Sorts label candidates in ascending order of cost.

Definition at line 31 of file costcalculator.cpp.

bool pal::CostCalculator::candidateSortShrink ( const LabelPosition c1,
const LabelPosition c2 
)
static

Sorts label candidates in descending order of cost.

Definition at line 36 of file costcalculator.cpp.

int pal::CostCalculator::finalizeCandidatesCosts ( Feats feat,
int  max_p,
RTree< pal::FeaturePart *, double, 2, double > *  obstacles,
double  bbx[4],
double  bby[4] 
)
static

Sort candidates by costs, skip the worse ones, evaluate polygon candidates.

Definition at line 192 of file costcalculator.cpp.

void pal::CostCalculator::setCandidateCostFromPolygon ( LabelPosition lp,
RTree< pal::FeaturePart *, double, 2, double > *  obstacles,
double  bbx[4],
double  bby[4] 
)
static

Set cost to the smallest distance between lPos's centroid and a polygon stored in geoetry field.

Definition at line 164 of file costcalculator.cpp.

void pal::CostCalculator::setPolygonCandidatesCost ( int  nblp,
QList< LabelPosition * > &  lPos,
RTree< pal::FeaturePart *, double, 2, double > *  obstacles,
double  bbx[4],
double  bby[4] 
)
static

Definition at line 98 of file costcalculator.cpp.


The documentation for this class was generated from the following files: