当前位置: 首页>>代码示例>>C++>>正文


C++ ossimDpt::hasNans方法代码示例

本文整理汇总了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
}
开发者ID:rb-rialto,项目名称:ossim,代码行数:38,代码来源:ossimRpcModel.cpp

示例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);
        }
    }
}
开发者ID:whztt07,项目名称:star_ossim,代码行数:31,代码来源:ossimDrect.cpp

示例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, ... )
开发者ID:Dukeke,项目名称:ossim,代码行数:25,代码来源:ossimGpkgTileMatrixRecord.cpp

示例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;
   }
开发者ID:Dukeke,项目名称:ossim,代码行数:25,代码来源:ImageViewManipulator.cpp

示例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;
}
开发者ID:Dukeke,项目名称:ossim,代码行数:30,代码来源:ossimBuckeyeSensor.cpp

示例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;
}
开发者ID:bradh,项目名称:ossim-plugins,代码行数:17,代码来源:ossimGpkgTileMatrixSetRecord.cpp

示例7: x

//*******************************************************************
// Public Constructor:
//*******************************************************************
ossimFpt::ossimFpt(const ossimDpt& pt)
   :
      x(pt.x), y(pt.y)
{
   if(pt.hasNans())
   {
      makeNan();
   }
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:12,代码来源:ossimFpt.cpp

示例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);
      }
   }
   
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:14,代码来源:ossimQuadTreeWarp.cpp

示例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();
   }
}
开发者ID:Dukeke,项目名称:ossim,代码行数:14,代码来源:ImageWidget.cpp

示例10: lineSampleToWorld

void  ossimRpcProjection::lineSampleToWorld(const ossimDpt& imagePoint,
                                            ossimGpt&       worldPoint) const
{
   if(!imagePoint.hasNans())
   {
      
      lineSampleHeightToWorld(imagePoint,
                              worldPoint.height(),
                              worldPoint);
   }
   else
   {
      worldPoint.makeNan();
   }
}
开发者ID:ossimlabs,项目名称:ossim,代码行数:15,代码来源:ossimRpcProjection.cpp

示例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);   
}
开发者ID:ICODE-MDA,项目名称:AutomatedSARShipDetection,代码行数:16,代码来源:ossimCsmSensorModel.cpp

示例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;
 }
开发者ID:573671712,项目名称:OTB,代码行数:17,代码来源:ossimTileMapModel.cpp

示例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();
   }
}
开发者ID:loongfee,项目名称:radi-ossim,代码行数:25,代码来源:ossimRpcModel.cpp

示例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;
}
开发者ID:ossimlabs,项目名称:ossim,代码行数:38,代码来源:ossimSpectraboticsRedEdgeModel.cpp

示例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);
   }
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:61,代码来源:ossimEquDistCylProjection.cpp


注:本文中的ossimDpt::hasNans方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。