openModeller  Version 1.5.0
GeoTransform.hh
Go to the documentation of this file.
1 
29 #ifndef _GEO_TRANSFHH_
30 #define _GEO_TRANSFHH_
31 
33 #include <openmodeller/om_defs.hh>
34 #include <string>
35 
36 class OGRCoordinateTransformation;
37 
38 
39 /****************************************************************/
40 /******************** Geographic Transformation *****************/
41 
57 /****************/
58 class dllexp GeoTransform
59 {
60 public:
61 
62  // 'dst' and 'src' must follow the WKT (Well Known Text) format.
63  //
64  // TODO: expand to use EPSG, ESRI or Proj4 formats.
65  //
66  GeoTransform();
67  GeoTransform( const std::string& in, const std::string& out );
68  ~GeoTransform();
69 
70  void change( const std::string& in, const std::string& out );
71  void change();
72 
73  // From 'out' to 'in'.
74  int transfIn( double *x, double *y ) const;
75  int transfIn( double *x, double *y, double x0, double y0 ) const;
76 
77  // From 'in' to 'out'.
78  int transfOut( double *x, double *y ) const;
79  int transfOut( double *x, double *y, double x0, double y0 ) const;
80 
81  // Default coordinate system.
82  static char const * getDefaultCS();
83 
84  // Compare two coordinate system strings (WKT).
85  static bool compareCoordSystemStrings(char const * s1, char const * s2);
86 
87 private:
88 
89  bool identity;
90 
91  OGRCoordinateTransformation *f_ctin;
92  OGRCoordinateTransformation *f_ctout;
93 
94  // Disable copying.
95  GeoTransform( const GeoTransform& );
96  GeoTransform& operator=( const GeoTransform& );
97 
98 };
99 
100 
101 
102 #endif
OGRCoordinateTransformation * f_ctin
Definition: GeoTransform.hh:91
OGRCoordinateTransformation * f_ctout
Definition: GeoTransform.hh:92