本文整理汇总了C++中ossimGpt::isHgtNan方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimGpt::isHgtNan方法的具体用法?C++ ossimGpt::isHgtNan怎么用?C++ ossimGpt::isHgtNan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimGpt
的用法示例。
在下文中一共展示了ossimGpt::isHgtNan方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ossimGpt
ossimGpt ossimThreeParamDatum::shiftToWgs84(const ossimGpt &aPt)const
{
if(ossim::almostEqual(param1(), 0.0)&&
ossim::almostEqual(param2(), 0.0)&&
ossim::almostEqual(param3(), 0.0))
{
return ossimGpt(aPt.latd(),
aPt.lond(),
aPt.latd(),
ossimGpt().datum());
}
ossimEcefPoint p1 = aPt;
ossimEcefPoint p2;
if(withinMolodenskyRange(aPt.latd()))
{
ossimWgs84Datum wgs84;
double latin, lonin, hgtin;
double latout, lonout, hgtout;
double da = wgs84.ellipsoid()->getA() - ellipsoid()->getA();
double df = wgs84.ellipsoid()->getFlattening() - ellipsoid()->getFlattening();
latin = aPt.latr();
lonin = aPt.lonr();
hgtin = aPt.height();
if(aPt.isHgtNan())
{
hgtin = 0.0;
}
molodenskyShift(ellipsoid()->getA(), da, ellipsoid()->getFlattening(), df, param1(), param2(), param3(),
latin, lonin, hgtin,
latout, lonout, hgtout);
ossimGpt g;
g.latr(latout);
g.lonr(lonout);
g.height(hgtout);
g.datum(this);
return g;
}
else
{
p2 = ossimEcefPoint(p1.x() + theParam1,
p1.y() + theParam2,
p1.z() + theParam3);
}
return ossimGpt(p2); // defaults to WGS84
}
示例2: worldToLineSample
//*****************************************************************************
// METHOD: ossimRpcModel::worldToLineSample()
//
// Overrides base class implementation. Directly computes line-sample from
// the polynomials.
//*****************************************************************************
void ossimRpcModel::worldToLineSample(const ossimGpt& ground_point,
ossimDpt& img_pt) const
{
// if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): entering..." << std::endl;
if(ground_point.isLatNan() || ground_point.isLonNan() )
{
img_pt.makeNan();
return;
}
//***
// First check if the world point is inside bounding rectangle:
//***
//ossimDpt wdp (ground_point);
//if (!(theBoundGndPolygon.pointWithin(ground_point)))
// {
//img_pt = extrapolate(ground_point);
//if (traceExec()) CLOG << "returning..." << endl;
// img_pt.makeNan();
// return;
// }
//***
// Normalize the lat, lon, hgt:
//***
double nlat = (ground_point.lat - theLatOffset) / theLatScale;
double nlon = (ground_point.lon - theLonOffset) / theLonScale;
double nhgt;
if( ground_point.isHgtNan() )
{
// nhgt = (theHgtScale - theHgtOffset) / theHgtScale;
nhgt = ( - theHgtOffset) / theHgtScale;
}
else
{
nhgt = (ground_point.hgt - theHgtOffset) / theHgtScale;
}
//***
// Compute the adjusted, normalized line (U) and sample (V):
//***
double Pu = polynomial(nlat, nlon, nhgt, theLineNumCoef);
double Qu = polynomial(nlat, nlon, nhgt, theLineDenCoef);
double Pv = polynomial(nlat, nlon, nhgt, theSampNumCoef);
double Qv = polynomial(nlat, nlon, nhgt, theSampDenCoef);
double U_rot = Pu / Qu;
double V_rot = Pv / Qv;
//***
// U, V are normalized quantities. Need now to establish the image file
// line and sample. First, back out the adjustable parameter effects
// starting with rotation:
//***
double U = U_rot*theCosMapRot + V_rot*theSinMapRot;
double V = V_rot*theCosMapRot - U_rot*theSinMapRot;
//***
// Now back out skew, scale, and offset adjustments:
//***
img_pt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
img_pt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;
// if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcModel::worldToLineSample(): returning..." << std::endl;
return;
}