47 template <
class Type>
class Cell;
50 template<
class DATATYPE,
class ELEMTYPE,
int NUMDIMS,
class ELEMTYPEREAL,
int TMAXNODES,
int TMINNODES>
class RTree;
74 friend void toSVGPath(
int nbPoints,
double *x,
double *y,
int dpi,
Layer *layer,
int type,
char *uid, std::ostream &out,
double scale,
int xmin,
int ymax,
bool exportInfo,
char *color );
77 enum LabelMode { LabelPerFeature, LabelPerFeaturePart };
144 Layer(
const char *lyrName,
double min_scale,
double max_scale,
Arrangement arrangement,
Units label_unit,
double defaultPriority,
bool obstacle,
bool active,
bool toLabel,
Pal *pal,
bool displayAll =
false );
155 bool isScaleValid(
double scale );
158 void addFeaturePart(
FeaturePart* fpart,
const char* labelText = NULL );
169 const char * getName();
190 Units getLabelUnit();
196 void setLabelUnit(
Units label_unit );
207 void setActive(
bool active );
222 void setToLabel(
bool toLabel );
238 void setObstacle(
bool obstacle );
250 void setMinScale(
double min_scale );
255 double getMinScale();
263 void setMaxScale(
double max_scale );
269 double getMaxScale();
278 void setPriority(
double priority );
284 double getPriority();
325 bool registerFeature(
const char *geom_id,
PalGeometry *userGeom,
double label_x = -1,
double label_y = -1,
326 const char* labelText = NULL,
double labelPosX = 0.0,
double labelPosY = 0.0,
327 bool fixedPos =
false,
double angle = 0.0,
bool fixedAngle =
false,
328 int xQuadOffset = 0,
int yQuadOffset = 0,
double xOffset = 0.0,
double yOffset = 0.0,
329 bool alwaysShow =
false,
double repeatDistance = 0 );
335 void joinConnectedFeatures();
338 void chopFeaturesAtRepeatDistance();
Arrangement arrangement
optional flags used for some placement methods
unsigned long arrangementFlags
A layer of spacial entites.
LinkedList< FeaturePart * > * featureParts
list of feature parts
void setUpsidedownLabels(UpsideDownLabels ud)
LinkedList< char * > * connectedTexts
void setCentroidInside(bool forceInside)
bool getCentroidInside() const
UpsideDownLabels getUpsidedownLabels() const
LabelMode getLabelMode() const
bool getDisplayAll() const
optional additional info about label (for curved labels)
bool getMergeConnectedLines() const
HashTable< Feature * > * hashtable
Main class to handle feature.
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
bool extractFeatCallback(FeaturePart *ft_ptr, void *ctx)
static QgsFeature getFeature(const QVariant &value, QgsExpression *parent)
enum _arrangement Arrangement
typedef for _arrangement enumeration
LinkedList< Feature * > * features
list of features - for deletion
UpsideDownLabels upsidedownLabels
void setMergeConnectedLines(bool m)
void setArrangementFlags(unsigned long flags)
LabelPosition is a candidate feature label position.
HashTable< LinkedList< FeaturePart * > * > * connectedHashtable
Interface that allows Pal to access user's geometries.
RTree< FeaturePart *, double, 2, double, 8, 4 > * rtree
enum _Units Units
Typedef for _Units enumeration.
void setLabelMode(LabelMode m)
unsigned long getArrangementFlags() const