21 #ifndef otbRPCTransformBase_hxx
22 #define otbRPCTransformBase_hxx
30 template <
class TScalarType,
unsigned int NInputDimensions,
unsigned int NOutputDimensions>
40 this->m_RPCParam = std::make_unique<Projection::RPCParam>(boost::any_cast<Projection::RPCParam>(imd[
MDGeom::RPC]));
42 catch (
const boost::bad_any_cast&)
47 constexpr
bool useDEM = NInputDimensions == 2 ? true :
false;
48 this->m_Transformer = std::make_unique<GDALRPCTransformer>(*m_RPCParam, useDEM);
52 template <
class TScalarType,
unsigned int NInputDimensions,
unsigned int NOutputDimensions>
55 return m_Transformer !=
nullptr;
61 template <
class TScalarType,
unsigned int NInputDimensions,
unsigned int NOutputDimensions>
64 Superclass::PrintSelf(os, indent);
65 os << indent <<
"RPC Model: " << this->m_RPCParam.get()->ToJSON() << std::endl;
69 template <
class TScalarType,
unsigned int NInputDimensions,
unsigned int NOutputDimensions>
76 for(
auto it=tiepoints.begin();it!=tiepoints.end();it++)
81 sensorGCP[0] = it->first[0];
82 sensorGCP[1] = it->first[1];
83 groundGCP[0] = it->second[0];
84 groundGCP[1] = it->second[1];
85 groundGCP[2] = it->second[2];
87 gcps.push_back({sensorGCP,groundGCP});
91 this->SetMetadata(imd);