QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
pal::PointSet Class Reference

#include <pointset.h>

Inheritance diagram for pal::PointSet:
Inheritance graph
[legend]

Public Member Functions

 PointSet ()
 PointSet (int nbPoints, double *x, double *y)
virtual ~PointSet ()
CHullBoxcompute_chull_bbox ()
PointSetcreateProblemSpecificPointSet (double bbmin[2], double bbmax[2], bool *inside)
PointSetextractShape (int nbPtSh, int imin, int imax, int fps, int fpe, double fptx, double fpty)
void getBoundingBox (double min[2], double max[2]) const
void getCentroid (double &px, double &py, bool forceInside=false)
double getDist (double px, double py, double *rx, double *ry)
 return the minimum distance bw this and the point (px,py)
int getGeosType () const
PointSetgetHoleOf ()
 returns NULL if this isn't a hole.
int getNumPoints () const
void getPoint (double *d, double *ad, double dl, double *px, double *py)

Static Public Member Functions

static void splitPolygons (LinkedList< PointSet * > *shapes_toProcess, LinkedList< PointSet * > *shapes_final, double xrm, double yrm, char *uid)

Protected Member Functions

 PointSet (double x, double y)
 PointSet (PointSet &ps)
void deleteCoords ()

Protected Attributes

int * cHull
int cHullSize
PointSetholeOf
int nbPoints
PointSetparent
int type
double * x
double xmax
double xmin
double * y
double ymax
double ymin

Friends

class CostCalculator
class FeaturePart
class LabelPosition
class Layer
class PolygonCostCalculator

Detailed Description

Definition at line 92 of file pointset.h.

Constructor & Destructor Documentation

pal::PointSet::PointSet ( double  x,
double  y 
)
protected

Definition at line 93 of file pointset.cpp.

pal::PointSet::PointSet ( PointSet ps)
protected

Definition at line 110 of file pointset.cpp.

pal::PointSet::PointSet ( )

Definition at line 55 of file pointset.cpp.

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

Definition at line 70 of file pointset.cpp.

pal::PointSet::~PointSet ( )
virtual

Definition at line 149 of file pointset.cpp.

Member Function Documentation

CHullBox * pal::PointSet::compute_chull_bbox ( )

Definition at line 618 of file pointset.cpp.

PointSet * pal::PointSet::createProblemSpecificPointSet ( double  bbmin[2],
double  bbmax[2],
bool *  inside 
)

Definition at line 581 of file pointset.cpp.

void pal::PointSet::deleteCoords ( )
protected

Definition at line 157 of file pointset.cpp.

PointSet * pal::PointSet::extractShape ( int  nbPtSh,
int  imin,
int  imax,
int  fps,
int  fpe,
double  fptx,
double  fpty 
)

Definition at line 170 of file pointset.cpp.

void pal::PointSet::getBoundingBox ( double  min[2],
double  max[2] 
) const
inline

Definition at line 168 of file pointset.h.

void pal::PointSet::getCentroid ( double &  px,
double &  py,
bool  forceInside = false 
)

Definition at line 979 of file pointset.cpp.

double pal::PointSet::getDist ( double  px,
double  py,
double *  rx,
double *  ry 
)

return the minimum distance bw this and the point (px,py)

compute the minimum distance bw the point (px,py) and this. Optionnaly, store the nearest point in (rx,ry)

Parameters
pxx coordinate of the point
pyy coordinate of the points
rxpointer to x coorinates of the nearest point (can be NULL)
rypointer to y coorinates of the nearest point (can be NULL)

Definition at line 910 of file pointset.cpp.

int pal::PointSet::getGeosType ( ) const
inline

Definition at line 166 of file pointset.h.

PointSet* pal::PointSet::getHoleOf ( )
inline

returns NULL if this isn't a hole.

Otherwise returns pointer to parent pointset.

Definition at line 175 of file pointset.h.

int pal::PointSet::getNumPoints ( ) const
inline

Definition at line 177 of file pointset.h.

void pal::PointSet::getPoint ( double *  d,
double *  ad,
double  dl,
double *  px,
double *  py 
)
inline

Definition at line 190 of file pointset.h.

void pal::PointSet::splitPolygons ( LinkedList< PointSet * > *  shapes_toProcess,
LinkedList< PointSet * > *  shapes_final,
double  xrm,
double  yrm,
char *  uid 
)
static

Definition at line 216 of file pointset.cpp.

Friends And Related Function Documentation

friend class CostCalculator
friend

Definition at line 96 of file pointset.h.

friend class FeaturePart
friend

Definition at line 94 of file pointset.h.

friend class LabelPosition
friend

Definition at line 95 of file pointset.h.

friend class Layer
friend

Definition at line 98 of file pointset.h.

friend class PolygonCostCalculator
friend

Definition at line 97 of file pointset.h.

Member Data Documentation

int* pal::PointSet::cHull
protected

Definition at line 105 of file pointset.h.

int pal::PointSet::cHullSize
protected

Definition at line 106 of file pointset.h.

PointSet* pal::PointSet::holeOf
protected

Definition at line 110 of file pointset.h.

int pal::PointSet::nbPoints
protected

Definition at line 101 of file pointset.h.

PointSet* pal::PointSet::parent
protected

Definition at line 111 of file pointset.h.

int pal::PointSet::type
protected

Definition at line 108 of file pointset.h.

double* pal::PointSet::x
protected

Definition at line 102 of file pointset.h.

double pal::PointSet::xmax
protected

Definition at line 120 of file pointset.h.

double pal::PointSet::xmin
protected

Definition at line 119 of file pointset.h.

double* pal::PointSet::y
protected

Definition at line 103 of file pointset.h.

double pal::PointSet::ymax
protected

Definition at line 122 of file pointset.h.

double pal::PointSet::ymin
protected

Definition at line 121 of file pointset.h.


The documentation for this class was generated from the following files: