本文整理汇总了C++中SpatialDataView::setDataOrigin方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialDataView::setDataOrigin方法的具体用法?C++ SpatialDataView::setDataOrigin怎么用?C++ SpatialDataView::setDataOrigin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialDataView
的用法示例。
在下文中一共展示了SpatialDataView::setDataOrigin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
//.........这里部分代码省略.........
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;
Punto.mCoordinate.mY = OrthoGrid.Lon_Min;
Punto.mCoordinate.mZ = 0.0;
Punto.mPixel.mX = 0.0;
Punto.mPixel.mY = 0.0;
GcpL->addPoint(Punto);
Punto.mCoordinate.mX = OrthoGrid.Lat_Max;
Punto.mCoordinate.mY = OrthoGrid.Lon_Min;
Punto.mCoordinate.mZ = 0.0;
Punto.mPixel.mX = 0.0;
Punto.mPixel.mY = OrthoGrid.Y_Dim;
GcpL->addPoint(Punto);
Punto.mCoordinate.mX = OrthoGrid.Lat_Min;
Punto.mCoordinate.mY = OrthoGrid.Lon_Max;
Punto.mCoordinate.mZ = 0.0;
Punto.mPixel.mX = OrthoGrid.X_Dim;
Punto.mPixel.mY = 0.0;
GcpL->addPoint(Punto);
Punto.mCoordinate.mX = OrthoGrid.Lat_Max;
Punto.mCoordinate.mY = OrthoGrid.Lon_Max;
Punto.mCoordinate.mZ = 0.0;
Punto.mPixel.mX = OrthoGrid.X_Dim;
Punto.mPixel.mY = OrthoGrid.Y_Dim;
GcpL->addPoint(Punto);
SpatialDataWindow* pWindow = static_cast<SpatialDataWindow*>(pDesktop->createWindow(pResultCube->getName(),
SPATIAL_DATA_WINDOW));
SpatialDataView* pView = (pWindow == NULL) ? NULL : pWindow->getSpatialDataView();
pView->setPrimaryRasterElement(pResultCube.get());
pView->createLayer(RASTER, pResultCube.get());
pView->createLayer(GCP_LAYER,GcpL,"GCP");
pView->setDataOrigin(LOWER_LEFT);
pResultCube.release();
pProgress->updateProgress("Orthorectification is complete.", 100, NORMAL);
pStep->addStep("End","app", "B4D426EC-E06D-11E1-83C8-42E56088709B");
pStep->finalize();
return true;
}