Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changed line endings from DOS-style to UNIX-style so SIP won't end up…
… with syntax errors on unix git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6740 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
wonder
committed
Mar 2, 2007
1 parent
1de1930
commit 5b6e776
Showing
1 changed file
with
60 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
class QgsDistanceArea | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsdistancearea.h> | ||
%End | ||
public: | ||
//! Constructor | ||
QgsDistanceArea(); | ||
//! Destructor | ||
~QgsDistanceArea(); | ||
//! sets whether coordinates must be projected to ellipsoid before measuring | ||
void setProjectionsEnabled(bool flag); | ||
//! returns projections enabled flag | ||
bool projectionsEnabled(); | ||
//! sets source spatial reference system (by QGIS SRS) | ||
void setSourceSRS(long srsid); | ||
//! returns source spatial reference system | ||
long sourceSRS(); | ||
//! What sort of coordinate system is being used? | ||
bool geographic(); | ||
//! sets ellipsoid by its acronym | ||
bool setEllipsoid(const QString& ellipsoid); | ||
//! returns ellipsoid's acronym | ||
const QString& ellipsoid(); | ||
//! returns ellipsoid's semi major axis | ||
double ellipsoidSemiMajor(); | ||
//! returns ellipsoid's semi minor axis | ||
double ellipsoidSemiMinor(); | ||
//! returns ellipsoid's inverse flattening | ||
double ellipsoidInvFlattening(); | ||
//! general measurement (line distance or polygon area) | ||
double measure(QgsGeometry* geometry); | ||
//! measures line with more segments | ||
// TODO wrap double measureLine(const std::vector<QgsPoint>& points); | ||
//! measures line with one segment | ||
double measureLine(const QgsPoint& p1, const QgsPoint& p2); | ||
//! measures polygon area | ||
// TODO wrap double measurePolygon(const std::vector<QgsPoint>& points); | ||
//! compute bearing - in radians | ||
double getBearing(const QgsPoint& p1, const QgsPoint& p2); | ||
static QString textUnit(double value, int decimals, QGis::units u, bool isArea); | ||
}; | ||
|
||
class QgsDistanceArea | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsdistancearea.h> | ||
%End | ||
|
||
public: | ||
|
||
//! Constructor | ||
QgsDistanceArea(); | ||
|
||
//! Destructor | ||
~QgsDistanceArea(); | ||
|
||
//! sets whether coordinates must be projected to ellipsoid before measuring | ||
void setProjectionsEnabled(bool flag); | ||
|
||
//! returns projections enabled flag | ||
bool projectionsEnabled(); | ||
|
||
//! sets source spatial reference system (by QGIS SRS) | ||
void setSourceSRS(long srsid); | ||
|
||
//! returns source spatial reference system | ||
long sourceSRS(); | ||
//! What sort of coordinate system is being used? | ||
bool geographic(); | ||
|
||
//! sets ellipsoid by its acronym | ||
bool setEllipsoid(const QString& ellipsoid); | ||
|
||
//! returns ellipsoid's acronym | ||
const QString& ellipsoid(); | ||
|
||
//! returns ellipsoid's semi major axis | ||
double ellipsoidSemiMajor(); | ||
//! returns ellipsoid's semi minor axis | ||
double ellipsoidSemiMinor(); | ||
//! returns ellipsoid's inverse flattening | ||
double ellipsoidInvFlattening(); | ||
|
||
//! general measurement (line distance or polygon area) | ||
double measure(QgsGeometry* geometry); | ||
|
||
//! measures line with more segments | ||
// TODO wrap double measureLine(const std::vector<QgsPoint>& points); | ||
|
||
//! measures line with one segment | ||
double measureLine(const QgsPoint& p1, const QgsPoint& p2); | ||
|
||
//! measures polygon area | ||
// TODO wrap double measurePolygon(const std::vector<QgsPoint>& points); | ||
|
||
//! compute bearing - in radians | ||
double getBearing(const QgsPoint& p1, const QgsPoint& p2); | ||
|
||
static QString textUnit(double value, int decimals, QGis::units u, bool isArea); | ||
|
||
}; |