本文整理汇总了C++中ossimDpt::hasNans方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimDpt::hasNans方法的具体用法?C++ ossimDpt::hasNans怎么用?C++ ossimDpt::hasNans使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimDpt
的用法示例。
在下文中一共展示了ossimDpt::hasNans方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lineSampleToWorld
//*****************************************************************************
// METHOD: ossimRpcModel::lineSampleToWorld()
//
// Overrides base class implementation. Performs DEM intersection.
//*****************************************************************************
void ossimRpcModel::lineSampleToWorld(const ossimDpt& imagePoint,
ossimGpt& worldPoint) const
{
//---
// Under debate... (drb 20130610)
// this seems to be more accurate for the round trip
//---
#if 0
if(!imagePoint.hasNans())
{
lineSampleHeightToWorld(imagePoint,
worldPoint.height(),
worldPoint);
}
else
{
worldPoint.makeNan();
}
#else
if(!imagePoint.hasNans())
{
ossimEcefRay ray;
imagingRay(imagePoint, ray);
ossimElevManager::instance()->intersectRay(ray, worldPoint);
}
else
{
worldPoint.makeNan();
}
#endif
}
示例2: theOrientMode
ossimDrect::ossimDrect(const ossimDpt& p1,
const ossimDpt& p2,
const ossimDpt& p3,
const ossimDpt& p4,
ossimCoordSysOrientMode mode)
: theOrientMode(mode)
{
if(p1.hasNans()||p2.hasNans()||p3.hasNans()||p4.hasNans())
{
makeNan();
}
else
{
double minx, miny;
double maxx, maxy;
minx = std::min( p1.x, std::min(p2.x, std::min(p3.x, p4.x)));
miny = std::min( p1.y, std::min(p2.y, std::min(p3.y, p4.y)));
maxx = std::max( p1.x, std::max(p2.x, std::max(p3.x, p4.x)));
maxy = std::max( p1.y, std::max(p2.y, std::max(p3.y, p4.y)));
if(mode == OSSIM_LEFT_HANDED)
{
*this = ossimDrect(minx, miny, maxx, maxy, mode);
}
else
{
*this = ossimDrect(minx,maxy, maxx, miny, mode);
}
}
}
示例3: init
bool ossimGpkgTileMatrixRecord::init( ossim_int32 zoom_level,
const ossimIpt& matrixSize,
const ossimIpt& tileSize,
const ossimDpt& gsd )
{
bool status = false;
if ( (matrixSize.hasNans() == false) && (tileSize.hasNans() == false) &&
(gsd.hasNans() == false) )
{
m_table_name = "tiles";
m_zoom_level = zoom_level;
m_matrix_width = matrixSize.x;
m_matrix_height = matrixSize.y;
m_tile_width = tileSize.x;
m_tile_height = tileSize.y;
m_pixel_x_size = gsd.x;
m_pixel_y_size = gsd.y;
status = true;
}
return status;
} // End: ossimGpkgTileMatrixRecord::init( zoom_level, ... )
示例4: sceneToLocal
ossimDpt ImageViewManipulator::sceneToLocal(const ossimDpt& scenePoint)
{
ossimDpt result;
result.makeNan();
ossimImageGeometry* geom = asGeometry();
if(geom)
{
ossimGpt wpt;
geom->localToWorld(scenePoint, wpt);
result = wpt;
}
else
{
ossimImageViewAffineTransform* ivat = getObjectAs<ossimImageViewAffineTransform>();
if(ivat)
{
if(!scenePoint.hasNans())
{
ivat->viewToImage(scenePoint, result);
}
}
}
return result;
}
示例5: lineSampleToWorld
void ossimBuckeyeSensor::lineSampleToWorld(const ossimDpt& image_point,
ossimGpt& gpt) const
{
if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld:entering..." << std::endl;
if(image_point.hasNans())
{
gpt.makeNan();
return;
}
//***
// Determine imaging ray and invoke elevation source object's services to
// intersect ray with terrain model:
//***
ossimEcefRay ray;
imagingRay(image_point, ray);
ossimElevManager::instance()->intersectRay(ray, gpt);
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
}
if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimBuckeyeSensor::lineSampleToWorld: returning..." << std::endl;
return;
}
示例6: init
bool ossimGpkgTileMatrixSetRecord::init(
const std::string& tableName,ossim_int32 srs_id,
const ossimDpt& minPt, const ossimDpt& maxPt )
{
bool status = false;
if ( (minPt.hasNans() == false) && (maxPt.hasNans() == false) )
{
m_table_name = tableName;
m_srs_id = srs_id;
m_min_x = minPt.x;
m_min_y = minPt.y;
m_max_x = maxPt.x;
m_max_y = maxPt.y;
status = true;
}
return status;
}
示例7: x
//*******************************************************************
// Public Constructor:
//*******************************************************************
ossimFpt::ossimFpt(const ossimDpt& pt)
:
x(pt.x), y(pt.y)
{
if(pt.hasNans())
{
makeNan();
}
}
示例8: findAllNodes
void ossimQuadTreeWarp::findAllNodes(std::vector<const ossimQuadTreeWarpNode*>& result,
const ossimDpt& pt)const
{
if(!pt.hasNans()&&(!isEmpty()))
{
if(theTree->theBoundingRect.pointWithin(pt))
{
findAllNodes(result,
theTree,
pt);
}
}
}
示例9:
void ossimGui::ImageScrollWidget::setTrackPoint(const ossimDpt& position)
{
if(position.hasNans())
{
m_trackPoint.makeNan();
}
else
{
ossimDpt pt;
m_viewToScroll.map(position.x, position.y, &pt.x, &pt.y);
m_scrollToLocal.map(pt.x, pt.y, &m_trackPoint.x, &m_trackPoint.y);
m_widget->update();
}
}
示例10: lineSampleToWorld
void ossimRpcProjection::lineSampleToWorld(const ossimDpt& imagePoint,
ossimGpt& worldPoint) const
{
if(!imagePoint.hasNans())
{
lineSampleHeightToWorld(imagePoint,
worldPoint.height(),
worldPoint);
}
else
{
worldPoint.makeNan();
}
}
示例11: lineSampleToWorld
void ossimCsmSensorModel::lineSampleToWorld(const ossimDpt& image_point,
ossimGpt& gpt) const
{
if(image_point.hasNans())
{
gpt.makeNan();
return;
}
//***
// Determine imaging ray and invoke elevation source object's services to
// intersect ray with terrain model:
//***
ossimEcefRay ray;
imagingRay(image_point, ray);
ossimElevManager::instance()->intersectRay(ray, gpt);
}
示例12: lineSampleHeightToWorld
void ossimTileMapModel::lineSampleHeightToWorld(const ossimDpt& image_point,
const double& /* height */,
ossimGpt& gpt) const
{
if(!image_point.hasNans())
{
gpt.lon = static_cast<double>(image_point.samp)/(1 << qDepth)/256 *360.0-180.0;
double y = static_cast<double>(image_point.line)/(1 << qDepth)/256;
double ex = exp(4*M_PI*(y-0.5));
gpt.lat = -180.0/M_PI*asin((ex-1)/(ex+1));
}
else
{
gpt.makeNan();
}
return;
}
示例13: lineSampleToWorld
//*****************************************************************************
// METHOD: ossimRpcModel::lineSampleToWorld()
//
// Overrides base class implementation. Performs DEM intersection.
//*****************************************************************************
void ossimRpcModel::lineSampleToWorld(const ossimDpt& imagePoint,
ossimGpt& worldPoint) const
{
//lineSampleHeightToWorld(imagePoint, theHgtOffset, worldPoint);
//worldPoint.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(worldPoint);
//if(!worldPoint.hasNans()) return;
if(!imagePoint.hasNans())
{
ossimEcefRay ray;
imagingRay(imagePoint, ray);
if (m_proj) worldPoint.datum(m_proj->getDatum()); //loong
ossimElevManager::instance()->intersectRay(ray, worldPoint);
}
else
{
worldPoint.makeNan();
}
}
示例14: lineSampleToWorld
void ossimSpectraboticsRedEdgeModel::lineSampleToWorld(const ossimDpt& image_point,
ossimGpt& gpt) const
{
if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSpectraboticsRedEdgeModel::lineSampleToWorld:entering..." << std::endl;
if(image_point.hasNans())
{
gpt.makeNan();
return;
}
//***
// Extrapolate if image point is outside image:
//***
// if (!insideImage(image_point))
// {
// gpt.makeNan();
// gpt = extrapolate(image_point);
// return;
// }
//***
// Determine imaging ray and invoke elevation source object's services to
// intersect ray with terrain model:
//***
ossimEcefRay ray;
imagingRay(image_point, ray);
ossimElevManager::instance()->intersectRay(ray, gpt);
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << "image_point = " << image_point << std::endl;
ossimNotify(ossimNotifyLevel_DEBUG) << "ray = " << ray << std::endl;
ossimNotify(ossimNotifyLevel_DEBUG) << "gpt = " << gpt << std::endl;
}
if (traceDebug()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimSensorModel::lineSampleToWorld: returning..." << std::endl;
return;
}
示例15: lineSampleHeightToWorld
void ossimEquDistCylProjection::lineSampleHeightToWorld(const ossimDpt &lineSample,
const double& hgtEllipsoid,
ossimGpt& gpt)const
{
//
// make sure that the passed in lineSample is good and
// check to make sure our easting northing is good so
// we can compute the line sample.
//
//
if(lineSample.hasNans())
{
gpt.makeNan();
return;
}
if(theModelTransformUnitType != OSSIM_UNIT_UNKNOWN)
{
ossimMapProjection::lineSampleHeightToWorld(lineSample, hgtEllipsoid, gpt);
return;
}
else
{
if(theUlEastingNorthing.hasNans())
{
gpt.makeNan();
return;
}
ossimDpt eastingNorthing;
eastingNorthing = (theUlEastingNorthing);
eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
//
// Note: the Northing is positive up. In image space
// the positive axis is down so we must multiply by
// -1
//
eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
//
// now invert the meters into a ground point.
//
gpt = inverse(eastingNorthing);
gpt.datum(theDatum);
if(gpt.isLatNan() && gpt.isLonNan())
{
gpt.makeNan();
}
else
{
// Finally assign the specified height:
gpt.hgt = hgtEllipsoid;
}
}
if(theElevationLookupFlag)
{
gpt.hgt = ossimElevManager::instance()->getHeightAboveEllipsoid(gpt);
}
}