QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsdatumtransformstore.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdatumtransformstore.h
3  ---------------------
4  begin : June 2014
5  copyright : (C) 2014 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSDATUMTRANSFORMSTORE_H
16 #define QGSDATUMTRANSFORMSTORE_H
17 
19 
21 class QgsMapLayer;
22 
23 class QDomElement;
24 
25 
32 class CORE_EXPORT QgsDatumTransformStore
33 {
34  public:
35  explicit QgsDatumTransformStore( const QgsCoordinateReferenceSystem& destCrs );
36 
37  void clear();
38 
39  void setDestinationCrs( const QgsCoordinateReferenceSystem& destCrs );
40 
41  void addEntry( const QString& layerId, const QString& srcAuthId, const QString& destAuthId, int srcDatumTransform, int destDatumTransform );
42 
43  bool hasEntryForLayer( QgsMapLayer* layer ) const;
44 
49  const QgsCoordinateTransform* transformation( QgsMapLayer* layer ) const;
50 
51  void readXML( const QDomNode& parentNode );
52 
53  void writeXML( QDomNode& parentNode, QDomDocument& theDoc ) const;
54 
55  struct Entry
56  {
59  int srcDatumTransform; //-1 if unknown or not specified
61  };
62 
63  protected:
65 
68 };
69 
70 #endif // QGSDATUMTRANSFORMSTORE_H
Base class for all map layer types.
Definition: qgsmaplayer.h:49
QgsCoordinateReferenceSystem mDestCRS
The QgsDatumTransformStore class keeps track of datum transformations as chosen by the user...
Class for storing a coordinate reference system (CRS)
Class for doing transforms between two map coordinate systems.
QHash< QString, Entry > mEntries
key = layer ID