⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ugkpoint.cpp

📁 linux下一款GIS程序源码
💻 CPP
字号:
// ugkpoint.cpp: implementation of the UGKPoint class.////////////////////////////////////////////////////////////////////////#include "ugkpoint.h"/************************************************************************//*                              UGKPoint()                              *//************************************************************************/UGKPoint::UGKPoint(){	x = 0;    y = 0;    z = 0;}/************************************************************************//*                              UGKPoint()                              *//*                                                                      *//*      Initialize point to value.                                      *//************************************************************************/UGKPoint::UGKPoint(double xIn, double yIn, double zIn){	x = xIn;	y = yIn;	z = zIn;}/************************************************************************//*                             ~UGKPoint()                              *//************************************************************************/UGKPoint::~UGKPoint(){}/************************************************************************//*                               clone()                                *//*                                                                      *//*      Make a new object that is a copy of this object.                *//************************************************************************/UGKGeometry *UGKPoint::clone() const{    UGKPoint    *poNewPoint = new UGKPoint( x, y, z );    return poNewPoint;}/************************************************************************//*                               empty()                                *//************************************************************************/void UGKPoint::empty(){    x = y = z = 0.0;}/************************************************************************//*                            getDimension()                            *//************************************************************************/int UGKPoint::getDimension() const{    return 0;}/************************************************************************//*                       getCoordinateDimension()                       *//************************************************************************/int UGKPoint::getCoordinateDimension() const{    if( z == 0 )        return 2;    else        return 3;}/************************************************************************//*                          getGeometryType()                           *//************************************************************************/UGKwkbGeometryType UGKPoint::getGeometryType() const{    if( z == 0 )        return wkbPoint;    else        return wkbPoint25D;}/************************************************************************//*                          getGeometryName()                           *//************************************************************************/const char * UGKPoint::getGeometryName() const{    return "POINT";}/************************************************************************//*                            flattenTo2D()                             *//************************************************************************/void UGKPoint::flattenTo2D(){    z = 0;}/************************************************************************//*                              WkbSize()                               *//*                                                                      *//*      Return the size of this object in well known binary             *//*      representation including the byte order, and type information.  *//************************************************************************/int UGKPoint::WkbSize() const{    if( z == 0)        return 21;    else        return 29;}/************************************************************************//*                            getEnvelope()                             *//************************************************************************/void UGKPoint::getEnvelope( UGKEnvelope * psEnvelope ) const{    psEnvelope->MinX = psEnvelope->MaxX = getX();    psEnvelope->MinY = psEnvelope->MaxY = getY();}/************************************************************************//*                               Equal()                                *//************************************************************************/UGKBool UGKPoint::Equals( UGKGeometry * poOther ) const{    UGKPoint    *poOPoint = (UGKPoint *) poOther;        if( poOPoint== this )        return TRUE;        if( poOther->getGeometryType() != getGeometryType() )        return FALSE;    // we should eventually test the SRS.        if( poOPoint->getX() != getX()        || poOPoint->getY() != getY()        || poOPoint->getZ() != getZ() )        return FALSE;    else        return TRUE;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -