Skip to content
Snippets Groups Projects
Commit 0fade621 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

BUG: put tracedebug calls inside correct if block

parent 50d2c8a6
No related branches found
No related tags found
No related merge requests found
......@@ -107,15 +107,15 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimPleiadesModel" << std::endl;
}
// Pleiades
if ( !projection )
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimPleiadesModel" << std::endl;
}
ossimRefPtr<ossimPleiadesModel> model = new ossimPleiadesModel();
if ( model->open(filename) )
{
......@@ -127,14 +127,14 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimTerraSarModel" << std::endl;
}
if ( !projection )
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimTerraSarModel" << std::endl;
}
ossimRefPtr<ossimTerraSarModel> model = new ossimTerraSarModel();
if ( model->open(filename) )
......@@ -152,36 +152,15 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
//if(traceDebug())
// // CosmoSkymed
// if ( !projection )
// {
// if(traceDebug())
// {
// ossimNotify(ossimNotifyLevel_DEBUG)
// << MODULE << " DEBUG: testing ossimCosmoSkymedModel" << std::endl;
// }
// ossimRefPtr<ossimCosmoSkymedModel> model = new ossimCosmoSkymedModel();
// if ( model->open(filename) )
// {
// projection = model.get();
// }
// else
// {
// model = 0;
// }
// }
// TerrSar
if ( !projection )
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimErsSarModel" << std::endl;
}
// ErsSar
if ( !projection )
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimErsSarModel" << std::endl;
}
ossimRefPtr<ossimErsSarModel> model = new ossimErsSarModel();
if ( model->open(filename) )
{
......@@ -193,14 +172,14 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimEnvisatSarModel" << std::endl;
}
if (!projection)
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimEnvisatSarModel" << std::endl;
}
ossimRefPtr<ossimEnvisatAsarModel> model = new ossimEnvisatAsarModel();
if (model->open(filename))
{
......@@ -212,14 +191,14 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
if (!projection)
{
ossimNotify(ossimNotifyLevel_DEBUG)
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimRadarSatModel" << std::endl;
}
}
if (!projection)
{
ossimRefPtr<ossimRadarSatModel> model = new ossimRadarSatModel();
if (model->open(filename))
{
......@@ -231,14 +210,14 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimAlosPalsarModel" << std::endl;
}
if (!projection)
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimAlosPalsarModel" << std::endl;
}
ossimRefPtr<ossimAlosPalsarModel> model = new ossimAlosPalsarModel();
if (model->open(filename))
{
......@@ -250,47 +229,52 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimFormosatModel" << std::endl;
}
ossimFilename formosatTest = filename;
formosatTest = formosatTest.setExtension("geom");
if(!formosatTest.exists())
if (!projection)
{
formosatTest = filename.path();
formosatTest = formosatTest.dirCat(ossimFilename("METADATA.DIM"));
if (formosatTest.exists() == false)
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimFormosatModel" << std::endl;
}
ossimFilename formosatTest = filename;
formosatTest = formosatTest.setExtension("geom");
if(!formosatTest.exists())
{
formosatTest = filename.path();
formosatTest = formosatTest.dirCat(ossimFilename("metadata.dim"));
formosatTest = formosatTest.dirCat(ossimFilename("METADATA.DIM"));
if (formosatTest.exists() == false)
{
formosatTest = filename.path();
formosatTest = formosatTest.dirCat(ossimFilename("metadata.dim"));
}
}
}
if(formosatTest.exists())
{
ossimRefPtr<ossimFormosatDimapSupportData> meta =
new ossimFormosatDimapSupportData;
if(meta->loadXmlFile(formosatTest))
if(formosatTest.exists())
{
ossimRefPtr<ossimFormosatModel> model = new ossimFormosatModel(meta.get());
if(!model->getErrorStatus())
ossimRefPtr<ossimFormosatDimapSupportData> meta =
new ossimFormosatDimapSupportData;
if(meta->loadXmlFile(formosatTest))
{
projection = model.get();
ossimRefPtr<ossimFormosatModel> model = new ossimFormosatModel(meta.get());
if(!model->getErrorStatus())
{
projection = model.get();
}
model = 0;
}
model = 0;
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimTileMapModel" << std::endl;
}
if (!projection)
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimTileMapModel" << std::endl;
}
ossimRefPtr<ossimTileMapModel> model = new ossimTileMapModel();
if (model->open(filename))
{
......@@ -302,15 +286,16 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
}
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimSpot6Model" << std::endl;
}
// Spot6
if ( !projection )
{
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< MODULE << " DEBUG: testing ossimSpot6Model" << std::endl;
}
ossimRefPtr<ossimSpot6Model> model = new ossimSpot6Model();
if ( model->open(filename) )
{
......
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