[Git][debian-gis-team/saga][experimental] 5 commits: New upstream version 9.0.1+dfsg
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Fri Apr 21 15:26:09 BST 2023
Bas Couwenberg pushed to branch experimental at Debian GIS Project / saga
Commits:
e77664de by Bas Couwenberg at 2023-04-21T15:56:27+02:00
New upstream version 9.0.1+dfsg
- - - - -
fb8de15b by Bas Couwenberg at 2023-04-21T15:56:47+02:00
Update upstream source from tag 'upstream/9.0.1+dfsg'
Update to upstream version '9.0.1+dfsg'
with Debian dir 6f925719d6c6786a3513501525f78b8506fe650a
- - - - -
b6d7b3b7 by Bas Couwenberg at 2023-04-21T15:57:17+02:00
New upstream release.
- - - - -
fc45fab8 by Bas Couwenberg at 2023-04-21T15:59:01+02:00
Drop triangle files from Files-Excluded, removed upstream.
- - - - -
f32fde60 by Bas Couwenberg at 2023-04-21T15:59:14+02:00
Set distribution to experimental.
- - - - -
22 changed files:
- debian/changelog
- debian/copyright
- saga-gis/src/accessories/helper/doxygen_saga_api_chm
- saga-gis/src/accessories/helper/doxygen_saga_api_html
- saga-gis/src/accessories/helper/make_saga_release.bat
- saga-gis/src/saga_core/saga_api/saga_api.h
- saga-gis/src/saga_core/saga_api/shapes.h
- saga-gis/src/saga_core/saga_api/shapes_clipper.cpp
- saga-gis/src/saga_core/saga_api/shapes_ogis.cpp
- saga-gis/src/saga_core/saga_cmd/man/saga_cmd.1
- saga-gis/src/saga_core/saga_cmd/tool.cpp
- saga-gis/src/saga_core/saga_gui/man/saga_gui.1
- saga-gis/src/saga_core/saga_gui/wksp_table.cpp
- saga-gis/src/tools/db/db_pgsql/db_pgsql.cpp
- saga-gis/src/tools/db/db_pgsql/db_pgsql.h
- saga-gis/src/tools/develop/dev_tools/qgistoolbox.cpp
- saga-gis/src/tools/grid/grid_analysis/soil_water_capacity.cpp
- saga-gis/src/tools/grid/grid_analysis/soil_water_capacity.h
- saga-gis/src/tools/pointcloud/pointcloud_tools/pc_cluster_analysis.cpp
- saga-gis/version.cmake
- saga_setup_win32.iss
- saga_setup_x64.iss
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+saga (9.0.1+dfsg-1~exp1) experimental; urgency=medium
+
+ * Team upload.
+ * New upstream release.
+ * Drop triangle files from Files-Excluded, removed upstream.
+
+ -- Bas Couwenberg <sebastic at debian.org> Fri, 21 Apr 2023 15:59:02 +0200
+
saga (9.0.0+dfsg-1~exp1) experimental; urgency=medium
* Team upload.
=====================================
debian/copyright
=====================================
@@ -4,12 +4,10 @@ Upstream-Contact: Olaf Conrad <oconrad at saga-gis.org>
Source: http://www.saga-gis.org
Comment: Saga is generally licensed using two licenses:
LGPL-2.1+ for the libraries and GPL-2+ for the rest of the program.
- Excluded files are non-free (triangle, firelib, dphull) or are already packaged
+ Excluded files are non-free (firelib, dphull) or are already packaged
in debian (svm and dxflib). CC BY-NC-SA documentation is also removed.
Files-Excluded: saga-gis/src/accessories/docs/*
saga-gis/src/saga_core/saga_api/mat_mRMR.cpp
- saga-gis/src/tools/grid/grid_gridding/nn/triangle.c
- saga-gis/src/tools/grid/grid_gridding/nn/triangle.h
saga-gis/src/tools/imagery/imagery_svm/svm/svm.cpp
saga-gis/src/tools/imagery/imagery_svm/svm/svm.h
saga-gis/src/tools/simulation/sim_fire_spreading/fireLib.*
=====================================
saga-gis/src/accessories/helper/doxygen_saga_api_chm
=====================================
@@ -38,7 +38,7 @@ PROJECT_NAME = "SAGA API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = v9.0.0
+PROJECT_NUMBER = v9.0.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO = ../../../saga_core/saga_gui/res/saga_icon_64.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = saga-9.0.0_api_doc
+OUTPUT_DIRECTORY = saga-9.0.1_api_doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -1371,7 +1371,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE = ../../saga-9.0.0_api.chm
+CHM_FILE = ../../saga-9.0.1_api.chm
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
=====================================
saga-gis/src/accessories/helper/doxygen_saga_api_html
=====================================
@@ -38,7 +38,7 @@ PROJECT_NAME = "SAGA API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = v9.0.0
+PROJECT_NUMBER = v9.0.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO = ../../../saga_core/saga_gui/res/saga_icon_64.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = saga-9.0.0_api_doc
+OUTPUT_DIRECTORY = saga-9.0.1_api_doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -1371,7 +1371,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE = ../../saga-9.0.0_api.chm
+CHM_FILE = ../../saga-9.0.1_api.chm
# The HHC_LOCATION tag can be used to specify the location (absolute path
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
=====================================
saga-gis/src/accessories/helper/make_saga_release.bat
=====================================
@@ -36,9 +36,9 @@ REM Version
REM For all bug-fix-releases!
REM Don't forget to activate the variable
REM - SWITCH_TO_BRANCH -
-REM SET SWITCH_TO_BRANCH=saga-8.6
-SET SAGA_VER_TEXT=9.0.0
-SET SAGA_VER_NEXT=9.1.0
+SET SWITCH_TO_BRANCH=saga-9.0
+SET SAGA_VER_TEXT=9.0.1
+SET SAGA_VER_NEXT=9.0.2
SET SAGA_VERSION=saga-%SAGA_VER_TEXT%
=====================================
saga-gis/src/saga_core/saga_api/saga_api.h
=====================================
@@ -86,8 +86,8 @@
//---------------------------------------------------------
#define SAGA_MAJOR_VERSION 9
#define SAGA_MINOR_VERSION 0
-#define SAGA_RELEASE_NUMBER 0
-#define SAGA_VERSION SG_T("9.0.0")
+#define SAGA_RELEASE_NUMBER 1
+#define SAGA_VERSION SG_T("9.0.1")
///////////////////////////////////////////////////////////
=====================================
saga-gis/src/saga_core/saga_api/shapes.h
=====================================
@@ -1520,10 +1520,12 @@ public:
static CSG_String from_ShapeType ( TSG_Shape_Type Shape, TSG_Vertex_Type Vertex = SG_VERTEX_TYPE_XY);
static bool to_ShapeType (const CSG_String &Type, TSG_Shape_Type &Shape, TSG_Vertex_Type &Vertex);
static TSG_Shape_Type to_ShapeType (const CSG_String &Type);
+ static TSG_Vertex_Type to_VertexType (const CSG_String &Type);
static bool from_ShapeType (DWORD &Type, TSG_Shape_Type Shape, TSG_Vertex_Type Vertex = SG_VERTEX_TYPE_XY);
static bool to_ShapeType (DWORD Type, TSG_Shape_Type &Shape, TSG_Vertex_Type &Vertex);
static TSG_Shape_Type to_ShapeType (DWORD Type);
+ static TSG_Vertex_Type to_VertexType (DWORD Type);
static CSG_String Type_asWKText (DWORD Type);
static DWORD Type_asWKBinary (const CSG_String &Type);
@@ -1541,16 +1543,15 @@ private:
static bool _WKT_Write_Parts (CSG_String &Text, CSG_Shape *pShape);
static bool _WKT_Write_Polygon (CSG_String &Text, CSG_Shape *pShape);
- static bool _WKB_Read_Point (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape, int iPart);
- static bool _WKB_Read_Points (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape);
- static bool _WKB_Read_Parts (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape);
- static bool _WKB_Read_MultiPoint (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape);
- static bool _WKB_Read_MultiLine (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape);
- static bool _WKB_Read_MultiPolygon (CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape);
+ static bool _WKB_Read_Point (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape, int iPart);
+ static bool _WKB_Read_Points (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape);
+ static bool _WKB_Read_Polygon (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape);
+ static bool _WKB_Read_MultiPoint (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape);
+ static bool _WKB_Read_MultiLine (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape);
+ static bool _WKB_Read_MultiPolygon (CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape);
static bool _WKB_Write_Point (CSG_Bytes &Bytes, CSG_Shape *pShape, int iPoint, int iPart);
static bool _WKB_Write_Points (CSG_Bytes &Bytes, CSG_Shape *pShape, int iPart);
- static bool _WKB_Write_Parts (CSG_Bytes &Bytes, CSG_Shape *pShape);
static bool _WKB_Write_MultiPoint (CSG_Bytes &Bytes, CSG_Shape *pShape);
static bool _WKB_Write_MultiLine (CSG_Bytes &Bytes, CSG_Shape *pShape);
static bool _WKB_Write_MultiPolygon (CSG_Bytes &Bytes, CSG_Shape *pShape);
=====================================
saga-gis/src/saga_core/saga_api/shapes_clipper.cpp
=====================================
@@ -238,7 +238,7 @@ public:
{
Clipper2Lib::EndType EndType;
- if( pShape->Get_Type() == SHAPE_TYPE_Line )
+ if( pShape->Get_Type() != SHAPE_TYPE_Polygon )
{
Delta *= 2.;
=====================================
saga-gis/src/saga_core/saga_api/shapes_ogis.cpp
=====================================
@@ -457,7 +457,7 @@ bool CSG_Shapes_OGIS_Converter::to_WKText(CSG_Shape *pShape, CSG_String &Text)
///////////////////////////////////////////////////////////
//---------------------------------------------------------
-inline bool CSG_Shapes_OGIS_Converter::_WKB_Read_Point(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape, int iPart)
+inline bool CSG_Shapes_OGIS_Converter::_WKB_Read_Point(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape, int iPart)
{
if( !Bytes.is_EOF() )
{
@@ -466,7 +466,7 @@ inline bool CSG_Shapes_OGIS_Converter::_WKB_Read_Point(CSG_Bytes &Bytes, bool bS
pShape->Add_Point(x, y, iPart);
- switch( ((CSG_Shapes *)pShape->Get_Table())->Get_Vertex_Type() )
+ switch( Vertex )
{
default:
break;
@@ -488,13 +488,13 @@ inline bool CSG_Shapes_OGIS_Converter::_WKB_Read_Point(CSG_Bytes &Bytes, bool bS
}
//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Read_Points(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape)
+bool CSG_Shapes_OGIS_Converter::_WKB_Read_Points(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape)
{
DWORD nPoints = Bytes.Read_DWord(bSwapBytes), iPart = pShape->Get_Part_Count();
for(DWORD iPoint=0; iPoint<nPoints; iPoint++)
{
- if( !_WKB_Read_Point(Bytes, bSwapBytes, pShape, iPart) )
+ if( !_WKB_Read_Point(Bytes, bSwapBytes, Vertex, pShape, iPart) )
{
return( false );
}
@@ -504,13 +504,13 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_Points(CSG_Bytes &Bytes, bool bSwapByt
}
//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Read_Parts(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape)
+bool CSG_Shapes_OGIS_Converter::_WKB_Read_Polygon(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape)
{
int nParts = (int)Bytes.Read_DWord(bSwapBytes);
for(int iPart=0; iPart<nParts; iPart++)
{
- if( !_WKB_Read_Points(Bytes, bSwapBytes, pShape) )
+ if( !_WKB_Read_Points(Bytes, bSwapBytes, Vertex, pShape) )
{
return( false );
}
@@ -520,7 +520,7 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_Parts(CSG_Bytes &Bytes, bool bSwapByte
}
//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPoint(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape)
+bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPoint(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape)
{
DWORD nPoints = Bytes.Read_DWord(bSwapBytes), iPart = pShape->Get_Part_Count();
@@ -528,7 +528,9 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPoint(CSG_Bytes &Bytes, bool bSwa
{
bSwapBytes = Bytes.Read_Byte() != SG_OGIS_BYTEORDER_NDR;
- if( Bytes.Read_DWord(bSwapBytes) != SG_OGIS_TYPE_Point || !_WKB_Read_Point(Bytes, bSwapBytes, pShape, iPart) )
+ TSG_Shape_Type Geometry; TSG_Vertex_Type _Vertex; to_ShapeType(Bytes.Read_DWord(bSwapBytes), Geometry, _Vertex);
+
+ if( Geometry != SHAPE_TYPE_Point || Vertex != _Vertex || !_WKB_Read_Point(Bytes, bSwapBytes, Vertex, pShape, iPart) )
{
return( false );
}
@@ -538,7 +540,7 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPoint(CSG_Bytes &Bytes, bool bSwa
}
//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiLine(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape)
+bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiLine(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape)
{
DWORD nLines = Bytes.Read_DWord(bSwapBytes);
@@ -546,7 +548,9 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiLine(CSG_Bytes &Bytes, bool bSwap
{
bSwapBytes = Bytes.Read_Byte() != SG_OGIS_BYTEORDER_NDR;
- if( Bytes.Read_DWord(bSwapBytes) != SG_OGIS_TYPE_LineString || !_WKB_Read_Points(Bytes, bSwapBytes, pShape) )
+ TSG_Shape_Type Geometry; TSG_Vertex_Type _Vertex; to_ShapeType(Bytes.Read_DWord(bSwapBytes), Geometry, _Vertex);
+
+ if( Geometry != SHAPE_TYPE_Line || Vertex != _Vertex || !_WKB_Read_Points(Bytes, bSwapBytes, Vertex, pShape) )
{
return( false );
}
@@ -556,7 +560,7 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiLine(CSG_Bytes &Bytes, bool bSwap
}
//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPolygon(CSG_Bytes &Bytes, bool bSwapBytes, CSG_Shape *pShape)
+bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPolygon(CSG_Bytes &Bytes, bool bSwapBytes, TSG_Vertex_Type Vertex, CSG_Shape *pShape)
{
DWORD nPolygons = Bytes.Read_DWord(bSwapBytes);
@@ -564,7 +568,9 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Read_MultiPolygon(CSG_Bytes &Bytes, bool bS
{
bSwapBytes = Bytes.Read_Byte() != SG_OGIS_BYTEORDER_NDR;
- if( Bytes.Read_DWord(bSwapBytes) != SG_OGIS_TYPE_Polygon || !_WKB_Read_Parts(Bytes, bSwapBytes, pShape) )
+ TSG_Shape_Type Geometry; TSG_Vertex_Type _Vertex; to_ShapeType(Bytes.Read_DWord(bSwapBytes), Geometry, _Vertex);
+
+ if( Geometry != SHAPE_TYPE_Polygon || Vertex != _Vertex || !_WKB_Read_Polygon(Bytes, bSwapBytes, Vertex, pShape) )
{
return( false );
}
@@ -590,35 +596,35 @@ bool CSG_Shapes_OGIS_Converter::from_WKBinary(CSG_Bytes &Bytes, CSG_Shape *pShap
{
switch( Type )
{
- case SG_OGIS_TYPE_Point :
- case SG_OGIS_TYPE_PointZ :
- case SG_OGIS_TYPE_PointM :
- case SG_OGIS_TYPE_PointZM : return( _WKB_Read_Point (Bytes, bSwapBytes, pShape, 0) );
-
- case SG_OGIS_TYPE_MultiPoint :
- case SG_OGIS_TYPE_MultiPointZ :
- case SG_OGIS_TYPE_MultiPointM :
- case SG_OGIS_TYPE_MultiPointZM : return( _WKB_Read_MultiPoint (Bytes, bSwapBytes, pShape ) );
-
- case SG_OGIS_TYPE_LineString :
- case SG_OGIS_TYPE_LineStringZ :
- case SG_OGIS_TYPE_LineStringM :
- case SG_OGIS_TYPE_LineStringZM : return( _WKB_Read_Points (Bytes, bSwapBytes, pShape ) );
-
- case SG_OGIS_TYPE_MultiLineString :
- case SG_OGIS_TYPE_MultiLineStringZ :
- case SG_OGIS_TYPE_MultiLineStringM :
- case SG_OGIS_TYPE_MultiLineStringZM: return( _WKB_Read_MultiLine (Bytes, bSwapBytes, pShape ) );
-
- case SG_OGIS_TYPE_Polygon :
- case SG_OGIS_TYPE_PolygonZ :
- case SG_OGIS_TYPE_PolygonM :
- case SG_OGIS_TYPE_PolygonZM : return( _WKB_Read_Parts (Bytes, bSwapBytes, pShape ) );
-
- case SG_OGIS_TYPE_MultiPolygon :
- case SG_OGIS_TYPE_MultiPolygonZ :
- case SG_OGIS_TYPE_MultiPolygonM :
- case SG_OGIS_TYPE_MultiPolygonZM : return( _WKB_Read_MultiPolygon(Bytes, bSwapBytes, pShape) );
+ case SG_OGIS_TYPE_Point : return( _WKB_Read_Point (Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape, 0) );
+ case SG_OGIS_TYPE_PointZ : return( _WKB_Read_Point (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape, 0) );
+ case SG_OGIS_TYPE_PointM : return( _WKB_Read_Point (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape, 0) );
+ case SG_OGIS_TYPE_PointZM : return( _WKB_Read_Point (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape, 0) );
+
+ case SG_OGIS_TYPE_MultiPoint : return( _WKB_Read_MultiPoint (Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape ) );
+ case SG_OGIS_TYPE_MultiPointZ : return( _WKB_Read_MultiPoint (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiPointM : return( _WKB_Read_MultiPoint (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiPointZM : return( _WKB_Read_MultiPoint (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape ) );
+
+ case SG_OGIS_TYPE_LineString : return( _WKB_Read_Points (Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape ) );
+ case SG_OGIS_TYPE_LineStringZ : return( _WKB_Read_Points (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_LineStringM : return( _WKB_Read_Points (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_LineStringZM : return( _WKB_Read_Points (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape ) );
+
+ case SG_OGIS_TYPE_MultiLineString : return( _WKB_Read_MultiLine (Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape ) );
+ case SG_OGIS_TYPE_MultiLineStringZ : return( _WKB_Read_MultiLine (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiLineStringM : return( _WKB_Read_MultiLine (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiLineStringZM: return( _WKB_Read_MultiLine (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape ) );
+
+ case SG_OGIS_TYPE_Polygon : return( _WKB_Read_Polygon (Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape ) );
+ case SG_OGIS_TYPE_PolygonZ : return( _WKB_Read_Polygon (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_PolygonM : return( _WKB_Read_Polygon (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_PolygonZM : return( _WKB_Read_Polygon (Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape ) );
+
+ case SG_OGIS_TYPE_MultiPolygon : return( _WKB_Read_MultiPolygon(Bytes, bSwapBytes, SG_VERTEX_TYPE_XY , pShape ) );
+ case SG_OGIS_TYPE_MultiPolygonZ : return( _WKB_Read_MultiPolygon(Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiPolygonM : return( _WKB_Read_MultiPolygon(Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZ , pShape ) );
+ case SG_OGIS_TYPE_MultiPolygonZM : return( _WKB_Read_MultiPolygon(Bytes, bSwapBytes, SG_VERTEX_TYPE_XYZM, pShape ) );
}
}
}
@@ -660,7 +666,7 @@ inline bool CSG_Shapes_OGIS_Converter::_WKB_Write_Point(CSG_Bytes &Bytes, CSG_Sh
//---------------------------------------------------------
bool CSG_Shapes_OGIS_Converter::_WKB_Write_Points(CSG_Bytes &Bytes, CSG_Shape *pShape, int iPart)
{
- bool bFirstTwice = pShape->Get_Type() == SHAPE_TYPE_Polygon && CSG_Point(pShape->Get_Point(0, iPart)) != pShape->Get_Point(pShape->Get_Point_Count(iPart) -1, iPart);
+ bool bFirstTwice = pShape->Get_Type() == SHAPE_TYPE_Polygon && CSG_Point(pShape->Get_Point(0, iPart)) != pShape->Get_Point(0, iPart, false);
Bytes += (DWORD)(pShape->Get_Point_Count(iPart) + (bFirstTwice ? 1 : 0));
@@ -677,22 +683,6 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_Points(CSG_Bytes &Bytes, CSG_Shape *p
return( true );
}
-//---------------------------------------------------------
-bool CSG_Shapes_OGIS_Converter::_WKB_Write_Parts(CSG_Bytes &Bytes, CSG_Shape *pShape)
-{
- Bytes += (DWORD)pShape->Get_Part_Count();
-
- for(int iPart=0; iPart<pShape->Get_Part_Count(); iPart++)
- {
- if( !_WKB_Write_Points(Bytes, pShape, iPart) )
- {
- return( false );
- }
- }
-
- return( true );
-}
-
//---------------------------------------------------------
bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPoint(CSG_Bytes &Bytes, CSG_Shape *pShape)
{
@@ -703,7 +693,13 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPoint(CSG_Bytes &Bytes, CSG_Shap
for(int iPoint=0; iPoint<pShape->Get_Point_Count(iPart); iPoint++)
{
Bytes += (BYTE)SG_OGIS_BYTEORDER_NDR;
- Bytes += (DWORD)SG_OGIS_TYPE_Point;
+
+ switch( pShape->Get_Vertex_Type() )
+ {
+ case SG_VERTEX_TYPE_XY : Bytes += (DWORD)SG_OGIS_TYPE_Point ; break;
+ case SG_VERTEX_TYPE_XYZ : Bytes += (DWORD)SG_OGIS_TYPE_PointZ ; break;
+ case SG_VERTEX_TYPE_XYZM: Bytes += (DWORD)SG_OGIS_TYPE_PointZM; break;
+ }
if( !_WKB_Write_Point(Bytes, pShape, iPoint, iPart) )
{
@@ -723,7 +719,13 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiLine(CSG_Bytes &Bytes, CSG_Shape
for(int iPart=0; iPart<pShape->Get_Part_Count(); iPart++)
{
Bytes += (BYTE)SG_OGIS_BYTEORDER_NDR;
- Bytes += (DWORD)SG_OGIS_TYPE_LineString;
+
+ switch( pShape->Get_Vertex_Type() )
+ {
+ case SG_VERTEX_TYPE_XY : Bytes += (DWORD)SG_OGIS_TYPE_LineString ; break;
+ case SG_VERTEX_TYPE_XYZ : Bytes += (DWORD)SG_OGIS_TYPE_LineStringZ ; break;
+ case SG_VERTEX_TYPE_XYZM: Bytes += (DWORD)SG_OGIS_TYPE_LineStringZM; break;
+ }
if( !_WKB_Write_Points(Bytes, pShape, iPart) )
{
@@ -737,9 +739,7 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiLine(CSG_Bytes &Bytes, CSG_Shape
//---------------------------------------------------------
bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPolygon(CSG_Bytes &Bytes, CSG_Shape *pShape)
{
- int nPolygons = 0;
- int *nRings = new int[pShape->Get_Part_Count()];
- int *iPolygon = new int[pShape->Get_Part_Count()];
+ int nPolygons = 0; CSG_Array_Int nRings(pShape->Get_Part_Count()), iPolygon(pShape->Get_Part_Count());
for(int iPart=0; iPart<pShape->Get_Part_Count(); iPart++)
{
@@ -769,7 +769,14 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPolygon(CSG_Bytes &Bytes, CSG_Sh
if( nRings[iPart] > 0 )
{
Bytes += (BYTE)SG_OGIS_BYTEORDER_NDR;
- Bytes += (DWORD)SG_OGIS_TYPE_Polygon;
+
+ switch( pShape->Get_Vertex_Type() )
+ {
+ case SG_VERTEX_TYPE_XY : Bytes += (DWORD)SG_OGIS_TYPE_Polygon ; break;
+ case SG_VERTEX_TYPE_XYZ : Bytes += (DWORD)SG_OGIS_TYPE_PolygonZ ; break;
+ case SG_VERTEX_TYPE_XYZM: Bytes += (DWORD)SG_OGIS_TYPE_PolygonZM; break;
+ }
+
Bytes += (DWORD)nRings[iPart];
for(int jPart=0; jPart<pShape->Get_Part_Count(); jPart++)
@@ -778,8 +785,6 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPolygon(CSG_Bytes &Bytes, CSG_Sh
{
if( !_WKB_Write_Points(Bytes, pShape, jPart) )
{
- delete[](nRings); delete[](iPolygon);
-
return( false );
}
}
@@ -787,8 +792,6 @@ bool CSG_Shapes_OGIS_Converter::_WKB_Write_MultiPolygon(CSG_Bytes &Bytes, CSG_Sh
}
}
- delete[](nRings); delete[](iPolygon);
-
return( nPolygons > 0 );
}
@@ -999,21 +1002,33 @@ bool CSG_Shapes_OGIS_Converter::to_ShapeType(DWORD Type, TSG_Shape_Type &Shape,
//---------------------------------------------------------
TSG_Shape_Type CSG_Shapes_OGIS_Converter::to_ShapeType(const CSG_String &Type)
{
- TSG_Shape_Type Shape; TSG_Vertex_Type Vertex;
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; to_ShapeType(Type, Geometry, Vertex);
- to_ShapeType(Type, Shape, Vertex);
-
- return( Shape );
+ return( Geometry );
}
//---------------------------------------------------------
TSG_Shape_Type CSG_Shapes_OGIS_Converter::to_ShapeType(DWORD Type)
{
- TSG_Shape_Type Shape; TSG_Vertex_Type Vertex;
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; to_ShapeType(Type, Geometry, Vertex);
+
+ return( Geometry );
+}
+
+//---------------------------------------------------------
+TSG_Vertex_Type CSG_Shapes_OGIS_Converter::to_VertexType(const CSG_String &Type)
+{
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; to_ShapeType(Type, Geometry, Vertex);
+
+ return( Vertex );
+}
- to_ShapeType(Type, Shape, Vertex);
+//---------------------------------------------------------
+TSG_Vertex_Type CSG_Shapes_OGIS_Converter::to_VertexType(DWORD Type)
+{
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; to_ShapeType(Type, Geometry, Vertex);
- return( Shape );
+ return( Vertex );
}
=====================================
saga-gis/src/saga_core/saga_cmd/man/saga_cmd.1
=====================================
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "SAGA_CMD 1"
-.TH SAGA_CMD 1 "2021-07-07" "9.0.0" " "
+.TH SAGA_CMD 1 "2021-07-07" "9.0.1" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
=====================================
saga-gis/src/saga_core/saga_cmd/tool.cpp
=====================================
@@ -530,7 +530,9 @@ bool CCMD_Tool::_Get_Options(CSG_Parameters *pParameters, bool bInitialize)
else if( pParameter->is_Output() )
{
- if( pParameter->is_DataObject() && pParameter->is_Optional() && !pParameter->asDataObject() && _Found(ID) )
+ CSG_String FileName; // only create optional output if a valid output file name is given!
+
+ if( pParameter->is_DataObject() && pParameter->is_Optional() && !pParameter->asDataObject() && _Found(ID, FileName) && FileName.Length() > 0 )
{
pParameter->Set_Value(DATAOBJECT_CREATE);
}
=====================================
saga-gis/src/saga_core/saga_gui/man/saga_gui.1
=====================================
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "SAGA_GUI 1"
-.TH SAGA_GUI 1 "2021-07-07" "9.0.0" " "
+.TH SAGA_GUI 1 "2021-07-07" "9.0.1" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
=====================================
saga-gis/src/saga_core/saga_gui/wksp_table.cpp
=====================================
@@ -97,43 +97,43 @@ CWKSP_Table::~CWKSP_Table(void)
//---------------------------------------------------------
wxString CWKSP_Table::Get_Description(void)
{
- wxString s;
+ wxString s;
//-----------------------------------------------------
- s += wxString::Format("<h4>%s</h4>", _TL("Table"));
+ s += wxString::Format("<h4>%s</h4>", _TL("Table"));
- s += "<table border=\"0\">";
+ s += "<table border=\"0\">";
- DESC_ADD_STR(_TL("Name" ), m_pObject->Get_Name());
- DESC_ADD_STR(_TL("Description" ), m_pObject->Get_Description());
+ DESC_ADD_STR(_TL("Name" ), m_pObject->Get_Name());
+ DESC_ADD_STR(_TL("Description" ), m_pObject->Get_Description());
if( SG_File_Exists(m_pObject->Get_File_Name(false)) )
{
- DESC_ADD_STR(_TL("Data Source" ), SG_File_Get_Path(m_pObject->Get_File_Name(false) ).c_str());
- DESC_ADD_STR(_TL("File" ), SG_File_Get_Name(m_pObject->Get_File_Name(false), true).c_str());
+ DESC_ADD_STR(_TL("Data Source" ), SG_File_Get_Path(m_pObject->Get_File_Name(false) ).c_str());
+ DESC_ADD_STR(_TL("File" ), SG_File_Get_Name(m_pObject->Get_File_Name(false), true).c_str());
}
else if( m_pObject->Get_MetaData_DB().Get_Children_Count() )
{
- DESC_ADD_STR(_TL("Data Source" ), m_pObject->Get_File_Name(false));
+ DESC_ADD_STR(_TL("Data Source" ), m_pObject->Get_File_Name(false));
}
else
{
- DESC_ADD_STR(_TL("Data Source" ), _TL("memory"));
+ DESC_ADD_STR(_TL("Data Source" ), _TL("memory"));
}
- DESC_ADD_STR (_TL("Modified" ), m_pObject->is_Modified() ? _TL("yes") : _TL("no"));
- DESC_ADD_INT (_TL("Number of Records"), Get_Table()->Get_Count());
- DESC_ADD_SIZET(_TL("Selected" ), Get_Table()->Get_Selection_Count());
- DESC_ADD_STR (_TL("File Encoding" ), Get_Table()->Get_File_Encoding() ? SG_T("UTF-8") : SG_T("ANSI"));
+ DESC_ADD_STR (_TL("Modified" ), m_pObject->is_Modified() ? _TL("yes") : _TL("no"));
+ DESC_ADD_LONG(_TL("Number of Records"), Get_Table()->Get_Count());
+ DESC_ADD_LONG(_TL("Selected" ), Get_Table()->Get_Selection_Count());
+ DESC_ADD_STR (_TL("File Encoding" ), Get_Table()->Get_File_Encoding() ? SG_T("UTF-8") : SG_T("ANSI"));
- s += "</table>";
+ s += "</table>";
- s += Get_TableInfo_asHTML(Get_Table());
+ s += Get_TableInfo_asHTML(Get_Table());
//-----------------------------------------------------
-// s += wxString::Format(wxT("<hr><b>%s</b><font size=\"-1\">"), _TL("Data History"));
-// s += m_pTable->Get_History().Get_HTML();
-// s += wxString::Format(wxT("</font"));
+// s += wxString::Format(wxT("<hr><b>%s</b><font size=\"-1\">"), _TL("Data History"));
+// s += m_pTable->Get_History().Get_HTML();
+// s += wxString::Format(wxT("</font"));
//-----------------------------------------------------
return( s );
=====================================
saga-gis/src/tools/db/db_pgsql/db_pgsql.cpp
=====================================
@@ -1364,6 +1364,19 @@ void * CSG_PG_Connection::_Shapes_Load(const CSG_String &Select, const CSG_Strin
return( pResult );
}
+//---------------------------------------------------------
+inline bool CSG_PG_Connection::_Shape_Get_Type(const char *WKBytes, bool bBinary, TSG_Shape_Type &Geometry, TSG_Vertex_Type &Vertex)
+{
+ if( bBinary )
+ {
+ CSG_Bytes Binary; Binary.fromHexString(WKBytes + 2);
+
+ return( CSG_Shapes_OGIS_Converter::to_ShapeType(Binary.asDWord(1, false), Geometry, Vertex) );
+ }
+
+ return( CSG_Shapes_OGIS_Converter::to_ShapeType(CSG_String(WKBytes).BeforeFirst('('), Geometry, Vertex) );
+}
+
//---------------------------------------------------------
inline TSG_Shape_Type CSG_PG_Connection::_Shape_Get_Type(const char *WKBytes, bool bBinary)
{
@@ -1458,16 +1471,16 @@ bool CSG_PG_Connection::Shapes_Load(CSG_Shapes *pShapes, const CSG_String &Name,
//-----------------------------------------------------
for(int iRecord=0; iRecord<nRecords && SG_UI_Process_Set_Progress(iRecord, nRecords); iRecord++)
{
- TSG_Shape_Type Type = _Shape_Get_Type(PQgetvalue(pResult, iRecord, geoField), bBinary);
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; _Shape_Get_Type(PQgetvalue(pResult, iRecord, geoField), bBinary, Geometry, Vertex);
- if( Type == SHAPE_TYPE_Undefined || (Type != pShapes->Get_Type() && pShapes->Get_Type() != SHAPE_TYPE_Undefined) )
+ if( Geometry == SHAPE_TYPE_Undefined || (Geometry != pShapes->Get_Type() && pShapes->Get_Type() != SHAPE_TYPE_Undefined) )
{
continue;
}
if( pShapes->Get_Type() == SHAPE_TYPE_Undefined )
{
- pShapes->Create(Type, Name); pShapes->Get_Projection().Create(SRID);
+ pShapes->Create(Geometry, Name, NULL, Vertex); pShapes->Get_Projection().Create(SRID);
for(int iField=0; iField<nFields; iField++)
{
@@ -1533,21 +1546,21 @@ int CSG_PG_Connection::Shapes_Load(CSG_Shapes *pShapes[4], const CSG_String &Nam
//-----------------------------------------------------
for(int iRecord=0; iRecord<nRecords && SG_UI_Process_Set_Progress(iRecord, nRecords); iRecord++)
{
- TSG_Shape_Type Type = _Shape_Get_Type(PQgetvalue(pResult, iRecord, geoField), bBinary);
+ TSG_Shape_Type Geometry; TSG_Vertex_Type Vertex; _Shape_Get_Type(PQgetvalue(pResult, iRecord, geoField), bBinary, Geometry, Vertex);
- if( Type == SHAPE_TYPE_Undefined )
+ if( Geometry == SHAPE_TYPE_Undefined )
{
continue;
}
- int i = Type == SHAPE_TYPE_Point ? 0
- : Type == SHAPE_TYPE_Points ? 1
- : Type == SHAPE_TYPE_Line ? 2
- : Type == SHAPE_TYPE_Polygon ? 3 : -1;
+ int i = Geometry == SHAPE_TYPE_Point ? 0
+ : Geometry == SHAPE_TYPE_Points ? 1
+ : Geometry == SHAPE_TYPE_Line ? 2
+ : Geometry == SHAPE_TYPE_Polygon ? 3 : -1;
if( pShapes[i] == NULL )
{
- pShapes[i] = SG_Create_Shapes(Type, Name); pShapes[i]->Get_Projection().Create(SRID);
+ pShapes[i] = SG_Create_Shapes(Geometry, Name, NULL, Vertex); pShapes[i]->Get_Projection().Create(SRID);
for(int iField=0; iField<nFields; iField++)
{
@@ -1712,16 +1725,18 @@ bool CSG_PG_Connection::Shapes_Insert(CSG_Shapes *pShapes, const CSG_String &_ge
}
//-------------------------------------------------
+ CSG_Bytes WKB; CSG_String WKT;
+
if( bBinary )
{
- CSG_Bytes WKB; CSG_Shapes_OGIS_Converter::to_WKBinary(pShape, WKB);
+ CSG_Shapes_OGIS_Converter::to_WKBinary(pShape, WKB);
paramValues [nFields] = (char *)WKB.Get_Bytes();
paramLengths[nFields] = WKB.Get_Count();
}
else
{
- CSG_String WKT; CSG_Shapes_OGIS_Converter::to_WKText (pShape, WKT);
+ CSG_Shapes_OGIS_Converter::to_WKText (pShape, WKT);
Values[nFields].Set_Data(WKT.b_str(), WKT.Length() + 1); WKT.Clear();
paramValues[nFields] = Values[nFields].Get_Data();
=====================================
saga-gis/src/tools/db/db_pgsql/db_pgsql.h
=====================================
@@ -167,6 +167,7 @@ private:
bool _Shapes_Load (const CSG_String &geoTable, CSG_String &Fields);
bool _Shapes_Load (const CSG_String &geoTable, const CSG_String &Tables, const CSG_String &Fields, const CSG_String &Where, const CSG_String &Geometry, bool bBinary, int &SRID, CSG_String &Select);
void * _Shapes_Load (const CSG_String &Select, const CSG_String &geoFieldName, int &nFields, int &nRecords, int &geoField);
+ bool _Shape_Get_Type (const char *WKBytes, bool bBinary, TSG_Shape_Type &Geometry, TSG_Vertex_Type &Vertex);
TSG_Shape_Type _Shape_Get_Type (const char *WKBytes, bool bBinary);
bool _Shape_Load_Record (void *_pResult, int iRecord, int geoField, bool bBinary, CSG_Shapes *pShapes);
=====================================
saga-gis/src/tools/develop/dev_tools/qgistoolbox.cpp
=====================================
@@ -231,14 +231,13 @@ bool CQGIS_ToolBox::On_Execute(void)
{
Stream.Write(
"Replace the SAGA binaries in:\n"
- "> C:\\Program Files\\QGIS X.Y\\apps\\saga(-ltr)\n"
+ "> C:\\Program Files\\QGIS X.Y\\apps\\saga\n"
"\n"
- "Adjust the interface in:\n"
- "> C:\\Program Files\\QGIS X.Y\\apps\\qgis(-ltr)\\python\\plugins\\processing\\algs\\saga(-ltr)\n"
+ "Replace the tools interface ('description\\' and 'SagaNameDecorator.py' in:\n"
+ "> C:\\Program Files\\QGIS X.Y\\apps\\qgis(-ltr)\\python\\plugins\\processing\\sagaprovider\n"
"\n"
- "Adjust version in file:\n"
- "> SagaAlgorithmProvider.py\n"
- ">> REQUIRED_VERSION = '7.7.'\n"
+ "Adjust version in file 'SagaAlgorithmProvider.py', e.g.:\n"
+ "> BETA_SUPPORT_VERSION = '9.'\n"
);
}
}
@@ -383,12 +382,8 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("RasterDestination");
-
- if( pParameter->is_Optional() )
- {
- PARAMETER_STR("None");
- PARAMETER_BOL(true);
- }
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
@@ -403,12 +398,8 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("RasterDestination");
-
- if( pParameter->is_Optional() )
- {
- PARAMETER_STR("None");
- PARAMETER_BOL(true);
- }
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
@@ -427,7 +418,9 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("VectorDestination");
- // PARAMETER_BOL(pParameter->is_Optional()); // 'optional' seems not to be supported for 'VectorDestination' by QGIS !!!
+ PARAMETER_INT(5);
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
@@ -442,7 +435,9 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("VectorDestination");
- // PARAMETER_BOL(pParameter->is_Optional()); // 'optional' seems not to be supported for 'VectorDestination' by QGIS !!!
+ PARAMETER_INT(Get_Shape_Type(((CSG_Parameter_Shapes *)pParameter)->Get_Shape_Type()));
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
@@ -457,7 +452,9 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("VectorDestination");
- // PARAMETER_BOL(pParameter->is_Optional()); // 'optional' seems not to be supported for 'VectorDestination' by QGIS !!!
+ PARAMETER_INT(Get_Shape_Type(((CSG_Parameter_Shapes *)pParameter)->Get_Shape_Type()));
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
@@ -472,13 +469,42 @@ bool CQGIS_ToolBox::Get_Parameter(CSG_Parameter *pParameter, CSG_String &Paramet
else
{
PARAMETER_SET("VectorDestination");
- // PARAMETER_BOL(pParameter->is_Optional()); // 'optional' seems not to be supported for 'VectorDestination' by QGIS !!!
+ PARAMETER_INT(Get_Shape_Type(((CSG_Parameter_Shapes *)pParameter)->Get_Shape_Type()));
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
}
break;
case PARAMETER_TYPE_PointCloud :
+ if( pParameter->is_Input() )
+ {
+ PARAMETER_SET("PointCloudLayer");
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
+ }
+ else
+ {
+ PARAMETER_SET("PointCloudDestination");
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
+ }
+ break;
+
case PARAMETER_TYPE_PointCloud_List:
- return( false );
+ if( pParameter->is_Input() )
+ {
+ PARAMETER_SET("MultipleLayers");
+ PARAMETER_INT(8);
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
+ }
+ else
+ {
+ PARAMETER_SET("PointCloudDestination");
+ PARAMETER_STR("None");
+ PARAMETER_BOL(pParameter->is_Optional());
+ }
+ break;
case PARAMETER_TYPE_TIN :
case PARAMETER_TYPE_TIN_List :
=====================================
saga-gis/src/tools/grid/grid_analysis/soil_water_capacity.cpp
=====================================
@@ -56,7 +56,7 @@
///////////////////////////////////////////////////////////
//---------------------------------------------------------
-double CSoil_Water_Capacity::s_Coefficients[4][12] = { // pedotransfer coefficients developed by Hodnett and Tomasella (2002)
+double s_Coefficients[4][12] = { // pedotransfer coefficients developed by Hodnett and Tomasella (2002)
{ -2.294, 0. , -3.526, 0. , 2.44 , 0. , -0.076, -11.331, 0.019, 0. , 0. , 0. }, // ln(alpha)
{ 62.986, 0. , 0. , -0.833, -0.529, 0. , 0. , 0.593, 0. , 0.007 , -0.014, 0. }, // ln(n)
{ 81.799, 0. , 0. , 0.099, 0. , -31.42 , 0.018, 0.451, 0. , 0 , 0. , -5.e-04 }, // theta_s
@@ -263,29 +263,27 @@ bool CSoil_Water_Capacity::On_Execute(void)
//---------------------------------------------------------
bool CSoil_Water_Capacity::Get_HodnettTomasella(void)
{
- double Scale = Parameters("UNIT")->asInt() == 1 ? 100. : 1.;
+ double Scale = Parameters("UNIT")->asInt() == 1 ? 100. : 1.;
- double psi_FC = Parameters("PSI_FC" )->asDouble() / 10.; // [hPa] -> [kPa]
- double psi_PWP = Parameters("PSI_PWP")->asDouble() / 10.; // [hPa] -> [kPa]
+ double psi_FC = Parameters("PSI_FC" )->asDouble() / 10.; // [hPa] -> [kPa]
+ double psi_PWP = Parameters("PSI_PWP")->asDouble() / 10.; // [hPa] -> [kPa]
- bool bAdjust = Parameters("ADJUST")->asBool();
+ bool bAdjust = Parameters("ADJUST")->asBool();
- //-----------------------------------------------------
m_Coefficients.Create(12, 4);
- switch( Parameters("FUNCTION")->asInt() )
+ if( Parameters("USERDEF")->asBool() == false )
{
- default: {
for(int j=0; j<12; j++)
{
for(int i=0; i<4; i++)
{
- m_Coefficients[i][j] = s_Coefficients[i][j];
+ m_Coefficients[i][j] = s_Coefficients[i][j];
}
}
- break; }
-
- case 1: {
+ }
+ else
+ {
CSG_Table &a = *Parameters("COEFFICIENTS")->asTable();
if( a.Get_Count() != 12 )
@@ -299,10 +297,9 @@ bool CSoil_Water_Capacity::Get_HodnettTomasella(void)
{
for(int i=0; i<4; i++)
{
- m_Coefficients[i][j] = a[j][i];
+ m_Coefficients[i][j] = a[j][i];
}
}
- break; }
}
//-----------------------------------------------------
@@ -334,9 +331,9 @@ bool CSoil_Water_Capacity::Get_HodnettTomasella(void)
#undef CREATE_LAYERS
//-------------------------------------------------
- for(sLong z=0; z<Layers.Get_Count() && Process_Get_Okay(); z++)
+ for(int z=0; z<(int)Layers.Get_Count() && Process_Get_Okay(); z++)
{
- Process_Set_Text("%s [%lld/%lld]", _TL("processing"), z + 1, Layers.Get_Count());
+ Process_Set_Text("%s [%d/%d]", _TL("processing"), z + 1, (int)Layers.Get_Count());
for(int y=0; y<Get_NY() && Set_Progress_Rows(y); y++)
{
@@ -362,16 +359,16 @@ bool CSoil_Water_Capacity::Get_HodnettTomasella(void)
}
//-------------------------------------
- double Sand = pSand->asDouble(x, y, z);
- double Silt = pSilt->asDouble(x, y, z);
- double Clay = pClay->asDouble(x, y, z);
- double Bulk = pBulk->asDouble(x, y, z);
- double Corg = pCorg->asDouble(x, y, z);
- double CEC = pCEC ->asDouble(x, y, z);
- double pH = ppH ->asDouble(x, y, z);
+ double Sand = pSand->asDouble(x, y, z);
+ double Silt = pSilt->asDouble(x, y, z);
+ double Clay = pClay->asDouble(x, y, z);
+ double Bulk = pBulk->asDouble(x, y, z);
+ double Corg = pCorg->asDouble(x, y, z);
+ double CEC = pCEC ->asDouble(x, y, z);
+ double pH = ppH ->asDouble(x, y, z);
//-------------------------------------
- double alpha, n, theta_s, theta_r;
+ double alpha, n, theta_s, theta_r;
if( !Get_HodnettTomasella(alpha, n, theta_s, theta_r, Sand, Silt, Clay, Bulk, Corg, CEC, pH, bAdjust) )
{
@@ -428,16 +425,16 @@ bool CSoil_Water_Capacity::Get_HodnettTomasella(void)
}
//-----------------------------------------
- double Sand = pSand ? pSand->asDouble(x, y) : cSand;
- double Silt = pSilt ? pSilt->asDouble(x, y) : cSilt;
- double Clay = pClay ? pClay->asDouble(x, y) : cClay;
- double Bulk = pBulk ? pBulk->asDouble(x, y) : cBulk;
- double Corg = pCorg ? pCorg->asDouble(x, y) : cCorg;
- double CEC = pCEC ? pCEC ->asDouble(x, y) : cCEC ;
- double pH = ppH ? ppH ->asDouble(x, y) : cpH ;
+ double Sand = pSand ? pSand->asDouble(x, y) : cSand;
+ double Silt = pSilt ? pSilt->asDouble(x, y) : cSilt;
+ double Clay = pClay ? pClay->asDouble(x, y) : cClay;
+ double Bulk = pBulk ? pBulk->asDouble(x, y) : cBulk;
+ double Corg = pCorg ? pCorg->asDouble(x, y) : cCorg;
+ double CEC = pCEC ? pCEC ->asDouble(x, y) : cCEC ;
+ double pH = ppH ? ppH ->asDouble(x, y) : cpH ;
//-----------------------------------------
- double alpha, n, theta_s, theta_r;
+ double alpha, n, theta_s, theta_r;
if( !Get_HodnettTomasella(alpha, n, theta_s, theta_r, Sand, Silt, Clay, Bulk, Corg, CEC, pH, bAdjust) )
{
@@ -523,12 +520,12 @@ inline bool CSoil_Water_Capacity::Get_HodnettTomasella(double &alpha, double &n,
//---------------------------------------------------------
bool CSoil_Water_Capacity::Get_Toth(void)
{
- double Scale = Parameters("UNIT")->asInt() == 1 ? 100. : 1.;
+ double Scale = Parameters("UNIT")->asInt() == 1 ? 100. : 1.;
//-----------------------------------------------------
if( m_bGrids )
{
- CSG_Table Layers;
+ CSG_Table Layers;
#define CHECK_LAYERS(pGrids) if( pGrids && pGrids->Get_NZ() && (!Layers.Get_Count() || Layers.Get_Count() > pGrids->Get_NZ()) ) { Layers.Create(pGrids->Get_Attributes()); }
CSG_Grids *pSilt = Parameters("SILT" )->asGrids(); CHECK_LAYERS(pSilt);
@@ -549,9 +546,9 @@ bool CSoil_Water_Capacity::Get_Toth(void)
#undef CREATE_LAYERS
//-------------------------------------------------
- for(sLong z=0; z<Layers.Get_Count() && Process_Get_Okay(); z++)
+ for(int z=0; z<(int)Layers.Get_Count() && Process_Get_Okay(); z++)
{
- Process_Set_Text("%s [%lld/%lld]", _TL("processing"), z + 1, Layers.Get_Count());
+ Process_Set_Text("%s [%d/%d]", _TL("processing"), z + 1, (int)Layers.Get_Count());
for(int y=0; y<Get_NY() && Set_Progress_Rows(y); y++)
{
@@ -571,11 +568,11 @@ bool CSoil_Water_Capacity::Get_Toth(void)
SET_NODATA(x, y, z);
}
- double Silt = pSilt->asDouble(x, y, z);
- double Clay = pClay->asDouble(x, y, z);
- double Corg = pCorg->asDouble(x, y, z);
+ double Silt = pSilt->asDouble(x, y, z);
+ double Clay = pClay->asDouble(x, y, z);
+ double Corg = pCorg->asDouble(x, y, z);
- double FC, PWP;
+ double FC, PWP;
if( !Get_Toth(FC, PWP, Silt, Clay, Corg) )
{
@@ -621,11 +618,11 @@ bool CSoil_Water_Capacity::Get_Toth(void)
}
//-----------------------------------------
- double Silt = pSilt ? pSilt->asDouble(x, y) : cSilt;
- double Clay = pClay ? pClay->asDouble(x, y) : cClay;
- double Corg = pCorg ? pCorg->asDouble(x, y) : cCorg;
+ double Silt = pSilt ? pSilt->asDouble(x, y) : cSilt;
+ double Clay = pClay ? pClay->asDouble(x, y) : cClay;
+ double Corg = pCorg ? pCorg->asDouble(x, y) : cCorg;
- double FC, PWP;
+ double FC, PWP;
if( !Get_Toth(FC, PWP, Silt, Clay, Corg) )
{
=====================================
saga-gis/src/tools/grid/grid_analysis/soil_water_capacity.h
=====================================
@@ -86,8 +86,6 @@ private:
bool m_bGrids;
- static double s_Coefficients[4][12];
-
CSG_Matrix m_Coefficients;
=====================================
saga-gis/src/tools/pointcloud/pointcloud_tools/pc_cluster_analysis.cpp
=====================================
@@ -707,39 +707,41 @@ bool CPC_Cluster_Analysis::On_After_Execution(void)
pPC_out = Parameters("PC_IN")->asPointCloud();
}
- CSG_Parameters Parms;
-
- if( DataObject_Get_Parameters(pPC_out, Parms) && Parms("COLORS_TYPE") && Parms("LUT") && Parms("LUT_ATTRIB") )
+ if( m_Features && m_nFeatures > 0 )
{
- CSG_Table_Record *pClass;
- CSG_Table *pLUT = Parms("LUT")->asTable();
+ CSG_Parameters Parms;
- for( int i=0; i<=pPC_out->Get_Maximum(pPC_out->Get_Field_Count()-1); i++ )
+ if( DataObject_Get_Parameters(pPC_out, Parms) && Parms("COLORS_TYPE") && Parms("LUT") && Parms("LUT_ATTRIB") )
{
- if( (pClass = pLUT->Get_Record(i)) == NULL )
+ CSG_Table_Record *pClass;
+ CSG_Table *pLUT = Parms("LUT")->asTable();
+
+ for( int i=0; i<=pPC_out->Get_Maximum(pPC_out->Get_Field_Count()-1); i++ )
{
- pClass = pLUT->Add_Record();
- pClass->Set_Value(0, SG_GET_RGB(rand() * 255.0 / RAND_MAX, rand() * 255.0 / RAND_MAX, rand() * 255.0 / RAND_MAX));
- }
+ if( (pClass = pLUT->Get_Record(i)) == NULL )
+ {
+ pClass = pLUT->Add_Record();
+ pClass->Set_Value(0, SG_GET_RGB(rand() * 255.0 / RAND_MAX, rand() * 255.0 / RAND_MAX, rand() * 255.0 / RAND_MAX));
+ }
- pClass->Set_Value(1, CSG_String::Format("%s %d", _TL("Class"), i));
- pClass->Set_Value(2, CSG_String::Format("%s %d", _TL("Class"), i));
- pClass->Set_Value(3, i);
- pClass->Set_Value(4, i);
- }
+ pClass->Set_Value(1, CSG_String::Format("%s %d", _TL("Class"), i));
+ pClass->Set_Value(2, CSG_String::Format("%s %d", _TL("Class"), i));
+ pClass->Set_Value(3, i);
+ pClass->Set_Value(4, i);
+ }
- while( pLUT->Get_Count() > (pPC_out->Get_Maximum(pPC_out->Get_Field_Count()-1) + 1) )
- {
- pLUT->Del_Record(pLUT->Get_Count() - 1);
- }
+ while( pLUT->Get_Count() > (pPC_out->Get_Maximum(pPC_out->Get_Field_Count()-1) + 1) )
+ {
+ pLUT->Del_Record(pLUT->Get_Count() - 1);
+ }
- Parms("COLORS_TYPE") ->Set_Value(1); // Color Classification Type: Lookup Table
- Parms("LUT_ATTRIB") ->Set_Value(clustField);
+ Parms("COLORS_TYPE") ->Set_Value(1); // Color Classification Type: Lookup Table
+ Parms("LUT_ATTRIB") ->Set_Value(clustField);
- DataObject_Set_Parameters(pPC_out, Parms);
+ DataObject_Set_Parameters(pPC_out, Parms);
+ }
}
-
if (pPC_out == Parameters("PC_IN")->asPointCloud())
{
Parameters("PC_OUT")->Set_Value(DATAOBJECT_NOTSET);
=====================================
saga-gis/version.cmake
=====================================
@@ -1,7 +1,7 @@
# The version number.
set (SAGA_VERSION_MAJOR 9)
set (SAGA_VERSION_MINOR 0)
-set (SAGA_VERSION_PATCH 0)
+set (SAGA_VERSION_PATCH 1)
# get git commit hash (or dirty if git is not installed)
=====================================
saga_setup_win32.iss
=====================================
@@ -1,5 +1,5 @@
-; To build installer (for example, saga-9.0.0_setup.exe).
-; - Unzip the SAGA binary files in their own folder (for example, saga-9.0.0.zip).
+; To build installer (for example, saga-9.0.1_setup.exe).
+; - Unzip the SAGA binary files in their own folder (for example, saga-9.0.1.zip).
; - Place saga.iss and saga_readme.rtf in the SAGA folder (contains saga_gui.exe, etc.).
; - Open saga.iss in Inno Setup.
; - Choose Build | Compile.
@@ -7,7 +7,7 @@
[Setup]
AppName=SAGA - System for Automated Geoscientific Analyses
-AppVerName=SAGA 9.0.0
+AppVerName=SAGA 9.0.1
DefaultDirName={commonpf}\SAGA
DefaultGroupName=SAGA
@@ -19,9 +19,9 @@ Compression=lzma
SolidCompression=yes
OutputDir=.
-OutputBaseFilename=saga-9.0.0_win32_setup
+OutputBaseFilename=saga-9.0.1_win32_setup
-VersionInfoVersion=9.0.0.0
+VersionInfoVersion=9.0.1.0
VersionInfoCompany=SAGA User Group Association
VersionInfoCopyright=(c) 2005-2018 by O. Conrad
VersionInfoDescription=SAGA single-file installer
@@ -47,5 +47,5 @@ Name: "{commondesktop}\SAGA"; Filename: "{app}\saga_gui.exe"; WorkingDir: "{app}
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\saga_gui.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\saga_gui.exe"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\saga_gui.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
-Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.0"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey
-Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.0"; ValueType: string; ValueName: "Version"; ValueData: "9.0.0.0"
+Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.1"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey
+Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.1"; ValueType: string; ValueName: "Version"; ValueData: "9.0.1.0"
=====================================
saga_setup_x64.iss
=====================================
@@ -1,5 +1,5 @@
-; To build installer (for example, saga-9.0.0_setup.exe).
-; - Unzip the SAGA binary files in their own folder (for example, saga-9.0.0.zip).
+; To build installer (for example, saga-9.0.1_setup.exe).
+; - Unzip the SAGA binary files in their own folder (for example, saga-9.0.1.zip).
; - Place saga.iss and saga_readme.rtf in the SAGA folder (contains saga_gui.exe, etc.).
; - Open saga.iss in Inno Setup.
; - Choose Build | Compile.
@@ -7,7 +7,7 @@
[Setup]
AppName=SAGA - System for Automated Geoscientific Analyses
-AppVerName=SAGA 9.0.0
+AppVerName=SAGA 9.0.1
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
@@ -22,9 +22,9 @@ Compression=lzma
SolidCompression=yes
OutputDir=.
-OutputBaseFilename=saga-9.0.0_x64_setup
+OutputBaseFilename=saga-9.0.1_x64_setup
-VersionInfoVersion=9.0.0.0
+VersionInfoVersion=9.0.1.0
VersionInfoCompany=SAGA User Group Association
VersionInfoCopyright=(c) 2005-2018 by O. Conrad
VersionInfoDescription=SAGA single-file installer
@@ -50,5 +50,5 @@ Name: "{commondesktop}\SAGA"; Filename: "{app}\saga_gui.exe"; WorkingDir: "{app}
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\saga_gui.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\saga_gui.exe"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\saga_gui.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
-Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.0"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey
-Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.0"; ValueType: string; ValueName: "Version"; ValueData: "9.0.0.0"
+Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.1"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey
+Root: HKLM; Subkey: "SOFTWARE\SAGA User Group Association\SAGA\9.0.1"; ValueType: string; ValueName: "Version"; ValueData: "9.0.1.0"
View it on GitLab: https://salsa.debian.org/debian-gis-team/saga/-/compare/ca100a8c2cb17fcb353de1b337aa58b332395591...f32fde60a8d4bb613f5246c84c929322fe067637
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/saga/-/compare/ca100a8c2cb17fcb353de1b337aa58b332395591...f32fde60a8d4bb613f5246c84c929322fe067637
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20230421/cbe27012/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list