本文整理汇总了C++中ossimKeywordlist::getBoolKeywordValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimKeywordlist::getBoolKeywordValue方法的具体用法?C++ ossimKeywordlist::getBoolKeywordValue怎么用?C++ ossimKeywordlist::getBoolKeywordValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimKeywordlist
的用法示例。
在下文中一共展示了ossimKeywordlist::getBoolKeywordValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
bool ossimSlopeUtil::initialize(const ossimKeywordlist& kwl)
{
clear();
// Base class first:
if (!ossimUtility::initialize(kwl))
return false;
ossimString value;
value = kwl.find(CENTER_KW);
if (!value.empty())
{
vector <ossimString> coordstr;
value.split(coordstr, ossimString(" ,"), false);
if (coordstr.size() == 2)
{
m_centerGpt.lat = coordstr[0].toDouble();
m_centerGpt.lon = coordstr[1].toDouble();
m_centerGpt.hgt = 0.0;
}
}
m_demFile = kwl.find(DEM_KW);
if (m_demFile.empty())
m_demFile = kwl.find(ossimKeywordNames::ELEVATION_CELL_KW);
kwl.getBoolKeywordValue(m_remapToByte, REMAP_KW);
m_lutFile = kwl.find(LUT_KW);
value = kwl.find(ROI_KW);
if (!value.empty())
m_aoiRadius = value.toDouble();
m_slopeFile = kwl.find(ossimKeywordNames::OUTPUT_FILE_KW);
if (value.empty())
{
ostringstream msg;
msg <<"No output slope file provided."<<ends;
ossimException e (msg.str());
throw e;
}
if (m_demFile.empty() && m_centerGpt.hasNans())
{
ostringstream msg;
msg <<"No center point provided and no DEM file provided. Cannot compute slope image."<<ends;
ossimException e (msg.str());
throw e;
}
return initializeChain();
}
示例2: initialize
bool ossimViewshedUtil::initialize(const ossimKeywordlist& kwl)
{
// Base class first:
if (!ossimUtility::initialize(kwl))
return false;
ossimString value;
m_demFile = kwl.find("dem_file");
if (m_demFile.empty())
m_demFile = kwl.find(ossimKeywordNames::ELEVATION_CELL_KW);
value = kwl.find("fov");
if (!value.empty())
{
vector <ossimString> coordstr;
value.split(coordstr, ossimString(" ,"), false);
if (coordstr.size() == 2)
{
m_startFov = coordstr[0].toDouble();
m_stopFov = coordstr[1].toDouble();
if (m_startFov < 0)
m_startFov += 360.0;
}
}
value = kwl.find("gsd");
if (value.empty())
value = kwl.find(ossimKeywordNames::METERS_PER_PIXEL_KW);
if (!value.empty())
m_gsd = value.toDouble();
value = kwl.find("height_of_eye");
if (!value.empty())
m_obsHgtAbvTer = value.toDouble();
m_horizonFile = kwl.find("horizon_file");
m_lutFile = kwl.find("lut_file");
value = kwl.find("observer");
if (!value.empty())
{
vector <ossimString> coordstr;
value.split(coordstr, ossimString(" ,"), false);
if (coordstr.size() == 2)
{
m_observerGpt.lat = coordstr[0].toDouble();
m_observerGpt.lon = coordstr[1].toDouble();
m_observerGpt.hgt = 0.0;
}
}
value = kwl.find("radius");
if (!value.empty())
m_visRadius = value.toDouble();
value = kwl.find("reticle");
if (!value.empty())
m_reticleSize = value.toInt32();
kwl.getBoolKeywordValue(m_threadBySector, "thread_by_sector");
kwl.getBoolKeywordValue(m_simulation, "simulation");
kwl.getBoolKeywordValue(m_outputSummary, "summary");
value = kwl.find("size");
if (!value.empty())
m_halfWindow = value.toInt32();
value = kwl.find(ossimKeywordNames::THREADS_KW);
if (!value.empty())
m_numThreads = value.toInt32();
value = kwl.find("values");
if (!value.empty())
{
vector <ossimString> coordstr;
value.split(coordstr, ossimString(" ,"), false);
if (coordstr.size() == 3)
{
m_visibleValue = coordstr[0].toUInt8();
m_hiddenValue = coordstr[1].toUInt8();
m_observerValue = coordstr[2].toUInt8();
}
}
m_filename = kwl.find(ossimKeywordNames::OUTPUT_FILE_KW);
if (value.empty())
{
ostringstream msg;
msg <<"No output file name provided."<<ends;
ossimException e (msg.str());
throw e;
}
// Verify minimum required args were specified:
if (m_demFile.empty() && (m_visRadius == 0) && (m_halfWindow == 0))
{
ostringstream msg;
//.........这里部分代码省略.........