MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
lti_geoCoord.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12 
13 #ifndef LTI_GEOCOORD_H
14 #define LTI_GEOCOORD_H
15 
16 // lt_lib_mrsid_core
17 #include "lti_types.h"
18 
19 #include <stdlib.h>
20 
21 LT_BEGIN_NAMESPACE(LizardTech)
22 
23 
33 {
34 public:
48  LTIGeoCoord(double xUL, double yUL,
49  double xRes, double yRes,
50  double xRot, double yRot,
51  const char *wkt = NULL);
52 
56  LTIGeoCoord();
57 
61  LTIGeoCoord(const LTIGeoCoord&);
62 
66  ~LTIGeoCoord();
67 
71  LTIGeoCoord& operator=(const LTIGeoCoord&);
72 
76  bool operator==(const LTIGeoCoord&) const;
77 
81  bool operator!=(const LTIGeoCoord&) const;
82 
90  double getX() const;
91 
99  double getY() const;
100 
108  double getXRes() const;
109 
117  double getYRes() const;
118 
126  double getXRot() const;
127 
135  double getYRot() const;
136 
144  const char *getWKT() const;
145 
146 
147 
161  void get(double& xUL, double& yUL,
162  double& xRes, double& yRes,
163  double& xRot, double& yRot) const;
164 
175  LT_STATUS pixelToGeo(double pixelX, double pixelY, double mag,
176  double &geoX, double &geoY) const;
177 
188  LT_STATUS geoToPixel(double geoX, double geoY, double mag,
189  double &pixelX, double &pixelY) const;
190 
200  LTIGeoCoord getGeoCoordForScene(const LTIScene &scene) const;
201 
209  void setX(double x);
210 
218  void setY(double y);
219 
227  void setXRes(double xRes);
228 
236  void setYRes(double yRes);
237 
245  void setXRot(double xRot);
246 
254  void setYRot(double yRot);
255 
269  void set(double xUL, double yUL,
270  double xRes, double yRes,
271  double xRot, double yRot);
272 
280  void setWKT(const char *wkt);
281 
293  LT_STATUS writeWorldFile(const LTFileSpec& fileSpec,
294  bool determineExtension) const;
295 
307  LT_STATUS readWorldFile(const LTFileSpec& fileSpec,
308  bool determineExtension,
309  bool& fileFound);
310 
320  LT_STATUS readWorldFile(LTIOStreamInf& stream);
321 
340  static LT_STATUS getWorldFileExtension(const LTFileSpec& fileSpec,
341  char* ext);
342 
343 
352  LT_STATUS writeMetadata(LTIMetadataDatabase &metadata) const;
353 
363  LT_STATUS readMetadata(const LTIMetadataDatabase &metadata, bool &found);
364 
365 private:
366  double m_xUL;
367  double m_yUL;
368  double m_xRes;
369  double m_yRes;
370  double m_xRot;
371  double m_yRot;
372 
373  char *m_wkt;
374 };
375 
376 LT_END_NAMESPACE(LizardTech)
377 
378 
379 #endif // LTI_GEOCOORD_H
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK...
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
representation of a scene
Definition: lti_scene.h:64
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
Represents a file or directory path.
Definition: lt_fileSpec.h:33
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
represents a geographic coordinate
Definition: lti_geoCoord.h:32
Abstract definition of a stream.
class for storing metadata associated with an image

LizardTech