|
SAGA API
v9.6
|
Go to the documentation of this file.
132 return( sqrt(
x*
x +
y*
y) );
215 return( sqrt(
x*
x +
y*
y +
z*
z) );
305 return( sqrt(
x*
x +
y*
y +
z*
z +
m*
m) );
318 m_Points.
Create(
sizeof(
TSG_Point), 0, TSG_Array_Growth::SG_ARRAY_GROWTH_1);
323 m_Points.
Create(
sizeof(
TSG_Point), 0, TSG_Array_Growth::SG_ARRAY_GROWTH_1);
375 m_Lines.
Create(0, TSG_Array_Growth::SG_ARRAY_GROWTH_0);
380 m_Lines.
Create(0, TSG_Array_Growth::SG_ARRAY_GROWTH_0);
392 m_Lines.
Create(0, TSG_Array_Growth::SG_ARRAY_GROWTH_0);
466 if( Index >= 0 && Index < m_Lines.
Get_Size() )
470 return( m_Lines.
Del(Index) );
486 if( new_Count > old_Count )
490 for(
sLong i=old_Count; i<new_Count; i++)
495 else if( new_Count < old_Count )
497 for(
sLong i=new_Count; i<old_Count; i++)
700 xMin = _xMin < _xMax ? _xMin : _xMax;
701 xMax = _xMin < _xMax ? _xMax : _xMin;
703 yMin = _yMin < _yMax ? _yMin : _yMax;
704 yMax = _yMin < _yMax ? _yMax : _yMin;
788 return(
Move(Point.
x, Point.
y) );
810 return(
Inflate(d, d, bPercent) );
815 return(
Inflate(-dx, -dy, bPercent) );
820 return(
Deflate(d, d, bPercent) );
944 m_nRects = 0; m_Rects = NULL;
950 m_nRects = 0; m_Rects = NULL;
966 for(
int i=0; i<m_nRects; i++)
983 for(
int i=0; i<Rects.m_nRects; i++)
985 Add(*Rects.m_Rects[i]);
1015 m_Rects[m_nRects] =
new CSG_Rect(Rect);
1066 xMin = _xMin < _xMax ? _xMin : _xMax;
1067 xMax = _xMin < _xMax ? _xMax : _xMin;
1069 yMin = _yMin < _yMax ? _yMin : _yMax;
1070 yMax = _yMin < _yMax ? _yMax : _yMin;
1140 return(
Move(Point.
x, Point.
y) );
1228 return( (this->xMin ==
xMin) && (this->yMin ==
yMin)
1229 && (this->xMax ==
xMax) && (this->yMax ==
yMax) );
1300 for(
int i=0; i<m_nRects; i++)
1317 for(
int i=0; i<Rects.m_nRects; i++)
1319 Add(*Rects.m_Rects[i]);
1368 m_IDW_bOffset =
true;
1382 #define INIT_VALUE(id, val) if( Parameters(id) ) { Parameters(id)->Set_Value(val); Parameters(id)->Set_Default(val); }
1384 INIT_VALUE(
"DW_WEIGHTING" ,(
int)m_Weighting );
1399 "DW_WEIGHTING" ,
_TL(
"Weighting Function"),
1402 _TL(
"no distance weighting"),
1403 _TL(
"inverse distance to a power"),
1410 "DW_IDW_POWER" ,
_TL(
"Power"),
1417 Parameters.
Add_Bool (
"DW_WEIGHTING",
1418 "DW_IDW_OFFSET" ,
_TL(
"Offset"),
1419 _TL(
"Calculates weights for distance plus one, avoiding division by zero for zero distances"),
1425 "DW_BANDWIDTH" ,
_TL(
"Bandwidth"),
1426 _TL(
"Bandwidth for exponential and Gaussian weighting"),
1436 if( Parameters(
"DW_WEIGHTING") )
1438 int Method = Parameters(
"DW_WEIGHTING")->asInt();
1440 Parameters.
Set_Enabled(
"DW_IDW_OFFSET", Method == 1);
1441 Parameters.
Set_Enabled(
"DW_IDW_POWER" , Method == 1);
1442 Parameters.
Set_Enabled(
"DW_BANDWIDTH" , Method >= 2);
1451 if( Parameters(
"DW_WEIGHTING") )
1453 switch( Parameters(
"DW_WEIGHTING")->asInt() )
1462 if( Parameters(
"DW_IDW_OFFSET") )
1467 if( Parameters(
"DW_IDW_POWER" ) )
1472 if( Parameters(
"DW_BANDWIDTH" ) )
1488 m_Weighting = Weighting;
1501 m_IDW_Power = Value;
1509 m_IDW_bOffset = bOn;
1522 m_Bandwidth = Value;
bool Set_Array(sLong nValues, bool bShrink=true)
CSG_Rect & Assign(double xMin, double yMin, double xMax, double yMax)
bool Add(double x, double y)
CSG_Rect & Deflate(double d, bool bPercent=true)
bool Contains(double x, double y) const
virtual void Add(const CSG_Point_3D &Point)
bool Assign(const CSG_Rects_Int &Rects)
bool Create(const CSG_Lines &Lines)
sLong Get_Size(void) const
static bool Enable_Parameters(class CSG_Parameters &Parameters)
bool Add(double x, double y, double z)
virtual double Get_Length(void) const
virtual void Subtract(const CSG_Point_3D &Point)
CSG_Rect_Int & Inflate(int d)
virtual void Subtract(const CSG_Point &Point)
double Get_XMax(void) const
sLong Get_Size(void) const
CSG_Rect_Int & Set_TopRight(int x, int y)
virtual double Get_Length(void) const
virtual void Multiply(const CSG_Point &Point)
bool Set_IDW_Power(double Value)
virtual void Add(const CSG_Point &Point)
TSG_Intersection Intersects(const CSG_Rect &Rect) const
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
bool Set_Count(sLong nLines)
virtual ~CSG_Rects_Int(void)
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
CSG_Rect_Int & Assign(int xMin, int yMin, int xMax, int yMax)
CSG_Distance_Weighting(void)
void ** Create(const CSG_Array_Pointer &Array)
bool Set_Parameters(class CSG_Parameters &Parameters)
bool Contains(double x, double y) const
bool Intersect(const CSG_Rect &Rect)
virtual void Assign(double x, double y, double z, double m)
double Get_XRange(void) const
CSG_Rect_Int & Union(int x, int y)
CSG_Rect_Int & Set_BottomLeft(int x, int y)
bool Create(int xMin, int yMin, int xMax, int yMax)
CSG_Rect & Set_BottomLeft(double x, double y)
double Get_YMin(void) const
virtual void Add(const CSG_Point_4D &Point)
virtual void Subtract(const CSG_Point_4D &Point)
CSG_Rect_Int & Move(int dx, int dy)
sLong Get_Count(void) const
CSG_Rects_Int & operator=(const CSG_Rects_Int &Rects)
CSG_Rect & Move(double dx, double dy)
bool is_Equal(int xMin, int yMin, int xMax, int yMax) const
size_t Get_Value_Size(void) const
double SG_Get_Distance(double ax, double ay, double bx, double by, bool bPolar)
void Set_Enabled(bool bEnabled=true)
bool Create_Parameters(class CSG_Parameters &Parameters, const CSG_String &Parent="", bool bIDW_Offset=false)
virtual void Assign(double x, double y)
virtual double Get_Length(void) const
virtual void Assign(double x, double y, double z)
bool Set_Weighting(TSG_Distance_Weighting Weighting)
bool Assign(const CSG_Rects &Rects)
bool Intersect(const CSG_Rect_Int &Rect)
void * Create(const CSG_Array &Array)
bool Set_IDW_Offset(bool bOn=true)
sLong Get_Count(void) const
void * Get_Array(void) const
CSG_Rect & Union(double x, double y)
bool SG_Is_Equal(double a, double b, double epsilon)
bool Assign(const CSG_Lines &Lines)
static CSG_String Format(const char *Format,...)
virtual void Divide(double Value)
bool Inc_Array(sLong nValues=1)
CSG_Rect & Set_TopRight(double x, double y)
virtual void Multiply(const CSG_Point_3D &Point)
bool is_Equal(double xMin, double yMin, double xMax, double yMax, double epsilon=0.) const
static bool Add_Parameters(class CSG_Parameters &Parameters, const CSG_String &Parent="", bool bIDW_Offset=false)
bool Assign(const CSG_Points_Int &Points)
bool Create(double xMin, double yMin, double xMax, double yMax)
bool Set_Array(sLong nValues, bool bShrink=true)
#define INIT_VALUE(id, val)
double Get_Length(void) const
double Get_YMax(void) const
virtual void Divide(double Value)
double Get_XMin(void) const
CSG_Rect & Inflate(double d, bool bPercent=true)
CSG_Rect_Int & Deflate(int d)
CSG_Points & Get_Line(sLong Index)
virtual void Multiply(const CSG_Point_4D &Point)
virtual void Divide(double Value)
bool Assign(const CSG_Points_3D &Points)
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
virtual ~CSG_Distance_Weighting(void)
TSG_Intersection Intersects(const CSG_Rect_Int &Rect) const
bool Assign(const CSG_Points &Points)
double Get_YRange(void) const
void * Get_Entry(sLong Index) const
Returns a pointer to the memory address of the requested variable. You have to type cast and derefere...
CSG_Parameter * Add_Bool(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool Value=false)
CSG_Rects & operator=(const CSG_Rects &Rects)
bool Set_BandWidth(double Value)
CSG_Parameter * Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default=0)