|
QGIS API Documentation
2.6.0-Brighton
|
Main class to handle feature. More...
#include <feature.h>

Public Member Functions | |
| FeaturePart (Feature *feat, const GEOSGeometry *geom) | |
| create a new generic feature | |
| virtual | ~FeaturePart () |
| Delete the feature. | |
| int | setPositionForPoint (double x, double y, double scale, LabelPosition ***lPos, double delta_width, double angle) |
| generate candidates for point feature Generate candidates for point features | |
| int | setPositionOverPoint (double x, double y, double scale, LabelPosition ***lPos, double delta_width, double angle) |
| generate one candidate over specified point | |
| int | setPositionForLine (double scale, LabelPosition ***lPos, PointSet *mapShape, double delta_width) |
| generate candidates for line feature Generate candidates for line features | |
| LabelPosition * | curvedPlacementAtOffset (PointSet *path_positions, double *path_distances, int orientation, int index, double distance) |
| int | setPositionForLineCurved (LabelPosition ***lPos, PointSet *mapShape) |
| Generate curved candidates for line features. | |
| int | setPositionForPolygon (double scale, LabelPosition ***lPos, PointSet *mapShape, double delta_width) |
| generate candidates for point feature Generate candidates for point features | |
| Feature * | getFeature () |
| return the feature | |
| const GEOSGeometry * | getGeometry () const |
| return the geometry | |
| Layer * | getLayer () |
| return the layer that feature belongs to | |
| int | setPosition (double scale, LabelPosition ***lPos, double bbox_min[2], double bbox_max[2], PointSet *mapShape, RTree< LabelPosition *, double, 2, double > *candidates) |
| generic method to generate candidates This method will call either setPositionFromPoint(), setPositionFromLine or setPositionFromPolygon | |
| const char * | getUID () |
| get the unique id of the feature | |
| void | print () |
| Print feature information Print feature unique id, geometry type, points, and holes on screen. | |
| PalGeometry * | getUserGeometry () |
| void | setLabelSize (double lx, double ly) |
| double | getLabelWidth () const |
| double | getLabelHeight () const |
| void | setLabelDistance (double dist) |
| double | getLabelDistance () const |
| void | setLabelInfo (LabelInfo *info) |
| bool | getFixedRotation () |
| double | getLabelAngle () |
| bool | getFixedPosition () |
| bool | getAlwaysShow () |
| int | getNumSelfObstacles () const |
| PointSet * | getSelfObstacle (int i) |
| bool | isConnected (FeaturePart *p2) |
| check whether this part is connected with some other part | |
| bool | mergeWithFeaturePart (FeaturePart *other) |
| merge other (connected) part with this one and save the result in this part (other is unchanged). | |
| void | addSizePenalty (int nbp, LabelPosition **lPos, double bbx[4], double bby[4]) |
Public Member Functions inherited from pal::PointSet | |
| PointSet () | |
| PointSet (int nbPoints, double *x, double *y) | |
| virtual | ~PointSet () |
| PointSet * | extractShape (int nbPtSh, int imin, int imax, int fps, int fpe, double fptx, double fpty) |
| PointSet * | createProblemSpecificPointSet (double bbmin[2], double bbmax[2], bool *inside) |
| CHullBox * | compute_chull_bbox () |
| double | getDist (double px, double py, double *rx, double *ry) |
| return the minimum distance bw this and the point (px,py) | |
| void | getCentroid (double &px, double &py, bool forceInside=false) |
| int | getGeosType () const |
| void | getBoundingBox (double min[2], double max[2]) const |
| PointSet * | getHoleOf () |
| returns NULL if this isn't a hole. | |
| int | getNumPoints () const |
| void | getPoint (double *d, double *ad, double dl, double *px, double *py) |
Protected Member Functions | |
| void | extractCoords (const GEOSGeometry *geom) |
| read coordinates from a GEOS geom | |
| void | removeDuplicatePoints () |
| find duplicate (or nearly duplicate points) and remove them. | |
Protected Member Functions inherited from pal::PointSet | |
| PointSet (double x, double y) | |
| PointSet (PointSet &ps) | |
| void | deleteCoords () |
Protected Attributes | |
| Feature * | f |
| int | nbHoles |
| PointSet ** | holes |
| GEOSGeometry * | the_geom |
| bool | ownsGeom |
Protected Attributes inherited from pal::PointSet | |
| int | nbPoints |
| double * | x |
| double * | y |
| int * | cHull |
| int | cHullSize |
| int | type |
| PointSet * | holeOf |
| PointSet * | parent |
| double | xmin |
| double | xmax |
| double | ymin |
| double | ymax |
Additional Inherited Members | |
Static Public Member Functions inherited from pal::PointSet | |
| static void | splitPolygons (LinkedList< PointSet * > *shapes_toProcess, LinkedList< PointSet * > *shapes_final, double xrm, double yrm, char *uid) |
Main class to handle feature.
| pal::FeaturePart::FeaturePart | ( | Feature * | feat, |
| const GEOSGeometry * | geom | ||
| ) |
create a new generic feature
| feat | a pointer for a Feat which contains the spatial entites |
| geom | a pointer to a GEOS geometry |
|
virtual |
Delete the feature.
| void pal::FeaturePart::addSizePenalty | ( | int | nbp, |
| LabelPosition ** | lPos, | ||
| double | bbx[4], | ||
| double | bby[4] | ||
| ) |
| LabelPosition * pal::FeaturePart::curvedPlacementAtOffset | ( | PointSet * | path_positions, |
| double * | path_distances, | ||
| int | orientation, | ||
| int | index, | ||
| double | distance | ||
| ) |
|
protected |
read coordinates from a GEOS geom
|
inline |
|
inline |
return the feature
|
inline |
|
inline |
|
inline |
return the geometry
|
inline |
|
inline |
|
inline |
|
inline |
| Layer * pal::FeaturePart::getLayer | ( | ) |
return the layer that feature belongs to
|
inline |
|
inline |
| const char * pal::FeaturePart::getUID | ( | ) |
get the unique id of the feature
|
inline |
| bool pal::FeaturePart::isConnected | ( | FeaturePart * | p2 | ) |
check whether this part is connected with some other part
| bool pal::FeaturePart::mergeWithFeaturePart | ( | FeaturePart * | other | ) |
merge other (connected) part with this one and save the result in this part (other is unchanged).
Return true on success, false if the feature wasn't modified
| void pal::FeaturePart::print | ( | ) |
Print feature information Print feature unique id, geometry type, points, and holes on screen.
|
protected |
find duplicate (or nearly duplicate points) and remove them.
Probably to avoid numerical errors in geometry algorithms.
|
inline |
|
inline |
|
inline |
| int pal::FeaturePart::setPosition | ( | double | scale, |
| LabelPosition *** | lPos, | ||
| double | bbox_min[2], | ||
| double | bbox_max[2], | ||
| PointSet * | mapShape, | ||
| RTree< LabelPosition *, double, 2, double > * | candidates | ||
| ) |
generic method to generate candidates This method will call either setPositionFromPoint(), setPositionFromLine or setPositionFromPolygon
| scale | the map scale is 1:scale |
| lPos | pointer to candidates array in which candidates will be put |
| bbox_min | min values of the map extent |
| bbox_max | max values of the map extent |
| mapShape | generate candidates for this spatial entites |
| candidates | index for candidates |
| int pal::FeaturePart::setPositionForLine | ( | double | scale, |
| LabelPosition *** | lPos, | ||
| PointSet * | mapShape, | ||
| double | delta_width | ||
| ) |
generate candidates for line feature Generate candidates for line features
| scale | map scale is 1:scale |
| lPos | pointer to an array of candidates, will be filled by generated candidates |
| mapShape | a pointer to the line |
| delta_width | delta width |
| int pal::FeaturePart::setPositionForLineCurved | ( | LabelPosition *** | lPos, |
| PointSet * | mapShape | ||
| ) |
Generate curved candidates for line features.
| int pal::FeaturePart::setPositionForPoint | ( | double | x, |
| double | y, | ||
| double | scale, | ||
| LabelPosition *** | lPos, | ||
| double | delta_width, | ||
| double | angle | ||
| ) |
generate candidates for point feature Generate candidates for point features
| x | x coordinates of the point |
| y | y coordinates of the point |
| scale | map scale is 1:scale |
| lPos | pointer to an array of candidates, will be filled by generated candidates |
| delta_width | delta width |
| angle | orientation of the label |
| int pal::FeaturePart::setPositionForPolygon | ( | double | scale, |
| LabelPosition *** | lPos, | ||
| PointSet * | mapShape, | ||
| double | delta_width | ||
| ) |
generate candidates for point feature Generate candidates for point features
| scale | map scale is 1:scale |
| lPos | pointer to an array of candidates, will be filled by generated candidates |
| mapShape | a pointer to the polygon |
| delta_width | delta width |
| int pal::FeaturePart::setPositionOverPoint | ( | double | x, |
| double | y, | ||
| double | scale, | ||
| LabelPosition *** | lPos, | ||
| double | delta_width, | ||
| double | angle | ||
| ) |
generate one candidate over specified point
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.1.2