MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 #ifndef LTI_GEOCOORD_H 00014 #define LTI_GEOCOORD_H 00015 00016 // lt_lib_mrsid_core 00017 #include "lti_types.h" 00018 00019 #include <stdlib.h> 00020 00021 LT_BEGIN_NAMESPACE(LizardTech) 00022 00023 00032 class LTIGeoCoord 00033 { 00034 public: 00048 LTIGeoCoord(double xUL, double yUL, 00049 double xRes, double yRes, 00050 double xRot, double yRot, 00051 const char *wkt = NULL); 00052 00056 LTIGeoCoord(); 00057 00061 LTIGeoCoord(const LTIGeoCoord&); 00062 00066 ~LTIGeoCoord(); 00067 00071 LTIGeoCoord& operator=(const LTIGeoCoord&); 00072 00076 bool operator==(const LTIGeoCoord&) const; 00077 00081 bool operator!=(const LTIGeoCoord&) const; 00082 00090 double getX() const; 00091 00099 double getY() const; 00100 00108 double getXRes() const; 00109 00117 double getYRes() const; 00118 00126 double getXRot() const; 00127 00135 double getYRot() const; 00136 00144 const char *getWKT() const; 00145 00146 00147 00161 void get(double& xUL, double& yUL, 00162 double& xRes, double& yRes, 00163 double& xRot, double& yRot) const; 00164 00175 LT_STATUS pixelToGeo(double pixelX, double pixelY, double mag, 00176 double &geoX, double &geoY) const; 00177 00188 LT_STATUS geoToPixel(double geoX, double geoY, double mag, 00189 double &pixelX, double &pixelY) const; 00190 00200 LTIGeoCoord getGeoCoordForScene(const LTIScene &scene) const; 00201 00209 void setX(double x); 00210 00218 void setY(double y); 00219 00227 void setXRes(double xRes); 00228 00236 void setYRes(double yRes); 00237 00245 void setXRot(double xRot); 00246 00254 void setYRot(double yRot); 00255 00269 void set(double xUL, double yUL, 00270 double xRes, double yRes, 00271 double xRot, double yRot); 00272 00280 void setWKT(const char *wkt); 00281 00293 LT_STATUS writeWorldFile(const LTFileSpec& fileSpec, 00294 bool determineExtension) const; 00295 00307 LT_STATUS readWorldFile(const LTFileSpec& fileSpec, 00308 bool determineExtension, 00309 bool& fileFound); 00310 00320 LT_STATUS readWorldFile(LTIOStreamInf& stream); 00321 00340 static LT_STATUS getWorldFileExtension(const LTFileSpec& fileSpec, 00341 char* ext); 00342 00343 00352 LT_STATUS writeMetadata(LTIMetadataDatabase &metadata) const; 00353 00363 LT_STATUS readMetadata(const LTIMetadataDatabase &metadata, bool &found); 00364 00365 bool hasRotation(void) const; 00366 00367 private: 00368 double m_xUL; 00369 double m_yUL; 00370 double m_xRes; 00371 double m_yRes; 00372 double m_xRot; 00373 double m_yRot; 00374 00375 char *m_wkt; 00376 }; 00377 00378 LT_END_NAMESPACE(LizardTech) 00379 00380 00381 #endif // LTI_GEOCOORD_H