Commit db86a734 authored by Julien Osman's avatar Julien Osman

Merge branch '2040-RPC_model' of gitlab.orfeo-toolbox.org:orfeotoolbox/otb into 2040-RPC_model

parents f5ae0517 b33c7c6f
Pipeline #6679 failed with stages
in 90 minutes
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
\ No newline at end of file
......@@ -28,7 +28,7 @@
// The \doxygen{otb}{GCPsToRPCSensorModelImageFilter} estimates a RPC
// sensor model from a list of user defined GCPs. Internally, it uses
// an ossimRpcSolver, which performs the estimation using the well
// an RpcSolver, which performs the estimation using the well
// known least-square method.
// Let's look at the minimal code required to use this
......@@ -119,7 +119,7 @@ int main(int argc, char* argv[])
rpcEstimator->GetOutput()->UpdateOutputInformation();
// The result of the RPC model estimation and the residual ground
// error is then save in a txt file. Note that This filter does
// error is then saved in a txt file. Note that This filter does
// not modify the image buffer, but only the metadata.
std::ofstream ofs;
......@@ -129,7 +129,9 @@ int main(int argc, char* argv[])
ofs.setf(std::ios::fixed, std::ios::floatfield);
ofs.precision(10);
ofs << (ImageType::Pointer)rpcEstimator->GetOutput() << std::endl;
auto outputRPC = boost::any_cast<otb::Projection::RPCParam>(rpcEstimator->GetOutput()->GetImageMetadata()[otb::MDGeom::RPC]);
ofs << outputRPC.ToJSON() << std::endl;
ofs << "Residual ground error: " << rpcEstimator->GetRMSGroundError() << std::endl;
ofs.close();
......
......@@ -2635,7 +2635,9 @@ void TestHelper::ogrReportOnLayer(OGRLayer* ref_poLayer, const char* ref_pszWHER
otbCheckValue("GetExtent", ref_poLayer->GetExtent(&ref_oExt, TRUE), test_poLayer->GetExtent(&test_oExt, TRUE), nbdiff, m_ReportErrors);
if (ref_poLayer->GetExtent(&ref_oExt, TRUE) == OGRERR_NONE)
{
{std::cout << "test1 : " << ref_oExt.MinX << " " << ref_oExt.MinY << " " << ref_oExt.MaxX << " " << ref_oExt.MaxY << std::endl;
std::cout << "ref1 : " << test_oExt.MinX << " " << test_oExt.MinY << " " << test_oExt.MaxX << " " << test_oExt.MaxY << std::endl;
CheckValueTolerance("Extent: MinX", ref_oExt.MinX, test_oExt.MinX, nbdiff, m_ReportErrors, epsilon);
CheckValueTolerance("Extent: MinY", ref_oExt.MinY, test_oExt.MinY, nbdiff, m_ReportErrors, epsilon);
CheckValueTolerance("Extent: MaxX", ref_oExt.MaxX, test_oExt.MaxX, nbdiff, m_ReportErrors, epsilon);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment