 |
SAGA API
v9.2
|
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++)
929 m_nRects = 0; m_Rects = NULL;
935 m_nRects = 0; m_Rects = NULL;
951 for(
int i=0; i<m_nRects; i++)
968 for(
int i=0; i<Rects.m_nRects; i++)
970 Add(*Rects.m_Rects[i]);
1000 m_Rects[m_nRects] =
new CSG_Rect(Rect);
1068 Move(-Point.
y, -Point.
y);
1131 return( (this->xMin ==
xMin) && (this->yMin ==
yMin)
1132 && (this->xMax ==
xMax) && (this->yMax ==
yMax) );
1286 for(
int i=0; i<m_nRects; i++)
1303 for(
int i=0; i<Rects.m_nRects; i++)
1305 Add(*Rects.m_Rects[i]);
1354 m_IDW_bOffset =
true;
1368 if( Parameters(
"DW_WEIGHTING" ) ) { Parameters(
"DW_WEIGHTING" )->Set_Value((
int)m_Weighting ); }
1369 if( Parameters(
"DW_IDW_POWER" ) ) { Parameters(
"DW_IDW_POWER" )->Set_Value( m_IDW_Power ); }
1370 if( Parameters(
"DW_IDW_OFFSET") ) { Parameters(
"DW_IDW_OFFSET")->Set_Value( m_IDW_bOffset); }
1371 if( Parameters(
"DW_BANDWIDTH" ) ) { Parameters(
"DW_BANDWIDTH" )->Set_Value( m_Bandwidth ); }
1383 "DW_WEIGHTING" ,
_TL(
"Weighting Function"),
1386 _TL(
"no distance weighting"),
1387 _TL(
"inverse distance to a power"),
1394 "DW_IDW_POWER" ,
_TL(
"Power"),
1401 Parameters.
Add_Bool (
"DW_WEIGHTING",
1402 "DW_IDW_OFFSET" ,
_TL(
"Offset"),
1403 _TL(
"Calculates weights for distance plus one, avoiding division by zero for zero distances"),
1409 "DW_BANDWIDTH" ,
_TL(
"Bandwidth"),
1410 _TL(
"Bandwidth for exponential and Gaussian weighting"),
1420 if( Parameters(
"DW_WEIGHTING") )
1422 int Method = Parameters(
"DW_WEIGHTING")->asInt();
1424 Parameters.
Set_Enabled(
"DW_IDW_OFFSET", Method == 1);
1425 Parameters.
Set_Enabled(
"DW_IDW_POWER" , Method == 1);
1426 Parameters.
Set_Enabled(
"DW_BANDWIDTH" , Method >= 2);
1435 if( Parameters(
"DW_WEIGHTING") )
1437 switch( Parameters(
"DW_WEIGHTING")->asInt() )
1446 if( Parameters(
"DW_IDW_OFFSET") )
1451 if( Parameters(
"DW_IDW_POWER" ) )
1456 if( Parameters(
"DW_BANDWIDTH" ) )
1472 m_Weighting = Weighting;
1485 m_IDW_Power = Value;
1493 m_IDW_bOffset = bOn;
1506 m_Bandwidth = Value;
bool Set_Array(sLong nValues, bool bShrink=true)
bool Add(double x, double y)
bool Contains(double x, double y) const
virtual void Add(const CSG_Point_3D &Point)
bool Assign(const CSG_Rects_Int &Rects)
bool operator!=(const CSG_Rect &Rect) const
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)
virtual void Subtract(const CSG_Point &Point)
double Get_XMax(void) const
sLong Get_Size(void) const
CSG_Rect_Int & operator=(const CSG_Rect_Int &Rect)
virtual double Get_Length(void) const
virtual void Multiply(const CSG_Point &Point)
bool Set_IDW_Power(double Value)
void Set_BottomLeft(int x, int y)
virtual void Add(const CSG_Point &Point)
void Set_TopRight(int x, int y)
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)
void operator+=(const CSG_Point &Point)
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
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)
void Deflate(double d, bool bPercent=true)
double Get_XRange(void) const
double Get_YMin(void) const
virtual void Add(const CSG_Point_4D &Point)
virtual void Subtract(const CSG_Point_4D &Point)
sLong Get_Count(void) const
CSG_Rects_Int & operator=(const CSG_Rects_Int &Rects)
void operator-=(const CSG_Point &Point)
bool operator==(const CSG_Rect &Rect) const
void Assign(double xMin, double yMin, double xMax, double yMax)
bool is_Equal(int xMin, int yMin, int xMax, int yMax) const
void Set_BottomLeft(double x, double y)
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)
void Inflate(double d, bool bPercent=true)
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)
void Union(double x, double y)
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
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)
virtual void Multiply(const CSG_Point_3D &Point)
bool is_Equal(double xMin, double yMin, double xMax, double yMax, double epsilon=0.) const
void Move(double dx, double dy)
CSG_Rect & operator=(const CSG_Rect &Rect)
static bool Add_Parameters(class CSG_Parameters &Parameters, const CSG_String &Parent="", bool bIDW_Offset=false)
bool Assign(const CSG_Points_Int &Points)
bool operator!=(const CSG_Rect_Int &Rect) const
bool operator==(const CSG_Rect_Int &Rect) const
bool Set_Array(sLong nValues, bool bShrink=true)
double Get_Length(void) const
double Get_YMax(void) const
virtual void Divide(double Value)
double Get_XMin(void) const
void operator-=(const TSG_Point_Int &Point)
void Set_TopRight(double x, double y)
void Assign(int xMin, int yMin, int xMax, int yMax)
void Move(int dx, int dy)
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)
void operator+=(const TSG_Point_Int &Point)
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)