34 #ifndef _LABELPOSITION_H 35 #define _LABELPOSITION_H 103 double alpha,
double cost,
117 bool isIn(
double *bbox );
124 bool isIntersect(
double *bbox );
131 bool isInside(
double *bbox );
142 void getBoundingBox(
double amin[2],
double amax[2] )
const;
145 double getDistanceToPoint(
double xp,
double yp );
148 bool isBorderCrossingLine(
PointSet* feat );
151 int getNumPointsInPolygon(
int npol,
double *xp,
double *yp );
154 void offsetPosition(
double xOffset,
double yOffset );
176 probFeat = probFid;
id = lpId;
181 char* getLayerName()
const;
187 double getCost()
const;
190 void setCost(
double newCost ) { cost = newCost; }
200 double getX(
int i = 0 )
const;
205 double getY(
int i = 0 )
const;
214 double getAlpha()
const;
242 static bool costShrink(
void *l,
void *r );
243 static bool costGrow(
void *l,
void *r );
258 static bool countOverlapCallback(
LabelPosition *lp,
void *ctx );
260 static bool countFullOverlapCallback(
LabelPosition *lp,
void *ctx );
262 static bool removeOverlapCallback(
LabelPosition *lp,
void *ctx );
265 static bool polygonObstacleCallback(
PointSet *feat,
void *ctx );
void setCost(double newCost)
Modify candidate's cost.
int getProblemFeatureId() const
LabelPosition * getNextPart() const
Main class to handle feature.
bool getUpsideDown() const
void setNextPart(LabelPosition *next)
LabelPositon is a candidate feature label position.
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.