]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
calc case get str coeffs
authorisn <isn@opencascade.com>
Tue, 13 Sep 2016 08:54:49 +0000 (11:54 +0300)
committerisn <isn@opencascade.com>
Tue, 13 Sep 2016 08:54:49 +0000 (11:54 +0300)
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_CalculationCase.h

index 28a6059589541eeeee2a1f362dc97b96eaebd23b..2b2cb691e5bee23e8a99022e5ca121c982c91734 100644 (file)
@@ -905,6 +905,20 @@ double HYDROData_CalculationCase::GetStricklerCoefficientForPoint( const gp_XY&
   return aCoeff;
 }
 
+bool HYDROData_CalculationCase::GetStricklerCoefficientForPoints(const std::vector<gp_Pnt2d>& thePoints,
+  std::vector<double>& theCoeffs, double DefValue, bool UseMax )
+{
+
+  Handle( HYDROData_LandCoverMap ) aLCM = GetLandCoverMap();
+  Handle( HYDROData_StricklerTable ) aTable = GetStricklerTable();
+  if( aLCM.IsNull() || aTable.IsNull() )
+    return false;
+
+  aLCM->ClassifyPoints(thePoints, aTable, theCoeffs, DefValue, UseMax );
+
+  return true;
+}
+
 Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const
 {
   Handle(HYDROData_Region) aResRegion;
index e71b191a81105fc5688e2b2f621b394c0d0238d4..88655837886846f48cb516889b0f14069dce445a 100644 (file)
@@ -24,6 +24,7 @@
 #include <HYDROData_PriorityQueue.h>
 #include <HYDROData_Zone.h>
 #include <HYDROData_Warning.h>
+#include <vector>
 
 #ifdef WIN32
   #pragma warning ( disable: 4251 )
@@ -340,6 +341,10 @@ public:
    */
   HYDRODATA_EXPORT double GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const;
 
+  HYDRODATA_EXPORT bool GetStricklerCoefficientForPoints(const std::vector<gp_Pnt2d>& thePoints,
+                                                         std::vector<double>& theCoeffs, double DefValue,
+                                                         bool UseMax );
+
   /**
    * Returns altitudes for given points on given region.
    * \param thePoints the points to examine