QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Typedefs | Enumerations | Functions
pal Namespace Reference

Classes

struct  _chain
 
struct  _cHullBox
 
struct  _elementary_transformation
 
struct  _featCbackCtx
 
struct  _filterContext
 
struct  _nokContext
 
struct  _subpart
 
struct  _Triple
 
struct  ChainContext
 
class  CostCalculator
 
struct  FalpContext
 
class  Feats
 For usage in problem solving algorithm. More...
 
class  Feature
 
class  FeaturePart
 Main class to handle feature. More...
 
struct  Ft
 
class  InternalException
 Various Exceptions. More...
 
class  LabelInfo
 Optional additional info about label (for curved labels) More...
 
class  LabelPosition
 LabelPosition is a candidate feature label position. More...
 
class  Layer
 A layer of spacial entites. More...
 
class  Pal
 Pal main class. More...
 
class  PalException
 Various Exceptions. More...
 
class  PalGeometry
 Interface that allows Pal to access user's geometries. More...
 
class  PalStat
 Summury of problem. More...
 
struct  Point
 
class  PointSet
 
class  PolygonCostCalculator
 Data structure to compute polygon's candidates costs. More...
 
class  PriorityQueue
 
class  Problem
 Represent a problem. More...
 
singleton  RTree
 
class  Sol
 
struct  SubPartContext
 
struct  UpdateContext
 

Typedefs

typedef struct pal::_chain Chain
 
typedef struct pal::_cHullBox CHullBox
 
typedef struct
pal::_elementary_transformation 
ElemTrans
 
typedef struct pal::_featCbackCtx FeatCallBackCtx
 
typedef struct pal::_filterContext FilterContext
 
typedef struct pal::_nokContext NokContext
 
typedef struct pal::_subpart SubPart
 
typedef struct pal::_Triple Triple
 

Enumerations

enum  Arrangement {
  P_POINT = 0, P_POINT_OVER, P_LINE, P_CURVED,
  P_HORIZ, P_FREE
}
 The way to arrange labels against spatial entities. More...
 
enum  LineArrangementFlag { FLAG_ON_LINE = 1, FLAG_ABOVE_LINE = 2, FLAG_BELOW_LINE = 4, FLAG_MAP_ORIENTATION = 8 }
 Enumeration line arrangement flags. More...
 
enum  ObstacleType { PolygonInterior, PolygonBoundary }
 
enum  SearchMethod {
  CHAIN = 0, POPMUSIC_TABU_CHAIN = 1, POPMUSIC_TABU = 2, POPMUSIC_CHAIN = 3,
  FALP = 4
}
 Search method to use. More...
 

Functions

static LabelPosition_createCurvedCandidate (LabelPosition *lp, double angle, double dist)
 
static FeaturePart_findConnectedPart (FeaturePart *partCheck, QLinkedList< FeaturePart * > *otherParts)
 
void actualizeCandidateList (int nbOverlap, int *candidateListSize, double candidateBaseFactor, double *candidateFactor, int minCandidateListSize, double growingFactor, int n)
 
void actualizeTabuCandidateList (int m, int iteration, int nbOverlap, int *candidateListSize, double candidateBaseFactor, double *candidateFactor, int minCandidateListSize, double reductionFactor, int minTabuTSize, double tabuFactor, int *tenure, int n)
 
bool bigger (double l, double r)
 
bool borderSizeDec (void *l, void *r)
 
bool borderSizeInc (void *l, void *r)
 
bool chainCallback (LabelPosition *lp, void *context)
 
bool checkCallback (LabelPosition *lp, void *ctx)
 
bool computeLineIntersection (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y)
 
int convexHullId (int *id, const double *const x, const double *const y, int n, int *&cHull)
 
double cross_product (double x1, double y1, double x2, double y2, double x3, double y3)
 
bool decreaseCost (void *tl, void *tr)
 
void delete_chain (Chain *chain)
 
double dist_euc2d (double x1, double y1, double x2, double y2)
 
double dist_euc2d_sq (double x1, double y1, double x2, double y2)
 
bool extractFeatCallback (FeaturePart *ft_ptr, void *ctx)
 
bool falpCallback1 (LabelPosition *lp, void *ctx)
 
bool falpCallback2 (LabelPosition *lp, void *ctx)
 
bool filteringCallback (FeaturePart *featurePart, void *ctx)
 
void findLineCircleIntersection (double cx, double cy, double radius, double x1, double y1, double x2, double y2, double &xRes, double &yRes)
 
