本文整理汇总了C++中GeoImage::load方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoImage::load方法的具体用法?C++ GeoImage::load怎么用?C++ GeoImage::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoImage
的用法示例。
在下文中一共展示了GeoImage::load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nodeTagTable
/** read a list of GeoImage and the attributes through parser */
void
GeoImageList::read(MLParser & parser)
{
minMaxResUptodate_ = false;
qDebug("GeoImageList::read(parser)");
list_.clear();
QString keywords[] = { "geoimage", "geoimagelist", "" };
const MLTagTable nodeTagTable(keywords);
const int TOK_GEOIMAGE = 1;
const int TOK_GEOIMAGE_LIST = 2;
int tag;
#ifdef WIN32
geoNorth_ = -1e38F;
geoSouth_ = 1e38F;
geoWest_ = 1e38F;
geoEast_ = -1e38F;
#else
geoNorth_ = -1e36;
geoSouth_ = +1e36;
geoWest_ = +1e36;
geoEast_ = -1e36;
#endif
do {
tag = parser.tag(nodeTagTable);
switch (tag) {
case TOK_GEOIMAGE:{
GeoImage *gi = new GeoImage(parser); //parse geoimage
#ifdef WIN32
if (gi == 0){
cout << "Out of Memory..6";
exit(1);
}
#endif
if (gi->geoNorth() > geoNorth_)
geoNorth_ = gi->geoNorth();
if (gi->geoSouth() < geoSouth_)
geoSouth_ = gi->geoSouth();
if (gi->geoEast() > geoEast_)
geoEast_ = gi->geoEast();
if (gi->geoWest() < geoWest_)
geoWest_ = gi->geoWest();
insert(*((*gi)["key"]), gi); //insert read geoimage
list_ += *((*gi)["key"]); //fill additional list of image names
break;
}
default:{
ArgDict *args = parser.args();
delete args;
break;
}
}
} while ((tag != MLParser::END_OF_FILE) && (tag != -TOK_GEOIMAGE_LIST));
//test images and create a structure for the images
QString key;
for (QStringList::Iterator it = list_.begin(); it != list_.end(); ++it) {
key = *it;
GeoImage *img = find(key);
qDebug("## GeoImageList::read(parser)" + img->filename());
img->load();
}
}