QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
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

Note
not available in Python bindings

Definition at line 32 of file costcalculator.h.

Member Function Documentation

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

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

Definition at line 38 of file costcalculator.cpp.

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

Sorts label candidates in ascending order of cost.

Definition at line 28 of file costcalculator.cpp.

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

Sorts label candidates in descending order of cost.

Definition at line 33 of file costcalculator.cpp.

int 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 176 of file costcalculator.cpp.

void 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 149 of file costcalculator.cpp.

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

Definition at line 96 of file costcalculator.cpp.


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