21 #ifndef otbGeometryMetadata_h
22 #define otbGeometryMetadata_h
24 #include "OTBMetadataExport.h"
43 class OTBMetadata_EXPORT
GCP
68 GCP(std::string
id, std::string info,
double col,
double row,
double px,
double py,
double pz);
70 void Print(std::ostream& os)
const;
71 std::string
ToJSON(
bool multiline=
false)
const;
99 std::string
ToJSON(
bool multiline=
false)
const;
143 double LineOffset = 0.0;
144 double SampleOffset = 0.0;
145 double LatOffset = 0.0;
146 double LonOffset = 0.0;
147 double HeightOffset = 0.0;
150 double LineScale = 0.0;
151 double SampleScale = 0.0;
152 double LatScale = 0.0;
153 double LonScale = 0.0;
154 double HeightScale = 0.0;
157 double LineNum[20] = {
158 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
159 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
162 double LineDen[20] = {
163 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
164 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
167 double SampleNum[20] = {
168 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
169 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
172 double SampleDen[20] = {
173 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
174 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
177 std::string
ToJSON(
bool multiline=
false)
const;
180 std::ostringstream oss;
182 for (
int loop = 0 ; loop < 20 ; loop++)
183 oss <<
" \"" << array[loop] <<
"\", ";
189 template <
class BinaryPredicate>
202 && std::equal(std::begin(LineNum), std::end(LineNum), std::begin(other.
LineNum),p)
203 && std::equal(std::begin(LineDen), std::end(LineDen), std::begin(other.
LineDen),p)
204 && std::equal(std::begin(SampleNum), std::end(SampleNum), std::begin(other.
SampleNum),p)
205 && std::equal(std::begin(SampleDen), std::end(SampleDen), std::begin(other.
SampleDen),p);
211 return lhs.
Compare(rhs, [](
double rhs,
double lhs){
return rhs == lhs;});
This GCP class is used to manage the GCP parameters in OTB.
std::string ToJSON(bool multiline=false) const
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const
friend bool operator==(const GCP &lhs, const GCP &rhs)
void Print(std::ostream &os) const
static GCP FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix)
GCP(std::string id, std::string info, double col, double row, double px, double py, double pz)
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
This structure handles the list of the GCP parameters.
std::string GCPProjection
void FromKeywordlist(const MetaData::Keywordlist &kwl, const std::string &prefix)
std::string ToJSON(bool multiline=false) const
void ToKeywordlist(MetaData::Keywordlist &kwl, const std::string &prefix) const
Coefficients for RPC model (quite similar to GDALRPCInfo)
friend bool operator==(const RPCParam &lhs, const RPCParam &rhs)
static std::string doubleArrayToString(const double *array)
RPCParam & operator=(RPCParam &)=default
bool Compare(const RPCParam &other, const BinaryPredicate &p) const
RPCParam(const RPCParam &)=default
std::string ToJSON(bool multiline=false) const