本文整理汇总了C++中Area::GetBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ Area::GetBoundingBox方法的具体用法?C++ Area::GetBoundingBox怎么用?C++ Area::GetBoundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::GetBoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Import
//.........这里部分代码省略.........
}
if (!scanner.Read(areaCount)) {
progress.Error("Error while reading number of data entries in file");
return false;
}
areas=0;
for (uint32_t a=1; a<=areaCount; a++) {
progress.SetProgress(a,areaCount);
FileOffset offset;
Area area;
scanner.GetPos(offset);
if (!area.Read(typeConfig,
scanner)) {
progress.Error(std::string("Error while reading data entry ")+
NumberToString(a)+" of "+
NumberToString(areaCount)+
" in file '"+
scanner.GetFilename()+"'");
return false;
}
areas++;
double minLon;
double maxLon;
double minLat;
double maxLat;
area.GetBoundingBox(minLon,maxLon,minLat,maxLat);
//
// Calculate highest level where the bounding box completely
// fits in the cell size and assign area to the tiles that
// hold the geometric center of the tile.
//
int level=parameter.GetAreaAreaIndexMaxMag();
while (level>=0) {
if (maxLon-minLon<=cellWidth[level] &&
maxLat-minLat<=cellHeight[level]) {
break;
}
level--;
}
if (level==l) {
//
// Renormated coordinate space (everything is >=0)
//
minLon+=180;
maxLon+=180;
minLat+=90;
maxLat+=90;
//
// Calculate minimum and maximum tile ids that are covered
// by the area
//
uint32_t minyc=(uint32_t)floor(minLat/cellHeight[level]);