GEOSContextHandle_t geosContext ()
 Get GEOS context handle to be used in all GEOS library calls with reentrant API. More...
 
void geosError (const char *fmt,...)
 
void geosNotice (const char *fmt,...)
 
void heapsort (int *sid, int *id, const double *const x, int N)
 
void heapsort2 (int *x, double *heap, int N)
 
void ignoreLabel (LabelPosition *lp, PriorityQueue *list, RTree< LabelPosition *, double, 2, double > *candidates)
 
bool increaseCost (void *tl, void *tr)
 
bool increaseImportance (void *l, void *r)
 
bool increaseNbOverlap (void *l, void *r)
 
bool isSegIntersects (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
 
bool nokCallback (LabelPosition *lp, void *context)
 
bool ptrGeomEq (const GEOSGeometry *l, const GEOSGeometry *r)
 
int reorderPolygon (int nbPoints, double *x, double *y)
 
bool smaller (double l, double r)
 
void sort (void **items, int N, bool(*greater)(void *l, void *r))
 Sort an array of pointers. More...
 
bool subPartCallback (LabelPosition *lp, void *ctx)
 
QLinkedList< const
GEOSGeometry * > * 
unmulti (const GEOSGeometry *the_geom)
 
bool updateCandidatesCost (LabelPosition *lp, void *context)
 

Detailed Description

Introduction

Pal is a labelling library released under the GPLv3 license

Typedef Documentation

typedef struct pal::_chain pal::Chain
typedef struct pal::_cHullBox pal::CHullBox
typedef struct pal::_subpart pal::SubPart
typedef struct pal::_Triple pal::Triple

Enumeration Type Documentation

The way to arrange labels against spatial entities.

image html arrangement.png "Arrangement modes" width=7cm

Enumerator
P_POINT 

arranges candidates around a point (centroid for polygon)

P_POINT_OVER 
P_LINE 

arranges candidates over a point (centroid for polygon)

Only for lines and polygons, arranges candidates over the line or the polygon perimeter

P_CURVED 
P_HORIZ 

Only for lines, labels along the line.

Only for polygon, arranges candidates horizontaly

P_FREE 

Only for polygon, arranges candidates with respect of polygon orientation.

Definition at line 75 of file pal.h.

Enumeration line arrangement flags.

Flags can be combined.

Enumerator
FLAG_ON_LINE 
FLAG_ABOVE_LINE 
FLAG_BELOW_LINE 
FLAG_MAP_ORIENTATION 

Definition at line 86 of file pal.h.

Enumerator
PolygonInterior 
PolygonBoundary 

Definition at line 95 of file pal.h.

Search method to use.

Enumerator
CHAIN 

is the worst but fastest method

POPMUSIC_TABU_CHAIN 

is the best but slowest

POPMUSIC_TABU 

is a little bit better than CHAIN but slower

POPMUSIC_CHAIN 

is slower and best than TABU, worse and faster than TABU_CHAIN

FALP 

Definition at line 62 of file pal.h.

Function Documentation

static LabelPosition* pal::_createCurvedCandidate ( LabelPosition *  lp,
double  angle,
double  dist 
)
static

Definition at line 844 of file feature.cpp.

static FeaturePart* pal::_findConnectedPart ( FeaturePart *  partCheck,
QLinkedList< FeaturePart * > *  otherParts 
)
static

Definition at line 306 of file layer.cpp.

void pal::actualizeCandidateList ( int  nbOverlap,
int *  candidateListSize,
double  candidateBaseFactor,
double *  candidateFactor,
int  minCandidateListSize,
double  growingFactor,
int  n 
)
inline

Definition at line 834 of file problem.cpp.

void pal::actualizeTabuCandidateList ( int  m,
int  iteration,
int  nbOverlap,
int *  candidateListSize,
double  candidateBaseFactor,
double *  candidateFactor,
int  minCandidateListSize,
double  reductionFactor,
int  minTabuTSize,
double  tabuFactor,
int *  tenure,
int  n 
)
inline

Definition at line 813 of file problem.cpp.

bool pal::bigger ( double  l,
double  r 
)

Definition at line 43 of file priorityqueue.cpp.

bool pal::borderSizeDec ( void *  l,
void *  r 
)
inline

Definition at line 122 of file problem.cpp.

bool pal::borderSizeInc ( void *  l,
void *  r 
)
inline

Definition at line 127 of file problem.cpp.

bool pal::chainCallback ( LabelPosition *  lp,
void *  context 
)

Definition at line 1276 of file problem.cpp.

bool pal::checkCallback ( LabelPosition *  lp,
void *  ctx 
)

Definition at line 2350 of file problem.cpp.

bool pal::computeLineIntersection ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double  x4,
double  y4,
double *  x,
double *  y 
)

