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

BUG: remove temporary files

parent c8d116f6
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbTileMapImageIOHelper_cxx
#define __otbTileMapImageIOHelper_cxx
#include "otbTileMapImageIOHelper.h"
namespace otb
{
/** get scale from depth */
const std::string TileMapImageIOHelper::ConvertDepthToScale(const unsigned int depth) const
{
std::string res;
res+= "level ";
std::stringstream out;
out << depth;
res+= out.str();
res+= " (around 1 : ";
switch (depth)
{
case 1:
res+= "222 million)";
break;
case 2:
res+= "111 million)";
break;
case 3:
res+= "55 million)";
break;
case 4:
res+= "28 million";
break;
case 5:
res+= "14 million";
break;
case 6:
res+= "7 million)";
break;
case 7:
res+= "3 million)";
break;
case 8:
res+= "2 million)";
break;
case 9:
res+= "867,000)";
break;
case 10:
res+= "433,000)";
break;
case 11:
res+= "217,000)";
break;
case 12:
res+= "108,000)";
break;
case 13:
res+= "54,000)";
break;
case 14:
res+= "27,000)";
break;
case 15:
res+= "14,000)";
break;
case 16:
res+= "6,771)";
break;
case 17:
res+= "3,385)";
break;
case 18:
res+= "1,693)";
break;
default:
res+= "222 million)";
break;
}
return res;
}
} // end namespace otb
#endif
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbTileMapImageIOHelper_h
#define __otbTileMapImageIOHelper_h
#include <string>
#include <stringstream>
namespace otb
{
/** \class TileMapImageIOHelper
* \brief This class IO TileMapImage
*
*/
class TileMapImageIOHelper
{
public:
/** Correspondance between depth and scale for the quad tree paradigm*/
virtual const std::string ConvertDepthToScale(const unsigned int depth) const;
}; // end class TileMapImageIOHelper
} // end namespace otb
#endif
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbTileMapImageIOHelper_txx
#define __otbTileMapImageIOHelper_txx
namespace otb
{
/** get scale from depth */
const std::string TileMapImageIOHelper::ConvertDepthToScale(const unsigned int depth) const
{
ostringstream oss;
oss << "level ";
oss << depth;
oss << " (around 1 : ";
switch (depth)
{
case 1:
oss << "222 million)"; return oss.str();
break;
case 2:
oss << "111 million)"; return oss.str();
break;
case 3:
oss << "55 million)"; return oss.str();
break;
case 4:
oss << "28 million"; return oss.str();
break;
case 5:
oss << "14 million"; return oss.str();
break;
case 6:
oss << "7 million)"; return oss.str();
break;
case 7:
oss << "3 million)"; return oss.str();
break;
case 8:
oss << "2 million)"; return oss.str();
break;
case 9:
oss << "867,000)"; return oss.str();
break;
case 10:
oss << "433,000)"; return oss.str();
break;
case 11:
oss << "217,000)"; return oss.str();
break;
case 12:
oss << "108,000)"; return oss.str();
break;
case 13:
oss << "54,000)"; return oss.str();
break;
case 14:
oss << "27,000)"; return oss.str();
break;
case 15:
oss << "14,000)"; return oss.str();
break;
case 16:
oss << "6,771)"; return oss.str();
break;
case 17:
oss << "3,385)"; return oss.str();
break;
case 18:
oss << "1,693)"; return oss.str();
break;
default:
oss << "222 million)"; return oss.str();
break;
}
}
} // end namespace otb
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment