isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
GeoTransform.h
1 #pragma once
2 
3 #include <array>
4 
5 namespace isce3 { namespace io { namespace gdal {
6 
15 struct GeoTransform {
16 
18  GeoTransform() = default;
19 
28  GeoTransform(double x0, double y0, double dx, double dy) : x0(x0), y0(y0), dx(dx), dy(dy) {}
29 
40  GeoTransform(const std::array<double, 6> & coeffs);
41 
47  std::array<double, 6> getCoeffs() const;
48 
49  double transformX(int pixel) const { return x0 + (pixel + 0.5) * dx; }
50 
51  double transformY(int line) const { return y0 + (line + 0.5) * dy; }
52 
54  bool isIdentity() const { return x0 == 0. && y0 == 0. && dx == 1. && dy == 1.; }
55 
56  double x0 = 0.;
57  double y0 = 0.;
58  double dx = 1.;
59  double dy = 1.;
60 };
61 
62 bool operator==(const GeoTransform &, const GeoTransform &);
63 bool operator!=(const GeoTransform &, const GeoTransform &);
64 
65 }}}
bool isIdentity() const
True if the transform is identity.
Definition: GeoTransform.h:54
std::array< double, 6 > getCoeffs() const
Get equivalent GDAL affine transform coefficients.
Definition: GeoTransform.cpp:19
GeoTransform(double x0, double y0, double dx, double dy)
Constructor.
Definition: GeoTransform.h:28
Transform coefficients for transforming from (pixel, line) coordinates in raster space to (x...
Definition: GeoTransform.h:15
GeoTransform()=default
Default constructor (identity transform)

Generated for ISCE3.0 by doxygen 1.8.5.