#include <TestShape.h>
#include <TopTools_ListOfShape.hxx>
#include <AIS_DisplayMode.hxx>
-#include <Aspect_ColorScale.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <QString>
#include <QColor>
#include "HYDRO_trace.hxx"
extern QString REF_DATA_PATH;
-const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table.txt";
+const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table_06.txt";
void test_HYDROData_LandCoverMap::test_add_2_objects()
{
// select one of faces (first)
TestViewer::select( 200, 300 );
CPPUNIT_ASSERT_IMAGES
-
+ TestViewer::eraseAll(true, true);
aDoc->Close();
}
void test_HYDROData_LandCoverMap::test_shp_import_cyp()
{
+ //TestViewer::eraseAll(true);
+
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
QString aFileName = REF_DATA_PATH + "/cyprus_natural.shp";
HYDROData_ShapeFile anImporter;
Handle(HYDROData_LandCoverMap) LCM = Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
HYDROData_MapOfFaceToStricklerType aMapFace2ST;
- for ( int i = 1; i <= PolygonFaces.Length(); i++ )
+ for ( int i = 1; i <= 20; i++ )
{
TopoDS_Shape aShape = PolygonFaces(i);
if ( aShape.IsNull() )
Handle(HYDROData_LandCoverMap) LCM = Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
HYDROData_MapOfFaceToStricklerType aMapFace2ST;
- for ( int i = 150; i <= 350; i++ )
+ for ( int i = 150; i <= 160; i++ )
{
TopoDS_Shape aShape = PolygonFaces(i);
if ( aShape.IsNull() )
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
TopoDS_Face aLC1 = Face2d( QList<double>() << 12 << 19 << 82 << 9 << 126 << 53 << 107 << 80 << 29 << 75 );
- CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC1, QString::fromUtf8("Forêt et végétation arbustive en mutation")) );
+ CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC1, QString::fromLatin1("Forêt et végétation arbustive en mutation")) );
TopoDS_Face aLC2 = Face2d( QList<double>() << 21 << 34 << 24 << 25 << 37 << 37 << 40 << 61 <<
44 << 95 << 85 << 100 << 104 << 66 << 107 << 33 <<
128 << 18 << 140 << 50 << 131 << 89 << 104 << 111 <<
31 << 114 );
- CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC2, QString::fromUtf8("Forêts de conifères")) );
+ CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC2, QString::fromLatin1("Forêts de conifères")) );
TopoDS_Face aLC3 = Face2d( QList<double>() << 4 << 54 << 1 << 47 << 51 << 45 <<
127 << 42 << 145 << 43 << 148 << 60 << 90 << 65 );
- CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC3, QString::fromUtf8("Forêts de feuillus")) );
+ CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC3, QString::fromLatin1("Forêts de feuillus")) );
QString aTmpFileName = "test.telemac";
QString aTmpPath = QDir::tempPath() + "/" + aTmpFileName;
#ifdef NDEBUG
int SI = 100;
- int EI = 300;
+ int EI = 110;
#else
- int SI = 150;
- int EI = 200;
+ int SI = 100;
+ int EI = 110;
#endif
for ( int i = SI; i <= EI; i++ )
LCM->ClassifyPoints(pnts, TRes);
aTimer.Stop();
#ifdef NDEBUG
- CPPUNIT_ASSERT( aTimer.ElapsedTime() < 1.4);
+ std::cout << "Time: " << aTimer.ElapsedTime() << std::endl;
+ CPPUNIT_ASSERT( aTimer.ElapsedTime() < 6.0);
aTimer.Show();
#endif
}
CPPUNIT_ASSERT_EQUAL (coeffs[0], 0.0);
CPPUNIT_ASSERT_EQUAL (coeffs[1], 0.0);
CPPUNIT_ASSERT_EQUAL (coeffs[2], 0.0);
- CPPUNIT_ASSERT_EQUAL (coeffs[3], 1.0522);
- CPPUNIT_ASSERT_EQUAL (coeffs[4], 1.0223);
- CPPUNIT_ASSERT_EQUAL (coeffs[5], 1.0221);
- CPPUNIT_ASSERT_EQUAL (coeffs[6], 1.0522);
+ CPPUNIT_ASSERT_EQUAL (coeffs[3], 98.0);
+ CPPUNIT_ASSERT_EQUAL (coeffs[4], 26.0);
+ CPPUNIT_ASSERT_EQUAL (coeffs[5], 24.0);
+ CPPUNIT_ASSERT_EQUAL (coeffs[6], 98.0);
}