本文整理汇总了C++中DataAccessor::getColumnAsDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ DataAccessor::getColumnAsDouble方法的具体用法?C++ DataAccessor::getColumnAsDouble怎么用?C++ DataAccessor::getColumnAsDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccessor
的用法示例。
在下文中一共展示了DataAccessor::getColumnAsDouble方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bilinear_height
double bilinear_height(DataAccessor pSrcAcc, double I, double J)
{
double z1=0,z2=0,z3=0,z4=0;
pSrcAcc->toPixel(int(J),int(I));
VERIFY(pSrcAcc.isValid());
z1 = pSrcAcc->getColumnAsDouble();
pSrcAcc->toPixel(int(J)+1,int(I));
VERIFY(pSrcAcc.isValid());
z2 = pSrcAcc->getColumnAsDouble();
pSrcAcc->toPixel(int(J),int(I)+1);
VERIFY(pSrcAcc.isValid());
z3 = pSrcAcc->getColumnAsDouble();
pSrcAcc->toPixel(int(J)+1,int(I)+1);
VERIFY(pSrcAcc.isValid());
z4 = pSrcAcc->getColumnAsDouble();
double a=0,b=0,c=0,d=0;
d = z1;
a = (z2-z1);
b = (z3-z1);
c = (z4+z1-z2-z3);
double H = a*(J-int(J))+b*(I-int(I))+c*(I-int(I))*(J-int(J))+d;
return H;
}
示例2: process
//.........这里部分代码省略.........
double NodeLat, NodeLon, H_IJ=0;
//int DSM_I, DSM_J;
for (unsigned int row = 0; row < N_Row; ++row)
{
if (pProgress != NULL)
{
pProgress->updateProgress("Calculating result", row * 100 / N_Row, NORMAL);
}
if (!pDestAcc.isValid())
{
std::string msg = "Unable to access the cube data.";
pProgress->updateProgress(msg, 0, ERRORS);
pStep->finalize(Message::Failure, msg);
return false;
}
for (unsigned int col = 0; col < N_Col; ++col)
{
NodeLat = OrthoGrid.Lat_Min+row*OrthoGrid.Lat_Step;
NodeLon = OrthoGrid.Lon_Min+col*OrthoGrid.Lon_Step;
// RETRIEVE HEIGHT VALUE FROM DSM
if (DSM_resampling == 0)
{
int DSM_I = int((NodeLon - DSMGrid.Lon_Min)/DSMGrid.Lon_Step);
int DSM_J = pDescDSM->getRowCount() - int((NodeLat - DSMGrid.Lat_Min)/DSMGrid.Lat_Step);
pDSMAcc->toPixel(DSM_J,DSM_I);
VERIFY(pDSMAcc.isValid());
H_IJ = (pDSMAcc->getColumnAsDouble());
}
else
{
double DSM_I = ((NodeLon - DSMGrid.Lon_Min)/DSMGrid.Lon_Step);
double DSM_J = pDescDSM->getRowCount() - ((NodeLat - DSMGrid.Lat_Min)/DSMGrid.Lat_Step);
H_IJ = bilinear_height(pDSMAcc,DSM_I,DSM_J);
}
P_COORD NodeImage = Model->SAR_GroundToImage(NodeLon,NodeLat,H_IJ+Geoid_Offset);
if ((NodeImage.I>1 && NodeImage.I< Model->Metadata.Width-1) && (NodeImage.J>1 && NodeImage.J< Model->Metadata.Height-1))
{
switchOnEncoding(pResultDesc->getDataType(), copypixel3, pDestAcc->getColumn(), pSrcAcc, int(NodeImage.I), int(NodeImage.J),boxsize, H_IJ);
}
pDestAcc->nextColumn();
}
pDestAcc->nextRow();
}
Service<DesktopServices> pDesktop;
Service<ModelServices> pMod;
GcpList* GcpL = static_cast<GcpList*>(pMod->createElement("corner coordinate","GcpList",pResultCube.get()));
// Update GCPs Information: to account for Opticks reading gcp lat&lon values the opposite way around,
// here it is necessary to switch the value to assign lat to gcp.mCoordinate.mX and lon to gcp.mCoordinate.mY
GcpPoint Punto;
Punto.mCoordinate.mX = OrthoGrid.Lat_Min;