Commit a75fe627 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

OSSIM: Radarsat2 handled by ossim plugins

parent 0d843220
......@@ -25,7 +25,7 @@
#include <ossim/base/ossimKeywordNames.h>
#include <ossim/imaging/ossimJpegTileSource.h>
#include <ossim/imaging/ossimRadarSatTileSource.h>
#include <ossim/imaging/ossimRadarSat2TileSource.h>
// #include <ossim/imaging/ossimRadarSat2TileSource.h>
#include <ossim/imaging/ossimTerraSarTileSource.h>
static const ossimTrace traceDebug("ossimImageHandlerFactory:debug");
......@@ -54,9 +54,9 @@ ossimImageHandlerFactory* ossimImageHandlerFactory::instance()
ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)const
{
ossimFilename copyFilename = fileName;
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
......@@ -77,7 +77,7 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)
// if we have any imagehandlers that require an encoded string and is contrlled in this factory then
// we need to move this.
if(!copyFilename.exists()) return 0;
if(copyFilename.ext() == "gz")
{
copyFilename = copyFilename.setExtension("");
......@@ -93,7 +93,7 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)
return result;
}
delete result;
// test if TileMap
if(traceDebug())
......@@ -124,18 +124,18 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)
delete result;
// test if Radarsat2
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "Radarsat2"
<< std::endl;
}
result = new ossimRadarSat2TileSource;
if(result->open(copyFilename))
{
return result;
}
delete result;
// if(traceDebug())
// {
// ossimNotify(ossimNotifyLevel_DEBUG)
// << "Radarsat2"
// << std::endl;
// }
// result = new ossimRadarSat2TileSource;
// if(result->open(copyFilename))
// {
// return result;
// }
// delete result;
// test if TerraSAR
if(traceDebug())
......@@ -325,16 +325,16 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)
ossimNotify(ossimNotifyLevel_DEBUG)
<< "trying adrg" << std::endl;
}
// test if ADRG
result = new ossimAdrgTileSource();
if(result->open(copyFilename))
{
return result;
}
delete result;
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
......@@ -346,7 +346,7 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimFilename& fileName)
{
return result;
}
delete result;
if(traceDebug())
{
......@@ -499,19 +499,19 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimKeywordlist& kwl,
delete result;
// RadarSat2
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "trying RadarSat2"
<< std::endl;
}
result = new ossimRadarSat2TileSource;
if(result->loadState(kwl, prefix))
{
return result;
}
delete result;
// if(traceDebug())
// {
// ossimNotify(ossimNotifyLevel_DEBUG)
// << "trying RadarSat2"
// << std::endl;
// }
// result = new ossimRadarSat2TileSource;
// if(result->loadState(kwl, prefix))
// {
// return result;
// }
//
// delete result;
// TerraSAR
if(traceDebug())
......@@ -540,9 +540,9 @@ ossimImageHandler* ossimImageHandlerFactory::open(const ossimKeywordlist& kwl,
{
return result;
}
delete result;
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
......@@ -705,7 +705,7 @@ ossimObject* ossimImageHandlerFactory::createObject(const ossimString& typeName)
void ossimImageHandlerFactory::getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const
{
extensionList.push_back("img");
extensionList.push_back("ccf");
extensionList.push_back("ccf");
extensionList.push_back("toc");
extensionList.push_back("tif");
extensionList.push_back("tiff");
......
......@@ -10,7 +10,7 @@
#include <ossim/base/ossimTrace.h>
#include <ossim/base/ossimKeywordNames.h>
#include <ossim/imaging/ossimRadarSatTileSource.h>
#include <ossim/imaging/ossimRadarSat2TileSource.h>
// #include <ossim/imaging/ossimRadarSat2TileSource.h>
#include <ossim/imaging/ossimTerraSarTileSource.h>
//#include <ossim/imaging/ossimCosmoSkymedTileSource.h>
#include <ossim/imaging/ossimEnvisatAsarTileSource.h>
......@@ -103,18 +103,18 @@ ossimImageHandler* ossimImageHandlerSarFactory::open(const ossimFilename& fileNa
delete result;
// Radarsat 2
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "trying RadarSat2"
<< std::endl;
}
result = new ossimRadarSat2TileSource;
if(result->open(copyFilename))
{
return result;
}
delete result;
// if(traceDebug())
// {
// ossimNotify(ossimNotifyLevel_DEBUG)
// << "trying RadarSat2"
// << std::endl;
// }
// result = new ossimRadarSat2TileSource;
// if(result->open(copyFilename))
// {
// return result;
// }
// delete result;
// ERS
if(traceDebug())
......@@ -189,18 +189,18 @@ ossimImageHandler* ossimImageHandlerSarFactory::open(const ossimKeywordlist& kwl
}
delete result;
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "trying RadarSat2"
<< std::endl;
}
result = new ossimRadarSat2TileSource();
if(result->loadState(kwl, prefix))
{
return result;
}
delete result;
// if(traceDebug())
// {
// ossimNotify(ossimNotifyLevel_DEBUG)
// << "trying RadarSat2"
// << std::endl;
// }
// result = new ossimRadarSat2TileSource();
// if(result->loadState(kwl, prefix))
// {
// return result;
// }
// delete result;
if(traceDebug())
{
......@@ -272,10 +272,10 @@ ossimObject* ossimImageHandlerSarFactory::createObject(const ossimString& typeNa
{
return new ossimErsSarTileSource();
}
if(STATIC_TYPE_NAME(ossimRadarSat2TileSource) == typeName)
{
return new ossimRadarSat2TileSource();
}
// if(STATIC_TYPE_NAME(ossimRadarSat2TileSource) == typeName)
// {
// return new ossimRadarSat2TileSource();
// }
return (ossimObject*)NULL;
}
......@@ -339,5 +339,5 @@ void ossimImageHandlerSarFactory::getTypeNameList(std::vector<ossimString>& type
typeList.push_back(STATIC_TYPE_NAME(ossimEnvisatAsarTileSource));
//typeList.push_back(STATIC_TYPE_NAME(ossimCosmoSkymedTileSource));
typeList.push_back(STATIC_TYPE_NAME(ossimErsSarTileSource));
typeList.push_back(STATIC_TYPE_NAME(ossimRadarSat2TileSource));
// typeList.push_back(STATIC_TYPE_NAME(ossimRadarSat2TileSource));
}
......@@ -50,7 +50,7 @@ static ossimTrace traceDebug = ossimTrace("ossimSensorModelFactory:debug");
#include <ossim/projection/ossimEnvisatAsarModel.h>
#include <ossim/projection/ossimTerraSarModel.h>
//#include <ossim/projection/ossimCosmoSkymedModel.h>
#include <ossim/projection/ossimRadarSat2Model.h>
// #include <ossim/projection/ossimRadarSat2Model.h>
#include <ossim/projection/ossimErsSarModel.h>
#include <ossim/projection/ossimTileMapModel.h>
......@@ -208,10 +208,10 @@ ossimSensorModelFactory::createProjection(const ossimString &name) const
// {
// return new ossimCosmoSkymedModel;
// }
if (name == STATIC_TYPE_NAME(ossimRadarSat2Model))
{
return new ossimRadarSat2Model;
}
// if (name == STATIC_TYPE_NAME(ossimRadarSat2Model))
// {
// return new ossimRadarSat2Model;
// }
if (name == STATIC_TYPE_NAME(ossimErsSarModel))
{
return new ossimErsSarModel;
......@@ -264,7 +264,7 @@ ossimSensorModelFactory::getTypeNameList(std::vector<ossimString>& typeList)
typeList.push_back(STATIC_TYPE_NAME(ossimSpot5Model));
typeList.push_back(STATIC_TYPE_NAME(ossimSarModel));
typeList.push_back(STATIC_TYPE_NAME(ossimRadarSatModel));
typeList.push_back(STATIC_TYPE_NAME(ossimRadarSat2Model));
// typeList.push_back(STATIC_TYPE_NAME(ossimRadarSat2Model));
typeList.push_back(STATIC_TYPE_NAME(ossimTerraSarModel));
// typeList.push_back(STATIC_TYPE_NAME(ossimCosmoSkymedModel));
typeList.push_back(STATIC_TYPE_NAME(ossimEnvisatAsarModel));
......
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