SAGA API v2.0.8
CSG_Grid_System Class Reference

#include <grid.h>

List of all members.

Public Member Functions

 CSG_Grid_System (void)
 CSG_Grid_System (const CSG_Grid_System &System)
 CSG_Grid_System (double Cellsize, const CSG_Rect &Extent)
 CSG_Grid_System (double Cellsize, double xMin, double yMin, double xMax, double yMax)
 CSG_Grid_System (double Cellsize, double xMin, double yMin, int NX, int NY)
 ~CSG_Grid_System (void)
bool is_Valid (void) const
const SG_Char * Get_Name (bool bShort=true)
double Get_Cellsize (void) const
double Get_Cellarea (void) const
int Get_NX (void) const
int Get_NY (void) const
long Get_NCells (void) const
const CSG_RectGet_Extent (bool bCells=false) const
double Get_XMin (bool bCells=false) const
double Get_XMax (bool bCells=false) const
double Get_XRange (bool bCells=false) const
double Get_YMin (bool bCells=false) const
double Get_YMax (bool bCells=false) const
double Get_YRange (bool bCells=false) const
bool operator== (const CSG_Grid_System &System) const
void operator= (const CSG_Grid_System &System)
bool Assign (const CSG_Grid_System &System)
bool Assign (double Cellsize, const CSG_Rect &Extent)
bool Assign (double Cellsize, double xMin, double yMin, double xMax, double yMax)
bool Assign (double Cellsize, double xMin, double yMin, int NX, int NY)
bool is_Equal (const CSG_Grid_System &System) const
bool is_Equal (double Cellsize, const TSG_Rect &Extent) const
double Fit_xto_Grid_System (double x) const
 Aligns the world coordinate x to the rows of the grid system and returns it.
double Fit_yto_Grid_System (double y) const
 Aligns the world coordinate y to the columns of the grid system and returns it.
TSG_Point Fit_to_Grid_System (TSG_Point ptWorld) const
 Aligns the world coordinate ptWorld to the rows and columns of the grid system and returns it.
double Get_xGrid_to_World (int xGrid) const
double Get_yGrid_to_World (int yGrid) const
TSG_Point Get_Grid_to_World (int xGrid, int yGrid) const
int Get_xWorld_to_Grid (double xWorld) const
int Get_yWorld_to_Grid (double yWorld) const
bool Get_World_to_Grid (int &xGrid, int &yGrid, double xWorld, double yWorld) const
bool Get_World_to_Grid (int &xGrid, int &yGrid, TSG_Point ptWorld) const
bool Get_Neighbor_Pos (int Direction, int x, int y, int &xPos, int &yPos) const
int Get_xToSave (int Direction, int x) const
int Get_yToSave (int Direction, int y) const
int Get_xFromSave (int Direction, int x) const
int Get_yFromSave (int Direction, int y) const
bool is_InGrid (int x, int y) const
bool is_InGrid (int x, int y, int Rand) const
double Get_Length (int Direction) const

Static Public Member Functions

static int Get_xTo (int Direction, int x=0)
static int Get_yTo (int Direction, int y=0)
static int Get_xFrom (int Direction, int x=0)
static int Get_yFrom (int Direction, int y=0)
static double Get_UnitLength (int Direction)

Detailed Description

CSG_Grid_System is used by the CSG_Grid class to provide information about the number of rows and columns, the cell size and the georeference, which define the grid. It offers various functions, which help when working with grids.

See also:
CSG_Grid

Definition at line 212 of file grid.h.


Constructor & Destructor Documentation

CSG_Grid_System::CSG_Grid_System ( void  )

Definition at line 75 of file grid_system.cpp.

CSG_Grid_System::CSG_Grid_System ( const CSG_Grid_System System)

Definition at line 83 of file grid_system.cpp.

References Assign().

CSG_Grid_System::CSG_Grid_System ( double  Cellsize,
const CSG_Rect Extent 
)

Definition at line 91 of file grid_system.cpp.

References Assign().

CSG_Grid_System::CSG_Grid_System ( double  Cellsize,
double  xMin,
double  yMin,
double  xMax,
double  yMax 
)

Definition at line 99 of file grid_system.cpp.

References Assign().

CSG_Grid_System::CSG_Grid_System ( double  Cellsize,
double  xMin,
double  yMin,
int  NX,
int  NY 
)

Definition at line 107 of file grid_system.cpp.

References Assign().

CSG_Grid_System::~CSG_Grid_System ( void  )

Definition at line 115 of file grid_system.cpp.


Member Function Documentation

bool CSG_Grid_System::Assign ( double  Cellsize,
const CSG_Rect Extent 
)
bool CSG_Grid_System::Assign ( double  Cellsize,
double  xMin,
double  yMin,
double  xMax,
double  yMax 
)

Definition at line 207 of file grid_system.cpp.

References Assign().

bool CSG_Grid_System::Assign ( double  Cellsize,
double  xMin,
double  yMin,
int  NX,
int  NY 
)

Definition at line 218 of file grid_system.cpp.

References CSG_Rect::Assign().

TSG_Point CSG_Grid_System::Fit_to_Grid_System ( TSG_Point  ptWorld) const [inline]

Aligns the world coordinate ptWorld to the rows and columns of the grid system and returns it.

Definition at line 268 of file grid.h.

References SSG_Point::x, and SSG_Point::y.

double CSG_Grid_System::Fit_xto_Grid_System ( double  x) const [inline]

Aligns the world coordinate x to the rows of the grid system and returns it.

Definition at line 262 of file grid.h.

double CSG_Grid_System::Fit_yto_Grid_System ( double  y) const [inline]

Aligns the world coordinate y to the columns of the grid system and returns it.

Definition at line 265 of file grid.h.

