QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
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])
 Sets 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 35 of file costcalculator.h.

Member Function Documentation

◆ addObstacleCostPenalty()

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.

◆ candidateSortGrow()

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.

◆ candidateSortShrink()

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.

◆ finalizeCandidatesCosts()

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

◆ setCandidateCostFromPolygon()

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

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

Definition at line 150 of file costcalculator.cpp.

◆ setPolygonCandidatesCost()

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: