UGDatasetRaster* pRaster = NULL;
pRaster = (UGDatasetRaster*)pWorkspace->GetDataSource(0)->GetDataset(_U("MosaicResult"));
if(pRaster==NULL){
return;
}
for(int i=0;i<plist.length();i++){
posblh bl=plist.at(i);
posblh rebl;
UGPoint2D pt2d;
transBLtoGeOGraphic(bl.b,bl.l,pt2d);
UGPoint pdf;
pRaster->XYToGrid(pt2d,pdf);
UGdouble dheight=0;
dheight= pdemdataset->GetValue(pdf.x,pdf.y);
rebl.b=bl.b;
rebl.l=bl.l;
rebl.h=dheight;
replist.append(rebl);
}
return replist;
当执行到GetValue函数时提示The inferior stopped because it received a signal from the Operating System,提示报错
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check
我现在是这样做的,将多个高程数据进行栅格镶嵌,对镶嵌后的数据集进行高程查询,就会报上述的错误,但是,针对原始高程数据进行查询时则不会报错,感觉是高程进行栅格镶嵌时导致数据有问题,应该怎么做?