17 #ifndef QGSDISTANCEAREA_H
18 #define QGSDISTANCEAREA_H
45 void setProjectionsEnabled(
bool flag );
51 void setSourceCrs(
long srsid );
54 Q_DECL_DEPRECATED
void setSourceEpsgCrsId(
long epsgId );
57 void setSourceAuthId( QString authid );
62 bool geographic() {
return mCoordTransform->sourceCrs().geographicFlag(); }
65 bool setEllipsoid(
const QString& ellipsoid );
84 double measureLine(
const QList<QgsPoint>& points );
90 double measurePolygon(
const QList<QgsPoint>& points );
95 static QString textUnit(
double value,
int decimals,
QGis::UnitType u,
bool isArea,
bool keepBaseUnit =
false );
99 unsigned char* measureLine(
unsigned char* feature,
double* area,
bool hasZptr =
false );
101 unsigned char* measurePolygon(
unsigned char* feature,
double* area,
double* perimeter,
bool hasZptr =
false );
114 double* course1 = NULL,
double* course2 = NULL );
122 double computePolygonArea(
const QList<QgsPoint>& points );
124 double computePolygonFlatArea(
const QList<QgsPoint>& points );
130 void computeAreaInit();
151 double getQ(
double x );
152 double getQbar(
double x );