]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
code revision
authorasl <asl@opencascade.com>
Mon, 26 Oct 2015 11:52:01 +0000 (14:52 +0300)
committerasl <asl@opencascade.com>
Mon, 26 Oct 2015 11:52:01 +0000 (14:52 +0300)
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDRO_tests/TestViewer.cxx

index 48ee53c6975022860123c04c1e590b9c0b6490f3..34b413fa97e92e229ec27e6076e0ec6646ad57a5 100644 (file)
@@ -848,8 +848,15 @@ NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
 
 double HYDROData_CalculationCase::GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const
 {
-  //TODO: #652
-  return 0.0;
+  Handle( HYDROData_LandCoverMap ) aMap = GetLandCoverMap();
+  Handle( HYDROData_StricklerTable ) aTable = GetStricklerTable();
+  if( aMap.IsNull() )
+    return 0.0;
+
+  QString aType;
+  aMap->FindByPoint( thePoint, aType );
+  double aCoeff = aTable->Get( aType, 0.0 );
+  return aCoeff;
 }
 
 Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const
index a3d5054be69aa34704f608a2edf8f856870060f9..ce1f8eb516db757642b375b903439c573328af30 100644 (file)
@@ -238,12 +238,12 @@ Handle_Aspect_ColorScale TestViewer::showColorScale( bool isShow )
   if( aColorScale.IsNull() )
     return aColorScale;
 
-  Standard_Real anXPos = 0.05; //TODO
-  Standard_Real anYPos = 0.1; //TODO
-  Standard_Real aWidth = 0.2; //TODO
-  Standard_Real aHeight = 0.5; //TODO
-  Standard_Integer aTextHeight = 14; //TODO
-  Standard_Integer aNbIntervals = 30; //TODO
+  Standard_Real anXPos = 0.05;
+  Standard_Real anYPos = 0.1;
+  Standard_Real aWidth = 0.2;
+  Standard_Real aHeight = 0.5;
+  Standard_Integer aTextHeight = 14;
+  Standard_Integer aNbIntervals = 30;
 
   aColorScale->SetXPosition( anXPos );
   aColorScale->SetYPosition( anYPos );