Definition at line 152 of file geomfunction.cpp.

int pal::convexHullId ( int *  id,
const double *const  x,
const double *const  y,
int  n,
int *&  cHull 
)

Definition at line 193 of file geomfunction.cpp.

double pal::cross_product ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
)
inline

Definition at line 47 of file geomfunction.h.

bool pal::decreaseCost ( void *  tl,
void *  tr 
)

Definition at line 801 of file problem.cpp.

void pal::delete_chain ( Chain *  chain)
inline

Definition at line 52 of file problem.cpp.

double pal::dist_euc2d ( double  x1,
double  y1,
double  x2,
double  y2 
)
inline

Definition at line 52 of file geomfunction.h.

double pal::dist_euc2d_sq ( double  x1,
double  y1,
double  x2,
double  y2 
)
inline

Definition at line 57 of file geomfunction.h.

bool pal::extractFeatCallback ( FeaturePart *  ft_ptr,
void *  ctx 
)

Definition at line 195 of file pal.cpp.

bool pal::falpCallback1 ( LabelPosition *  lp,
void *  ctx 
)

Definition at line 281 of file problem.cpp.

bool pal::falpCallback2 ( LabelPosition *  lp,
void *  ctx 
)

Definition at line 244 of file problem.cpp.

bool pal::filteringCallback ( FeaturePart *  featurePart,
void *  ctx 
)

Definition at line 269 of file pal.cpp.

void pal::findLineCircleIntersection ( double  cx,
double  cy,
double  radius,
double  x1,
double  y1,
double  x2,
double  y2,
double &  xRes,
double &  yRes 
)

Definition at line 363 of file geomfunction.cpp.

GEOSContextHandle_t pal::geosContext ( )

Get GEOS context handle to be used in all GEOS library calls with reentrant API.

Definition at line 73 of file pal.cpp.

void pal::geosError ( const char *  fmt,
  ... 
)

Definition at line 57 of file pal.cpp.

void pal::geosNotice ( const char *  fmt,
  ... 
)

Definition at line 65 of file pal.cpp.

void pal::heapsort ( int *  sid,
int *  id,
const double *const  x,
int  N 
)

Definition at line 38 of file geomfunction.cpp.

void pal::heapsort2 ( int *  x,
double *  heap,
int  N 
)

Definition at line 80 of file geomfunction.cpp.

void pal::ignoreLabel ( LabelPosition *  lp,
PriorityQueue *  list,
RTree< LabelPosition *, double, 2, double > *  candidates 
)

Definition at line 257 of file problem.cpp.

bool pal::increaseCost ( void *  tl,
void *  tr 
)

Definition at line 806 of file problem.cpp.

bool pal::increaseImportance ( void *  l,
void *  r 
)
inline

Definition at line 132 of file problem.cpp.

bool pal::increaseNbOverlap ( void *  l,
void *  r 
)
inline

Definition at line 137 of file problem.cpp.

bool pal::isSegIntersects ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double  x4,
double  y4 
)

Definition at line 134 of file geomfunction.cpp.

bool pal::nokCallback ( LabelPosition *  lp,
void *  context 
)

Definition at line 2424 of file problem.cpp.

bool pal::ptrGeomEq ( const GEOSGeometry *  l,
const GEOSGeometry *  r 
)
inline

Definition at line 108 of file util.cpp.

int pal::reorderPolygon ( int  nbPoints,
double *  x,
double *  y 
)

Definition at line 295 of file geomfunction.cpp.

bool pal::smaller ( double  l,
double  r 
)

Definition at line 38 of file priorityqueue.cpp.

void pal::sort ( void **  items,
int  N,
bool(*)(void *l, void *r)  greater 
)

Sort an array of pointers.

Parameters
itemsarays of pointers to sort
Nnumber of items
greaterfunction to compare two items

Definition at line 61 of file util.cpp.

bool pal::subPartCallback ( LabelPosition *  lp,
void *  ctx 
)

Definition at line 638 of file problem.cpp.

QLinkedList< const GEOSGeometry * > * pal::unmulti ( const GEOSGeometry *  the_geom)

Definition at line 113 of file util.cpp.

bool pal::updateCandidatesCost ( LabelPosition *  lp,
void *  context 
)

Definition at line 863 of file problem.cpp.