12 #include "Constants.h"
13 #include "Ellipsoid.h"
15 namespace isce3 {
namespace core {
37 inline int code()
const {
return _epsgcode; }
43 virtual void print()
const = 0;
72 inline void print()
const;
80 std::cout <<
"Projection: LatLon" << std::endl <<
"EPSG: " <<
code() << std::endl;
84 out[0] = in[0] * 180.0/M_PI;
85 out[1] = in[1] * 180.0/M_PI;
91 out[0] = in[0] * M_PI/180.0;
92 out[1] = in[1] * M_PI/180.0;
103 inline void print()
const;
112 std::cout <<
"Projection: Geocent" << std::endl <<
"EPSG: " <<
code() << std::endl;
125 double cgb[6], cbg[6], utg[6], gtu[6];
132 inline void print()
const;
141 std::cout <<
"Projection: UTM" << std::endl
142 <<
"Zone: " << zone << (isnorth ?
"N" :
"S") << std::endl
143 <<
"EPSG: " <<
code() << std::endl;
152 double lat0, lon0, lat_ts, akm1, e;
159 inline void print()
const;
168 std::cout <<
"Projection: " << (isnorth ?
"North" :
"South")
169 <<
" Polar Stereographic" << std::endl
170 <<
"EPSG: " <<
code() << std::endl;
179 double lat_ts, k0, e, one_es, qp;
185 inline void print()
const;
195 std::cout <<
"Projection: Cylindrical Equal Area" << std::endl
196 <<
"EPSG: " <<
code() << std::endl;
203 std::unique_ptr<ProjectionBase> makeProjection(
int epsg)
205 return std::unique_ptr<ProjectionBase>(createProj(epsg));
209 int projTransform(ProjectionBase* in, ProjectionBase *out,
const Vec3& inpts,
Polar stereographic extension of ProjBase.
Definition: Projections.h:150
int code() const
Return EPSG code.
Definition: Projections.h:37
UTM coordinate extension of ProjBase.
Definition: Projections.h:119
Data structure to store Ellipsoid information.
Definition: Ellipsoid.h:20
int forward(const cartesian_t &llh, cartesian_t &xyz) const
Transform from llh (rad) to CEA (m)
Definition: Projections.cpp:336
int inverse(const cartesian_t &, cartesian_t &) const
Function for transforming to LLH.
Definition: Projections.h:90
void print() const
Print function for debugging.
Definition: Projections.h:194
Equal Area Projection extension of ProjBase.
Definition: Projections.h:176
ProjectionBase(int code)
Value constructor with EPSG code as input.
Definition: Projections.h:34
int forward(const cartesian_t &, cartesian_t &) const
Function for transforming from LLH.
Definition: Projections.h:83
virtual int forward(const cartesian_t &llh, cartesian_t &xyz) const =0
Function for transforming from LLH.
virtual void print() const =0
Print function for debugging.
int forward(const cartesian_t &llh, cartesian_t &xyz) const
Transform from llh (rad) to UTM (m)
Definition: Projections.cpp:170
Abstract base class for individual projections.
Definition: Projections.h:22
virtual int inverse(const cartesian_t &xyz, cartesian_t &llh) const =0
Function for transforming to LLH.
Standard WGS84 Lon/Lat Projection extension of ProjBase - EPSG:4326.
Definition: Projections.h:67
const Ellipsoid & ellipsoid() const
Return underlying ellipsoid.
Definition: Projections.h:40
virtual ~ProjectionBase()
Virtual destructor.
Definition: Projections.h:63
int inverse(const cartesian_t &xyz, cartesian_t &llh) const
This is same as Ellipsoid::xyzToLonLat.
Definition: Projections.cpp:35
Standard WGS84 ECEF coordinates extension of ProjBase - EPSG:4978.
Definition: Projections.h:98
void print() const
Print function for debugging.
Definition: Projections.h:79
int inverse(const cartesian_t &xyz, cartesian_t &llh) const
Transform from UTM(m) to llh (rad)
Definition: Projections.cpp:200
void print() const
Print function for debugging.
Definition: Projections.h:140
int forward(const cartesian_t &, cartesian_t &) const
Transfrom from llh(rad) to Polar Stereo (m)
Definition: Projections.cpp:273
int forward(const cartesian_t &llh, cartesian_t &xyz) const
This is same as Ellipsoid::lonLatToXyz.
Definition: Projections.cpp:25
void print() const
Print function for debugging.
Definition: Projections.h:111
void print() const
Print function for debugging.
Definition: Projections.h:167
int inverse(const cartesian_t &xyz, cartesian_t &llh) const
Transform from CEA (m) to LLH (rad)
Definition: Projections.cpp:346
int inverse(const cartesian_t &, cartesian_t &) const
Transform from Polar Stereo (m) to llh (rad)
Definition: Projections.cpp:289