• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ossimDpt类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ossimDpt的典型用法代码示例。如果您正苦于以下问题:C++ ossimDpt类的具体用法?C++ ossimDpt怎么用?C++ ossimDpt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ossimDpt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: shift

//*******************************************************************
// Public Method: ossimDrect::clip
//*******************************************************************
bool ossimDrect::clip(ossimDpt &p1, ossimDpt &p2)const
{
    if(p1.isNan() || p2.isNan())
    {
        return false;
    }
    ossimDpt shift(-theUlCorner.x,
                   -theUlCorner.y);

    ossimDpt tempShiftP1 = p1+shift;
    ossimDpt tempShiftP2 = p2+shift;
    double maxW = width()-1;
    double maxH = height()-1;
    if (clip_1d (&tempShiftP1.x, &tempShiftP1.y,
                 &tempShiftP2.x, &tempShiftP2.y,
                 maxW) == 0)
    {
        return false;
    }
    if(clip_1d (&tempShiftP1.y,
                &tempShiftP1.x,
                &tempShiftP2.y,
                &tempShiftP2.x, maxH) == 0)
    {
        return false;
    }
    p1 = tempShiftP1-shift;
    p2 = tempShiftP2-shift;
    return true;
}
开发者ID:whztt07,项目名称:star_ossim,代码行数:33,代码来源:ossimDrect.cpp


示例3: 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


示例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 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


示例7: 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


示例8: imageToView

void ossimIvtGeomXform::imageToView(const ossimDpt& ipt, ossimDpt& viewPt)
{
  viewPt.makeNan();
  if(m_ivt.valid())
  {
    m_ivt->imageToView(ipt, viewPt);
  }
}
开发者ID:bradh,项目名称:ossim-plugins,代码行数:8,代码来源:ossimIvtGeomXform.cpp


示例9: groundToImage

void ossimIvtGeomXform::groundToImage(const ossimGpt& gpt, ossimDpt& ipt)
{
  ipt.makeNan();
  if(m_geom.valid())
  {
    m_geom->worldToLocal(gpt, ipt);
  }
}
开发者ID:bradh,项目名称:ossim-plugins,代码行数:8,代码来源:ossimIvtGeomXform.cpp


示例10: viewToImage

void ossimIvtGeomXform::viewToImage(const ossimDpt& viewPt, ossimDpt& ipt)
{
  ipt.makeNan();
  if(m_ivt.valid())
  {
    m_ivt->viewToImage(viewPt, ipt);
  }
}
开发者ID:bradh,项目名称:ossim-plugins,代码行数:8,代码来源:ossimIvtGeomXform.cpp


示例11: worldToLineSample

//*****************************************************************************
//  METHOD: ossimRpcProjection::worldToLineSample()
//  
//  Overrides base class implementation. Directly computes line-sample from
//  the polynomials.
//*****************************************************************************
void ossimRpcProjection::worldToLineSample(const ossimGpt& ground_point,
                                      ossimDpt&       imgPt) const
{
   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): entering..." << std::endl;

   if(ground_point.isLatNan() ||
      ground_point.isLonNan() )
     {
       imgPt.makeNan();
       return;
     }
         
   //*
   // Normalize the lat, lon, hgt:
   //*
   double nlat = (ground_point.lat - theLatOffset) / theLatScale;
   double nlon = (ground_point.lon - theLonOffset) / theLonScale;
   double nhgt;

   if(ossim::isnan(ground_point.hgt))
   {
      nhgt = (theHgtScale - 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:
   //***
   imgPt.line = U*(theLineScale+theIntrackScale) + theLineOffset + theIntrackOffset;
   imgPt.samp = V*(theSampScale+theCrtrackScale) + theSampOffset + theCrtrackOffset;


   if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimRpcProjection::worldToLineSample(): returning..." << std::endl;

   return;
}
开发者ID:ossimlabs,项目名称:ossim,代码行数:64,代码来源:ossimRpcProjection.cpp


示例12: x

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


示例13: getDecimationFactor

void ossimImageSourceSequencer::getDecimationFactor(ossim_uint32 resLevel,
                                                    ossimDpt& result) const
{
   if(theInputConnection)
   {
      theInputConnection->getDecimationFactor(resLevel, result);
   }
   result.makeNan();
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:9,代码来源:ossimImageSourceSequencer.cpp


示例14: groundToView

void ossimIvtGeomXform::groundToView(const ossimGpt& gpt, ossimDpt& viewPt)
{
  ossimDpt ipt;
  viewPt.makeNan();

  groundToImage(gpt, ipt);
  if(!ipt.hasNans())
  {
    imageToView(ipt, viewPt);
  }
}
开发者ID:bradh,项目名称:ossim-plugins,代码行数:11,代码来源:ossimIvtGeomXform.cpp


示例15: viewToImage

//*****************************************************************************
//  Other workhorse of the object. Converts view-space to image-space.
//*****************************************************************************
void ossimImageViewProjectionTransform::viewToImage(const ossimDpt& vp, ossimDpt& ip) const
{
   // Check for same geometries on input and output (this includes NULL geoms):
   if (m_imageGeometry == m_viewGeometry)
   {
      ip = vp;
      return;
   }
   
   // Otherwise we need access to good geoms. Check for a bad geometry object:
   if (!m_imageGeometry || !m_viewGeometry)
   {
      ip.makeNan();
      return;
   }
   
   // Check for same projection on input and output sides to save projection to ground:
   const ossimProjection* iproj = m_imageGeometry->getProjection();
   const ossimProjection* vproj = m_viewGeometry->getProjection();
   if ((iproj && vproj && iproj->isEqualTo(*vproj)) || (iproj == vproj))
   {
      // Check for possible same 2D transforms as well:
      const ossim2dTo2dTransform* ixform = m_imageGeometry->getTransform();
      const ossim2dTo2dTransform* vxform = m_viewGeometry->getTransform();
      if (((ixform && vxform && ixform->isEqualTo(*vxform)) || (ixform == vxform)) &&
          (m_imageGeometry->decimationFactor(0) == m_viewGeometry->decimationFactor(0)))
      {
         ip = vp;
         return;
      }
      
      // Not the same 2D transform, so just perform local-image -> full-image -> local-view:
      ossimDpt fp;
      m_viewGeometry->rnToFull(vp, 0, fp);
      m_imageGeometry->fullToRn(fp, 0, ip);
      return;
   }
   
   //---
   // Completely different left and right side geoms (typical situation).
   // Need to project to ground.
   //---
   ossimGpt gp;
   m_viewGeometry->localToWorld(vp, gp);
   m_imageGeometry->worldToLocal(gp, ip);

#if 0 /* Please leave for debug. */
   cout <<"DEBUG ossimImageViewProjectionTransform::viewToImage:"
        <<"\n    vp: "<<vp
        <<"\n    gp: "<<gp
        <<"\n    ip: "<<ip
        <<std::endl;
#endif
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:57,代码来源:ossimImageViewProjectionTransform.cpp


示例16: getDecimationFactor

void ossimMrSidReader::getDecimationFactor(ossim_uint32 resLevel,
                                           ossimDpt& result) const
{
   if (theGeometry.valid())
   {
      theGeometry->decimationFactor(resLevel, result);
   }
   else
   {
      result.makeNan();
   }
}
开发者ID:renyu310,项目名称:ossim-svn,代码行数:12,代码来源:ossimMrSidReader.cpp


示例17:

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


示例18: 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


示例19: 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


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ossimDrect类代码示例发布时间:2022-05-31
下一篇:
C++ ossSLatch类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap