From f324452f2c6ec52d33bedc8783b373bdc3ad9c21 Mon Sep 17 00:00:00 2001 From: isn Date: Tue, 13 Sep 2016 11:54:49 +0300 Subject: [PATCH] calc case get str coeffs --- src/HYDROData/HYDROData_CalculationCase.cxx | 14 ++++++++++++++ src/HYDROData/HYDROData_CalculationCase.h | 5 +++++ 2 files changed, 19 insertions(+) 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 -- 2.39.2