double CSG_Grid_System::Get_Cellarea ( void  ) const [inline]

Definition at line 230 of file grid.h.

const CSG_Rect& CSG_Grid_System::Get_Extent ( bool  bCells = false) const [inline]

Definition at line 236 of file grid.h.

Referenced by CSG_Grid::Get_Value(), and CSG_Parameter_Grid_System::On_Serialize().

TSG_Point CSG_Grid_System::Get_Grid_to_World ( int  xGrid,
int  yGrid 
) const [inline]

Definition at line 281 of file grid.h.

References SSG_Point::x, and SSG_Point::y.

double CSG_Grid_System::Get_Length ( int  Direction) const [inline]

Definition at line 352 of file grid.h.

Referenced by CSG_Grid::Get_Gradient_NeighborDir().

const SG_Char * CSG_Grid_System::Get_Name ( bool  bShort = true)
long CSG_Grid_System::Get_NCells ( void  ) const [inline]

Definition at line 234 of file grid.h.

Referenced by SG_Grid_Cache_Check().

bool CSG_Grid_System::Get_Neighbor_Pos ( int  Direction,
int  x,
int  y,
int &  xPos,
int &  yPos 
) const [inline]

Definition at line 308 of file grid.h.

int CSG_Grid_System::Get_NX ( void  ) const [inline]
int CSG_Grid_System::Get_NY ( void  ) const [inline]
static double CSG_Grid_System::Get_UnitLength ( int  Direction) [inline, static]

Definition at line 353 of file grid.h.

bool CSG_Grid_System::Get_World_to_Grid ( int &  xGrid,
int &  yGrid,
TSG_Point  ptWorld 
) const [inline]

Definition at line 301 of file grid.h.

References SSG_Point::x, and SSG_Point::y.

bool CSG_Grid_System::Get_World_to_Grid ( int &  xGrid,
int &  yGrid,
double  xWorld,
double  yWorld 
) const [inline]

Definition at line 296 of file grid.h.

static int CSG_Grid_System::Get_xFrom ( int  Direction,
int  x = 0 
) [inline, static]

Definition at line 341 of file grid.h.

Referenced by CSG_Grid::Get_Gradient().

int CSG_Grid_System::Get_xFromSave ( int  Direction,
int  x 
) const [inline]

Definition at line 346 of file grid.h.

double CSG_Grid_System::Get_xGrid_to_World ( int  xGrid) const [inline]

Definition at line 278 of file grid.h.

double CSG_Grid_System::Get_XMax ( bool  bCells = false) const [inline]

Definition at line 239 of file grid.h.

double CSG_Grid_System::Get_XMin ( bool  bCells = false) const [inline]

Definition at line 238 of file grid.h.

Referenced by CSG_Grid::Create(), and Get_Name().

double CSG_Grid_System::Get_XRange ( bool  bCells = false) const [inline]

Definition at line 240 of file grid.h.

static int CSG_Grid_System::Get_xTo ( int  Direction,
int  x = 0 
) [inline, static]

Definition at line 313 of file grid.h.

Referenced by CSG_Grid::Get_Gradient(), and CSG_Grid::Get_Gradient_NeighborDir().

int CSG_Grid_System::Get_xToSave ( int  Direction,
int  x 
) const [inline]

Definition at line 344 of file grid.h.

int CSG_Grid_System::Get_xWorld_to_Grid ( double  xWorld) const [inline]

Definition at line 293 of file grid.h.

static int CSG_Grid_System::Get_yFrom ( int  Direction,
int  y = 0 
) [inline, static]

Definition at line 342 of file grid.h.

Referenced by CSG_Grid::Get_Gradient().

int CSG_Grid_System::Get_yFromSave ( int  Direction,
int  y 
) const [inline]

Definition at line 347 of file grid.h.

double CSG_Grid_System::Get_yGrid_to_World ( int  yGrid) const [inline]

Definition at line 279 of file grid.h.

double CSG_Grid_System::Get_YMax ( bool  bCells = false) const [inline]

Definition at line 243 of file grid.h.

double CSG_Grid_System::Get_YMin ( bool  bCells = false) const [inline]

Definition at line 242 of file grid.h.

Referenced by CSG_Grid::Create(), and Get_Name().

double CSG_Grid_System::Get_YRange ( bool  bCells = false) const [inline]

Definition at line 244 of file grid.h.

static int CSG_Grid_System::Get_yTo ( int  Direction,
int  y = 0 
) [inline, static]

Definition at line 327 of file grid.h.

Referenced by CSG_Grid::Get_Gradient(), and CSG_Grid::Get_Gradient_NeighborDir().

int CSG_Grid_System::Get_yToSave ( int  Direction,
int  y 
) const [inline]

Definition at line 345 of file grid.h.

int CSG_Grid_System::Get_yWorld_to_Grid ( double  yWorld) const [inline]

Definition at line 294 of file grid.h.

bool CSG_Grid_System::is_Equal ( double  Cellsize,
const TSG_Rect Extent 
) const

Definition at line 275 of file grid_system.cpp.

bool CSG_Grid_System::is_Equal ( const CSG_Grid_System System) const
bool CSG_Grid_System::is_InGrid ( int  x,
int  y 
) const [inline]

Definition at line 349 of file grid.h.

bool CSG_Grid_System::is_InGrid ( int  x,
int  y,
int  Rand 
) const [inline]

Definition at line 350 of file grid.h.

void CSG_Grid_System::operator= ( const CSG_Grid_System System)

Definition at line 182 of file grid_system.cpp.

References Assign().

bool CSG_Grid_System::operator== ( const CSG_Grid_System System) const

Definition at line 176 of file grid_system.cpp.

References is_Equal().


The documentation for this class was generated from the following files: