MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
lti_geoCoord.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef LTI_GEOCOORD_H
9 #define LTI_GEOCOORD_H
10 
11 // lt_lib_mrsid_core
12 #include "lti_types.h"
13 
14 #include <stdlib.h>
15 
16 LT_BEGIN_LIZARDTECH_NAMESPACE
17 
28 {
29 public:
43  LTIGeoCoord(double xUL, double yUL,
44  double xRes, double yRes,
45  double xRot, double yRot,
46  const char *wkt = nullptr);
47 
52 
57 
62 
67 
71  bool operator==(const LTIGeoCoord&) const;
72 
76  bool operator!=(const LTIGeoCoord&) const;
77 
85  double getX() const;
86 
94  double getY() const;
95 
103  double getXRes() const;
104 
112  double getYRes() const;
113 
121  double getXRot() const;
122 
130  double getYRot() const;
131 
139  const char *getWKT() const;
140 
141 
142 
156  void get(double& xUL, double& yUL,
157  double& xRes, double& yRes,
158  double& xRot, double& yRot) const;
159 
170  LT_STATUS pixelToGeo(double pixelX, double pixelY, double mag,
171  double &geoX, double &geoY) const;
172  LT_STATUS pixelToGeoEx(double pixelX, double pixelY, double mag,
173  double &geoX, double &geoY) const;
174 
185  LT_STATUS geoToPixel(double geoX, double geoY, double mag,
186  double &pixelX, double &pixelY) const;
187  LT_STATUS geoToPixelEx(double geoX, double geoY, double mag,
188  double &pixelX, double &pixelY) const;
189 
200 
211  LTIGeoCoord scaleGeoCoord(double xMag, double yMag) const;
212 
213 
221  void setX(double x);
222 
230  void setY(double y);
231 
239  void setXRes(double xRes);
240 
248  void setYRes(double yRes);
249 
257  void setXRot(double xRot);
258 
266  void setYRot(double yRot);
267 
281  void set(double xUL, double yUL,
282  double xRes, double yRes,
283  double xRot, double yRot);
284 
292  void setWKT(const char *wkt);
293 
306  bool determineExtension) const;
307 
320  bool determineExtension,
321  bool& fileFound);
322 
333 
353  char* ext);
354 
355 
365 
375  LT_STATUS readMetadata(const LTIMetadataDatabase &metadata, bool &found);
376 
377  bool hasRotation(void) const;
378 
379 private:
380  double m_xUL;
381  double m_yUL;
382  double m_xRes;
383  double m_yRes;
384  double m_xRot;
385  double m_yRot;
386 
387  char *m_wkt;
388 };
389 
390 LT_END_LIZARDTECH_NAMESPACE
391 
392 
393 #endif // LTI_GEOCOORD_H
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK.
Represents a file or directory path.
Definition: lt_fileSpec.h:35
Abstract definition of a stream.
represents a geographic coordinate
Definition: lti_geoCoord.h:28
void get(double &xUL, double &yUL, double &xRes, double &yRes, double &xRot, double &yRot) const
get the coordinate information
LTIGeoCoord(const LTIGeoCoord &)
copy constructor
void setX(double x)
set the upper-left X position
void setXRot(double xRot)
set the X rotation
const char * getWKT() const
get the Well Known Text (WKT)
void setXRes(double xRes)
set the X resolution
LT_STATUS geoToPixelEx(double geoX, double geoY, double mag, double &pixelX, double &pixelY) const
LT_STATUS writeMetadata(LTIMetadataDatabase &metadata) const
write data to metadata
double getXRes() const
get the X resolution
bool operator!=(const LTIGeoCoord &) const
inequality operator
LT_STATUS readWorldFile(const LTFileSpec &fileSpec, bool determineExtension, bool &fileFound)
read data from world file
LT_STATUS readWorldFile(LTIOStreamInf &stream)
read data from world file, via a stream
LT_STATUS geoToPixel(double geoX, double geoY, double mag, double &pixelX, double &pixelY) const
convert a geo coordinate to pixel coordinate
LT_STATUS writeWorldFile(const LTFileSpec &fileSpec, bool determineExtension) const
write data to world file
void setY(double y)
set the upper-left Y position
void setYRot(double yRot)
set the Y rotation
double getYRot() const
get the Y rotation
bool hasRotation(void) const
void set(double xUL, double yUL, double xRes, double yRes, double xRot, double yRot)
set the coordinate information
LTIGeoCoord & operator=(const LTIGeoCoord &)
assignment operator
double getY() const
get the upper-left Y position
double getX() const
get the upper-left X position
LTIGeoCoord scaleGeoCoord(double xMag, double yMag) const
get the coordinate information for a given offset and scale
LTIGeoCoord()
default constructor
void setWKT(const char *wkt)
set the WKT
LTIGeoCoord(double xUL, double yUL, double xRes, double yRes, double xRot, double yRot, const char *wkt=nullptr)
constructor
LT_STATUS pixelToGeo(double pixelX, double pixelY, double mag, double &geoX, double &geoY) const
convert a pixel coordinate to geo coordinate
void setYRes(double yRes)
set the Y resolution
~LTIGeoCoord()
destructor
bool operator==(const LTIGeoCoord &) const
equality operator
double getYRes() const
get the Y resolution
LT_STATUS pixelToGeoEx(double pixelX, double pixelY, double mag, double &geoX, double &geoY) const
static LT_STATUS getWorldFileExtension(const LTFileSpec &fileSpec, char *ext)
get file extension text
double getXRot() const
get the X rotation
LT_STATUS readMetadata(const LTIMetadataDatabase &metadata, bool &found)
read data from metadata
LTIGeoCoord getGeoCoordForScene(const LTIScene &scene) const
get the coordinate information for a given scene
class for storing metadata associated with an image
representation of a scene
Definition: lti_scene.h:60

Extensis