本文整理汇总了C++中ossimFilename::drive方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimFilename::drive方法的具体用法?C++ ossimFilename::drive怎么用?C++ ossimFilename::drive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimFilename
的用法示例。
在下文中一共展示了ossimFilename::drive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openHeader
//.........这里部分代码省略.........
{
theFfHdr = new ossimFfL5(file.c_str());
}
else
{
theFfHdr = 0;
return;
}
if (theFfHdr->getErrorStatus() != ossimErrorCodes::OSSIM_OK)
{
theFfHdr = 0;
}
return;
// I had to force the open to go with a header since there are duplicate entries when scanning
// landsat directories.
// For now I am commenting this code out.
//
#if 0
//***
// User may have passed in an image file name in which case the header file
// must be derived from it.
//***
if (hdr.size() < 25)
{
// file name not long enough...
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "ossimLandsatTileSource::openHeader DEBUG:"
<< "\nNot a standard landsat 7 file name: " << hdr << std::endl;
return;
}
}
char substr[4];
const char* f = hdr.c_str();
strncpy(substr, (f+22), 3);
substr[3] = '\0';
ossimString s1 = substr;
ossimString s2;
s1.downcase();
if (s1 == "b80")
{
s2 = "hpn";
}
else if (s1 == "b61" || s1 == "b62")
{
s2 = "htm";
}
else if (s1 == "b10" || s1 == "b20" || s1 == "b30" ||
s1 == "b40" || s1 == "b50" || s1 == "b70")
{
s2 = "hrf";
}
else
{
// Not of any format we know of...
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "ossimLandsatTileSource::openHeader DEBUG:"
<< "\nCould not derive header name from: " << file
<< std::endl;
}
return;
}
// Set the case to be the same as the file passed in.
if (substr[0] == 0x42) // ascii "B"
{
s1.upcase();
s2.upcase();
hdr.upcase();
// Header files alway start with "L71"
hdr = hdr.substitute(ossimString("L72"), ossimString("L71"));
}
else
{
// Header files alway start with "l71"
hdr = hdr.substitute(ossimString("l72"), ossimString("l71"));
}
// Make the hdr file name.
hdr = hdr.substitute(s1, s2);
ossimFilename f1 = file.drive();
f1 += file.path();
hdr = f1.dirCat(hdr);
theFfHdr = new ossimFfL7(hdr.c_str());
if (theFfHdr->getErrorStatus() != ossimErrorCodes::OSSIM_OK)
{
delete theFfHdr;
theFfHdr = NULL;
}
#endif
}