34 #ifndef _LABELPOSITION_H
35 #define _LABELPOSITION_H
126 double alpha,
double cost,
140 bool isIn(
double *bbox );
147 bool isIntersect(
double *bbox );
154 bool isInside(
double *bbox );
165 void getBoundingBox(
double amin[2],
double amax[2] )
const;
168 double getDistanceToPoint(
double xp,
double yp );
171 bool isBorderCrossingLine(
PointSet* feat );
174 int getNumPointsInPolygon(
int npol,
double *xp,
double *yp );
177 void offsetPosition(
double xOffset,
double yOffset );
199 probFeat = probFid;
id = lpId;
200 if ( nextPart ) nextPart->setProblemIds( probFid, lpId );
204 char* getLayerName()
const;
210 double getCost()
const;
213 void setCost(
double newCost ) { cost = newCost; }
223 double getX(
int i = 0 )
const;
228 double getY(
int i = 0 )
const;
237 double getAlpha()
const;
267 static bool costShrink(
void *l,
void *r );
268 static bool costGrow(
void *l,
void *r );
283 static bool countOverlapCallback(
LabelPosition *lp,
void *ctx );
285 static bool countFullOverlapCallback(
LabelPosition *lp,
void *ctx );
287 static bool removeOverlapCallback(
LabelPosition *lp,
void *ctx );
290 static bool polygonObstacleCallback(
PointSet *feat,
void *ctx );
void setCost(double newCost)
Modify candidate's cost.
int getProblemFeatureId() const
Quadrant getQuadrant() const
LabelPosition * getNextPart() const
Main class to handle feature.
bool getUpsideDown() const
void setNextPart(LabelPosition *next)
LabelPosition is a candidate feature label position.
Quadrant
Position of label candidate relative to feature.
double getNumOverlaps() const
void setProblemIds(int probFid, int lpId)
set problem feature ID and assigned label candidate ID.
Data structure to compute polygon's candidates costs.
LabelPosition::Quadrant quadrant