~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to python/core/qgsdistancearea.sip

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
class QgsDistanceArea
 
3
{
 
4
%TypeHeaderCode
 
5
#include <qgsdistancearea.h>
 
6
%End
 
7
 
 
8
  public:
 
9
 
 
10
    //! Constructor
 
11
    QgsDistanceArea();
 
12
    
 
13
    //! Destructor
 
14
    ~QgsDistanceArea();
 
15
    
 
16
    //! sets whether coordinates must be projected to ellipsoid before measuring
 
17
    void setProjectionsEnabled(bool flag);
 
18
 
 
19
    //! returns projections enabled flag
 
20
    bool hasCrsTransformEnabled();
 
21
    
 
22
    //! sets source spatial reference system (by QGIS CRS)
 
23
    void setSourceCrs(long srsid);
 
24
    
 
25
    //! sets source spatial reference system (by EpsgCrsId)
 
26
    void setSourceEpsgCrsId(long epsgId);
 
27
 
 
28
    //! returns source spatial reference system
 
29
    long sourceCrs();
 
30
    //! What sort of coordinate system is being used?
 
31
    bool geographic();
 
32
 
 
33
    //! sets ellipsoid by its acronym
 
34
    bool setEllipsoid(const QString& ellipsoid);
 
35
    
 
36
    //! returns ellipsoid's acronym
 
37
    const QString& ellipsoid();
 
38
    
 
39
    //! returns ellipsoid's semi major axis
 
40
    double ellipsoidSemiMajor();
 
41
    //! returns ellipsoid's semi minor axis
 
42
    double ellipsoidSemiMinor();
 
43
    //! returns ellipsoid's inverse flattening
 
44
    double ellipsoidInverseFlattening();
 
45
    
 
46
    //! general measurement (line distance or polygon area)
 
47
    double measure(QgsGeometry* geometry);
 
48
    
 
49
    //! measures line with more segments
 
50
    double measureLine(const QList<QgsPoint>& points);
 
51
    
 
52
    //! measures line with one segment
 
53
    double measureLine(const QgsPoint& p1, const QgsPoint& p2);
 
54
    
 
55
    //! measures polygon area
 
56
    double measurePolygon(const QList<QgsPoint>& points);
 
57
    
 
58
    //! compute bearing - in radians
 
59
    double bearing(const QgsPoint& p1, const QgsPoint& p2);
 
60
 
 
61
    static QString textUnit(double value, int decimals, QGis::UnitType u, bool isArea);    
 
62
 
 
63
};