Skip to content
Snippets Groups Projects
Commit 84820597 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: fix geoid handling after ossim update

parent 8fbbd159
No related branches found
No related tags found
No related merge requests found
......@@ -66,12 +66,15 @@ DEMHandler
ossimRefPtr<ossimGeoid> geoidPtr = new ossimGeoidEgm96(geoid);
if (geoidPtr->getErrorStatus() == ossimErrorCodes::OSSIM_OK)
{
otbMsgDevMacro( << "Geoid successfully opened");
m_Mutex.Lock();
ossimGeoidManager::instance()->addGeoid(geoidPtr);
m_Mutex.Unlock();
geoidPtr.release();
}
else
{
otbMsgDevMacro( << "Failure opening geoid");
geoidPtr.release();
}
}
......@@ -101,6 +104,7 @@ DEMHandler
ossimWorldPoint.lon=geoPoint[0];
ossimWorldPoint.lat=geoPoint[1];
m_Mutex.Lock();
otbMsgDevMacro( << "Geoid offset: " << ossimGeoidManager::instance()->offsetFromEllipsoid(ossimWorldPoint));
height=m_ElevManager->getHeightAboveEllipsoid(ossimWorldPoint);
m_Mutex.Unlock();
return height;
......
......@@ -37,8 +37,8 @@ int otbDEMHandlerTest(int argc, char * argv[])
// Instantiating object
DEMHandlerType::Pointer demHandler = DEMHandlerType::New();
demHandler->OpenDEMDirectory(srtm_directory);
demHandler->OpenGeoidFile(geoidFile);
demHandler->OpenDEMDirectory(srtm_directory);
typedef otb::UtmInverseProjection utmProjection;
typedef utmProjection::InputPointType InputPoint;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment