From: isn Date: Tue, 13 Sep 2016 08:54:49 +0000 (+0300) Subject: calc case get str coeffs X-Git-Tag: v1.6~75^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f324452f2c6ec52d33bedc8783b373bdc3ad9c21;p=modules%2Fhydro.git calc case get str coeffs --- diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 28a60595..2b2cb691 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -905,6 +905,20 @@ double HYDROData_CalculationCase::GetStricklerCoefficientForPoint( const gp_XY& return aCoeff; } +bool HYDROData_CalculationCase::GetStricklerCoefficientForPoints(const std::vector& thePoints, + std::vector& 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; diff --git a/src/HYDROData/HYDROData_CalculationCase.h b/src/HYDROData/HYDROData_CalculationCase.h index e71b191a..88655837 100644 --- a/src/HYDROData/HYDROData_CalculationCase.h +++ b/src/HYDROData/HYDROData_CalculationCase.h @@ -24,6 +24,7 @@ #include #include #include +#include #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& thePoints, + std::vector& theCoeffs, double DefValue, + bool UseMax ); + /** * Returns altitudes for given points on given region. * \param thePoints the points to examine