From f86cf7ecf17dbae2a1d84e0ebbab07c732208c2f Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 18 Apr 2017 14:11:11 +0200 Subject: [PATCH] test Strickler --- doc/salome/examples/CMakeLists.txt | 1 + .../examples/CTestTestfileInstall.cmake | 1 + ...h019_normalCaseManualInterpolZStrickler.py | 777 ++++++++++++++++++ src/HYDROData/HYDROData_LandCoverMap.cxx | 8 +- 4 files changed, 784 insertions(+), 3 deletions(-) create mode 100644 doc/salome/examples/h019_normalCaseManualInterpolZStrickler.py diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 1109926d..4d3736c6 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -38,6 +38,7 @@ SET(EXAMPLES_TESTS h016_pilesPontManualMesh.py h017_interpolationLineaire.py h018_streamInterpolation.py + h019_normalCaseManualInterpolZStrickler.py ) SET(HYDRO_SAMPLES diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index 7602ed56..862ec3a0 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -40,6 +40,7 @@ SET(EXAMPLES_TESTS h016_pilesPontManualMesh h017_interpolationLineaire h018_streamInterpolation + h019_normalCaseManualInterpolZStrickler ) FOREACH(tfile ${EXAMPLES_TESTS}) diff --git a/doc/salome/examples/h019_normalCaseManualInterpolZStrickler.py b/doc/salome/examples/h019_normalCaseManualInterpolZStrickler.py new file mode 100644 index 00000000..38bada13 --- /dev/null +++ b/doc/salome/examples/h019_normalCaseManualInterpolZStrickler.py @@ -0,0 +1,777 @@ +# -*- coding: utf-8 -*- + +import os +HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO") + +import sys +import salome + +salome.salome_init() +theStudy = salome.myStudy + +#---------------------- +# --- HYDRO +#---------------------- + +from HYDROPy import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * + +hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() ) + +hydro_doc.SetLocalCS( 430000, 6.35e+06 ) + +garonne_ign_01 = hydro_doc.CreateObject( KIND_IMAGE ) +garonne_ign_01.SetName( "garonne_ign_01" ) + +garonne_ign_01.SetZLevel( 0 ) + + +if not(garonne_ign_01.LoadImage(os.path.join(HYDRO_SAMPLES, "garonne_ign_01.png" ))): + raise ValueError('problem while loading image') + +garonne_ign_01.SetLocalPoints( QPoint( 40, 817 ), + QPoint( 1325, 85 ) ) + +garonne_ign_01.SetGlobalPoints( 1, + QPointF( 471562, 6.36775e+06 ), + QPointF( 489400, 6.37702e+06 ) ) + +garonne_ign_01.Update() + +garonne_ign_02 = hydro_doc.CreateObject( KIND_IMAGE ) +garonne_ign_02.SetName( "garonne_ign_02" ) + +garonne_ign_02.SetZLevel( 1 ) + + +if not(garonne_ign_02.LoadImage( os.path.join(HYDRO_SAMPLES, "garonne_ign_02.png" ))): + raise ValueError('problem while loading image') + +garonne_ign_02.SetLocalPoints( QPoint( 1389, 447 ), + QPoint( 784, 481 ) ) + +garonne_ign_02.SetGlobalPoints( 3, + QPointF( 631, 95 ), + QPointF( 26, 129 ) ) +garonne_ign_02.SetTrsfReferenceImage( garonne_ign_01 ) + +garonne_ign_02.Update() + + +def_strickler_table_06 = hydro_doc.CreateObject( KIND_STRICKLER_TABLE ) +def_strickler_table_06.SetName( "def_strickler_table_06" ) + +def_strickler_table_06.SetAttrName( "CODE_06" ) + +def_strickler_table_06.Set( u"Pelouses et pâturages naturels", 31 ) +def_strickler_table_06.SetAttrValue( u"Pelouses et pâturages naturels", "321" ) +def_strickler_table_06.SetColor( u"Pelouses et pâturages naturels", QColor( 204, 242, 77 ) ) + +def_strickler_table_06.Set( u"Aéroports", 43 ) +def_strickler_table_06.SetAttrValue( u"Aéroports", "124" ) +def_strickler_table_06.SetColor( u"Aéroports", QColor( 230, 204, 230 ) ) + +def_strickler_table_06.Set( u"Systèmes culturaux et parcellaires complexes", 19 ) +def_strickler_table_06.SetAttrValue( u"Systèmes culturaux et parcellaires complexes", "242" ) +def_strickler_table_06.SetColor( u"Systèmes culturaux et parcellaires complexes", QColor( 255, 230, 77 ) ) + +def_strickler_table_06.Set( u"Cultures annuelles associées à des cultures permanentes", 27 ) +def_strickler_table_06.SetAttrValue( u"Cultures annuelles associées à des cultures permanentes", "241" ) +def_strickler_table_06.SetColor( u"Cultures annuelles associées à des cultures permanentes", QColor( 255, 230, 166 ) ) + +def_strickler_table_06.Set( u"Forêt et végétation arbustive en mutation", 9 ) +def_strickler_table_06.SetAttrValue( u"Forêt et végétation arbustive en mutation", "324" ) +def_strickler_table_06.SetColor( u"Forêt et végétation arbustive en mutation", QColor( 166, 242, 0 ) ) + +def_strickler_table_06.Set( u"Décharges", 21 ) +def_strickler_table_06.SetAttrValue( u"Décharges", "132" ) +def_strickler_table_06.SetColor( u"Décharges", QColor( 166, 77, 0 ) ) + +def_strickler_table_06.Set( u"Végétation clairsemée", 43 ) +def_strickler_table_06.SetAttrValue( u"Végétation clairsemée", "333" ) +def_strickler_table_06.SetColor( u"Végétation clairsemée", QColor( 204, 255, 204 ) ) + +def_strickler_table_06.Set( u"Prairies et autres surfaces toujours en herbe à usage agricole", 33 ) +def_strickler_table_06.SetAttrValue( u"Prairies et autres surfaces toujours en herbe à usage agricole", "231" ) +def_strickler_table_06.SetColor( u"Prairies et autres surfaces toujours en herbe à usage agricole", QColor( 230, 230, 77 ) ) + +def_strickler_table_06.Set( u"Périmètres irrigués en permanence", 43 ) +def_strickler_table_06.SetAttrValue( u"Périmètres irrigués en permanence", "212" ) +def_strickler_table_06.SetColor( u"Périmètres irrigués en permanence", QColor( 255, 255, 0 ) ) + +def_strickler_table_06.Set( u"Plans d'eau", 90 ) +def_strickler_table_06.SetAttrValue( u"Plans d'eau", "512" ) +def_strickler_table_06.SetColor( u"Plans d'eau", QColor( 128, 242, 230 ) ) + +def_strickler_table_06.Set( u"Territoires agroforestiers", 14 ) +def_strickler_table_06.SetAttrValue( u"Territoires agroforestiers", "244" ) +def_strickler_table_06.SetColor( u"Territoires agroforestiers", QColor( 242, 204, 166 ) ) + +def_strickler_table_06.Set( u"Forêts mélangées", 10 ) +def_strickler_table_06.SetAttrValue( u"Forêts mélangées", "313" ) +def_strickler_table_06.SetColor( u"Forêts mélangées", QColor( 77, 255, 0 ) ) + +def_strickler_table_06.Set( u"Glaciers et neiges éternelles", 75 ) +def_strickler_table_06.SetAttrValue( u"Glaciers et neiges éternelles", "335" ) +def_strickler_table_06.SetColor( u"Glaciers et neiges éternelles", QColor( 166, 230, 204 ) ) + +def_strickler_table_06.Set( u"Plages, dunes et sable", 39 ) +def_strickler_table_06.SetAttrValue( u"Plages, dunes et sable", "331" ) +def_strickler_table_06.SetColor( u"Plages, dunes et sable", QColor( 230, 230, 230 ) ) + +def_strickler_table_06.Set( u"Zones incendiées", 65 ) +def_strickler_table_06.SetAttrValue( u"Zones incendiées", "334" ) +def_strickler_table_06.SetColor( u"Zones incendiées", QColor( 0, 0, 0 ) ) + +def_strickler_table_06.Set( u"Tissu urbain continu", 15 ) +def_strickler_table_06.SetAttrValue( u"Tissu urbain continu", "111" ) +def_strickler_table_06.SetColor( u"Tissu urbain continu", QColor( 230, 0, 77 ) ) + +def_strickler_table_06.Set( u"Chantiers", 17 ) +def_strickler_table_06.SetAttrValue( u"Chantiers", "133" ) +def_strickler_table_06.SetColor( u"Chantiers", QColor( 255, 77, 255 ) ) + +def_strickler_table_06.Set( u"Estuaires", 98 ) +def_strickler_table_06.SetAttrValue( u"Estuaires", "522" ) +def_strickler_table_06.SetColor( u"Estuaires", QColor( 166, 255, 230 ) ) + +def_strickler_table_06.Set( u"Marais maritimes", 74 ) +def_strickler_table_06.SetAttrValue( u"Marais maritimes", "421" ) +def_strickler_table_06.SetColor( u"Marais maritimes", QColor( 204, 204, 255 ) ) + +def_strickler_table_06.Set( u"Forêts de conifères", 13 ) +def_strickler_table_06.SetAttrValue( u"Forêts de conifères", "312" ) +def_strickler_table_06.SetColor( u"Forêts de conifères", QColor( 0, 166, 0 ) ) + +def_strickler_table_06.Set( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", 16 ) +def_strickler_table_06.SetAttrValue( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", "243" ) +def_strickler_table_06.SetColor( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants", QColor( 230, 204, 77 ) ) + +def_strickler_table_06.Set( u"Tourbières", 65 ) +def_strickler_table_06.SetAttrValue( u"Tourbières", "412" ) +def_strickler_table_06.SetColor( u"Tourbières", QColor( 77, 77, 255 ) ) + +def_strickler_table_06.Set( u"Extraction de matériaux", 19 ) +def_strickler_table_06.SetAttrValue( u"Extraction de matériaux", "131" ) +def_strickler_table_06.SetColor( u"Extraction de matériaux", QColor( 166, 0, 204 ) ) + +def_strickler_table_06.Set( u"Réseaux routier et ferroviaire et espaces associés", 35 ) +def_strickler_table_06.SetAttrValue( u"Réseaux routier et ferroviaire et espaces associés", "122" ) +def_strickler_table_06.SetColor( u"Réseaux routier et ferroviaire et espaces associés", QColor( 204, 0, 0 ) ) + +def_strickler_table_06.Set( u"Mers et océans", 99 ) +def_strickler_table_06.SetAttrValue( u"Mers et océans", "523" ) +def_strickler_table_06.SetColor( u"Mers et océans", QColor( 230, 242, 255 ) ) + +def_strickler_table_06.Set( u"Equipements sportifs et de loisirs", 40 ) +def_strickler_table_06.SetAttrValue( u"Equipements sportifs et de loisirs", "142" ) +def_strickler_table_06.SetColor( u"Equipements sportifs et de loisirs", QColor( 255, 230, 255 ) ) + +def_strickler_table_06.Set( u"Forêts de feuillus", 9 ) +def_strickler_table_06.SetAttrValue( u"Forêts de feuillus", "311" ) +def_strickler_table_06.SetColor( u"Forêts de feuillus", QColor( 128, 255, 0 ) ) + +def_strickler_table_06.Set( u"Vergers et petits fruits", 25 ) +def_strickler_table_06.SetAttrValue( u"Vergers et petits fruits", "222" ) +def_strickler_table_06.SetColor( u"Vergers et petits fruits", QColor( 242, 166, 77 ) ) + +def_strickler_table_06.Set( u"Végétation sclérophylle", 10 ) +def_strickler_table_06.SetAttrValue( u"Végétation sclérophylle", "323" ) +def_strickler_table_06.SetColor( u"Végétation sclérophylle", QColor( 166, 230, 77 ) ) + +def_strickler_table_06.Set( u"Landes et broussailles", 12 ) +def_strickler_table_06.SetAttrValue( u"Landes et broussailles", "322" ) +def_strickler_table_06.SetColor( u"Landes et broussailles", QColor( 166, 255, 128 ) ) + +def_strickler_table_06.Set( u"Tissu urbain discontinu", 32 ) +def_strickler_table_06.SetAttrValue( u"Tissu urbain discontinu", "112" ) +def_strickler_table_06.SetColor( u"Tissu urbain discontinu", QColor( 255, 0, 0 ) ) + +def_strickler_table_06.Set( u"Cours et voies d'eau", 88 ) +def_strickler_table_06.SetAttrValue( u"Cours et voies d'eau", "511" ) +def_strickler_table_06.SetColor( u"Cours et voies d'eau", QColor( 0, 204, 242 ) ) + +def_strickler_table_06.Set( u"Oliveraies", 26 ) +def_strickler_table_06.SetAttrValue( u"Oliveraies", "223" ) +def_strickler_table_06.SetColor( u"Oliveraies", QColor( 230, 166, 0 ) ) + +def_strickler_table_06.Set( u"Vignobles", 24 ) +def_strickler_table_06.SetAttrValue( u"Vignobles", "221" ) +def_strickler_table_06.SetColor( u"Vignobles", QColor( 230, 128, 0 ) ) + +def_strickler_table_06.Set( u"Rizières", 42 ) +def_strickler_table_06.SetAttrValue( u"Rizières", "213" ) +def_strickler_table_06.SetColor( u"Rizières", QColor( 230, 230, 0 ) ) + +def_strickler_table_06.Set( u"Zones portuaires", 45 ) +def_strickler_table_06.SetAttrValue( u"Zones portuaires", "123" ) +def_strickler_table_06.SetColor( u"Zones portuaires", QColor( 230, 204, 204 ) ) + +def_strickler_table_06.Set( u"Zones industrielles ou commerciales et installations publiques", 30 ) +def_strickler_table_06.SetAttrValue( u"Zones industrielles ou commerciales et installations publiques", "121" ) +def_strickler_table_06.SetColor( u"Zones industrielles ou commerciales et installations publiques", QColor( 204, 77, 242 ) ) + +def_strickler_table_06.Set( u"Marais salants", 73 ) +def_strickler_table_06.SetAttrValue( u"Marais salants", "422" ) +def_strickler_table_06.SetColor( u"Marais salants", QColor( 230, 230, 255 ) ) + +def_strickler_table_06.Set( u"Marais intérieurs", 60 ) +def_strickler_table_06.SetAttrValue( u"Marais intérieurs", "411" ) +def_strickler_table_06.SetColor( u"Marais intérieurs", QColor( 166, 166, 255 ) ) + +def_strickler_table_06.Set( u"Espaces verts urbains", 25 ) +def_strickler_table_06.SetAttrValue( u"Espaces verts urbains", "141" ) +def_strickler_table_06.SetColor( u"Espaces verts urbains", QColor( 255, 166, 255 ) ) + +def_strickler_table_06.Set( u"Lagunes littorales", 95 ) +def_strickler_table_06.SetAttrValue( u"Lagunes littorales", "521" ) +def_strickler_table_06.SetColor( u"Lagunes littorales", QColor( 0, 255, 166 ) ) + +def_strickler_table_06.Set( u"Roches nues", 45 ) +def_strickler_table_06.SetAttrValue( u"Roches nues", "332" ) +def_strickler_table_06.SetColor( u"Roches nues", QColor( 204, 204, 204 ) ) + +def_strickler_table_06.Set( u"Terres arables hors périmètres d'irrigation", 31 ) +def_strickler_table_06.SetAttrValue( u"Terres arables hors périmètres d'irrigation", "211" ) +def_strickler_table_06.SetColor( u"Terres arables hors périmètres d'irrigation", QColor( 255, 255, 168 ) ) + +def_strickler_table_06.Set( u"Zones intertidales", 75 ) +def_strickler_table_06.SetAttrValue( u"Zones intertidales", "423" ) +def_strickler_table_06.SetColor( u"Zones intertidales", QColor( 166, 166, 230 ) ) + + +def_strickler_table_06.Update() + +garonne = hydro_doc.CreateObject( KIND_POLYLINEXY ) +garonne.SetName( "garonne" ) + +garonne.SetZLevel( 2 ) + +garonne.AddSection( "Section_1", 1, 1 ) +garonne.AddPoint( 0, gp_XY( 38191.48, 33184.55 ) ) +garonne.AddPoint( 0, gp_XY( 38553.78, 33013.53 ) ) +garonne.AddPoint( 0, gp_XY( 38993.90, 32767.64 ) ) +garonne.AddPoint( 0, gp_XY( 39678.58, 32533.58 ) ) +garonne.AddPoint( 0, gp_XY( 40240.26, 32305.27 ) ) +garonne.AddPoint( 0, gp_XY( 40717.94, 32193.70 ) ) +garonne.AddPoint( 0, gp_XY( 41361.00, 32464.18 ) ) +garonne.AddPoint( 0, gp_XY( 41831.41, 32626.69 ) ) +garonne.AddPoint( 0, gp_XY( 41950.14, 32618.24 ) ) +garonne.AddPoint( 0, gp_XY( 42524.97, 32419.61 ) ) +garonne.AddPoint( 0, gp_XY( 42909.80, 32291.33 ) ) +garonne.AddPoint( 0, gp_XY( 43177.03, 32269.95 ) ) +garonne.AddPoint( 0, gp_XY( 43465.65, 32344.78 ) ) +garonne.AddPoint( 0, gp_XY( 43754.27, 32152.37 ) ) +garonne.AddPoint( 0, gp_XY( 44128.40, 31842.37 ) ) +garonne.AddPoint( 0, gp_XY( 44003.90, 31269.93 ) ) +garonne.AddPoint( 0, gp_XY( 44010.82, 30869.63 ) ) +garonne.AddPoint( 0, gp_XY( 44064.26, 30655.84 ) ) +garonne.AddPoint( 0, gp_XY( 44434.73, 30366.18 ) ) +garonne.AddPoint( 0, gp_XY( 45208.04, 30484.81 ) ) +garonne.AddPoint( 0, gp_XY( 45705.01, 30287.34 ) ) +garonne.AddPoint( 0, gp_XY( 45933.89, 30046.87 ) ) +garonne.AddPoint( 0, gp_XY( 46127.34, 29490.68 ) ) +garonne.AddPoint( 0, gp_XY( 46111.60, 29226.08 ) ) +garonne.AddPoint( 0, gp_XY( 46228.62, 28784.05 ) ) +garonne.AddPoint( 0, gp_XY( 46247.64, 28449.75 ) ) +garonne.AddPoint( 0, gp_XY( 46108.48, 28086.94 ) ) +garonne.AddPoint( 0, gp_XY( 45618.52, 27553.74 ) ) +garonne.AddPoint( 0, gp_XY( 45276.77, 27042.78 ) ) +garonne.AddPoint( 0, gp_XY( 45001.89, 26273.15 ) ) +garonne.AddPoint( 0, gp_XY( 45167.76, 25975.34 ) ) +garonne.AddPoint( 0, gp_XY( 46018.15, 25848.84 ) ) +garonne.AddPoint( 0, gp_XY( 46378.94, 25872.21 ) ) +garonne.AddPoint( 0, gp_XY( 46885.57, 25937.64 ) ) +garonne.AddPoint( 0, gp_XY( 47278.36, 25782.88 ) ) +garonne.AddPoint( 0, gp_XY( 47153.86, 25728.04 ) ) +garonne.AddPoint( 0, gp_XY( 46987.51, 25749.97 ) ) +garonne.AddPoint( 0, gp_XY( 46658.26, 25715.71 ) ) +garonne.AddPoint( 0, gp_XY( 45650.76, 25634.46 ) ) +garonne.AddPoint( 0, gp_XY( 45122.63, 25748.21 ) ) +garonne.AddPoint( 0, gp_XY( 44797.63, 26325.09 ) ) +garonne.AddPoint( 0, gp_XY( 45114.51, 27168.75 ) ) +garonne.AddPoint( 0, gp_XY( 45508.28, 27713.21 ) ) +garonne.AddPoint( 0, gp_XY( 45994.19, 28382.53 ) ) +garonne.AddPoint( 0, gp_XY( 45927.01, 29201.34 ) ) +garonne.AddPoint( 0, gp_XY( 45756.39, 29859.47 ) ) +garonne.AddPoint( 0, gp_XY( 45390.76, 30151.97 ) ) +garonne.AddPoint( 0, gp_XY( 45039.85, 30120.84 ) ) +garonne.AddPoint( 0, gp_XY( 44513.26, 30084.28 ) ) +garonne.AddPoint( 0, gp_XY( 43923.42, 30426.28 ) ) +garonne.AddPoint( 0, gp_XY( 43768.81, 30934.29 ) ) +garonne.AddPoint( 0, gp_XY( 43820.10, 31425.20 ) ) +garonne.AddPoint( 0, gp_XY( 43854.78, 31801.12 ) ) +garonne.AddPoint( 0, gp_XY( 43479.64, 32053.54 ) ) +garonne.AddPoint( 0, gp_XY( 42923.47, 32051.85 ) ) +garonne.AddPoint( 0, gp_XY( 42493.64, 32187.97 ) ) +garonne.AddPoint( 0, gp_XY( 42074.27, 32302.91 ) ) +garonne.AddPoint( 0, gp_XY( 41624.75, 32330.93 ) ) +garonne.AddPoint( 0, gp_XY( 41325.93, 32187.97 ) ) +garonne.AddPoint( 0, gp_XY( 40879.52, 31987.29 ) ) +garonne.AddPoint( 0, gp_XY( 40308.78, 32018.46 ) ) +garonne.AddPoint( 0, gp_XY( 39782.86, 32207.17 ) ) +garonne.AddPoint( 0, gp_XY( 38814.10, 32560.43 ) ) +garonne.AddPoint( 0, gp_XY( 38302.17, 32903.70 ) ) + +garonne.Update() + + +domaine = hydro_doc.CreateObject( KIND_POLYLINEXY ) +domaine.SetName( "domaine" ) + +domaine.SetZLevel( 3 ) + +domaine.AddSection( "Section_1", 0, 1 ) +domaine.AddPoint( 0, gp_XY( 39901.15, 34762.30 ) ); +domaine.AddPoint( 0, gp_XY( 38086.50, 29964.69 ) ); +domaine.AddPoint( 0, gp_XY( 44835.83, 24264.97 ) ); +domaine.AddPoint( 0, gp_XY( 46758.56, 25021.86 ) ); +domaine.AddPoint( 0, gp_XY( 46757.20, 26601.21 ) ); +domaine.AddPoint( 0, gp_XY( 48566.45, 30152.81 ) ); +domaine.AddPoint( 0, gp_XY( 45532.36, 33239.83 ) ); +domaine.AddPoint( 0, gp_XY( 43548.77, 34048.39 ) ); + +domaine.Update() + + +lit_majeur = hydro_doc.CreateObject( KIND_POLYLINEXY ) +lit_majeur.SetName( "lit_majeur" ) + +lit_majeur.SetZLevel( 7 ) + +lit_majeur.AddSection( "Section_1", 1, 1 ) +lit_majeur.AddPoint( 0, gp_XY( 41225.22, 34118.46 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41716.41, 33705.87 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42384.43, 33293.27 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42561.26, 32684.19 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42875.62, 32369.83 ) ) +lit_majeur.AddPoint( 0, gp_XY( 43700.82, 32350.18 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44526.02, 31662.51 ) ) +lit_majeur.AddPoint( 0, gp_XY( 45370.87, 31819.69 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46274.66, 31682.16 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46981.97, 31328.50 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47021.27, 30719.43 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47217.74, 30051.41 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47846.46, 29560.22 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48730.61, 28735.02 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48809.20, 27732.99 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49143.21, 27163.21 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49654.05, 26829.20 ) ) +lit_majeur.AddPoint( 0, gp_XY( 49693.34, 25355.63 ) ) +lit_majeur.AddPoint( 0, gp_XY( 48612.72, 23214.04 ) ) +lit_majeur.AddPoint( 0, gp_XY( 47453.51, 23115.80 ) ) +lit_majeur.AddPoint( 0, gp_XY( 46471.13, 24176.77 ) ) +lit_majeur.AddPoint( 0, gp_XY( 45960.29, 25257.39 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44899.32, 25591.40 ) ) +lit_majeur.AddPoint( 0, gp_XY( 44270.60, 26573.78 ) ) +lit_majeur.AddPoint( 0, gp_XY( 43248.92, 27909.82 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42757.73, 28243.83 ) ) +lit_majeur.AddPoint( 0, gp_XY( 42266.54, 28342.07 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41736.06, 28106.30 ) ) +lit_majeur.AddPoint( 0, gp_XY( 41402.05, 28833.26 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40910.86, 28911.85 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40576.85, 29324.45 ) ) +lit_majeur.AddPoint( 0, gp_XY( 40144.60, 29599.51 ) ) +lit_majeur.AddPoint( 0, gp_XY( 39024.69, 30130.00 ) ) +lit_majeur.AddPoint( 0, gp_XY( 38612.09, 30365.77 ) ) +lit_majeur.AddPoint( 0, gp_XY( 38828.21, 33391.50 ) ) + +lit_majeur.Update() + + +Cloud_02 = hydro_doc.CreateObject( KIND_BATHYMETRY ) +Cloud_02.SetName( "Cloud_02" ) + +Cloud_02.SetAltitudesInverted( 0 ) +if not(Cloud_02.ImportFromFile( os.path.join(HYDRO_SAMPLES, "Cloud_02.xyz" ))): + raise ValueError('problem while loading bathymetry') + +Cloud_02.Update() + + +garonne_point_L93 = hydro_doc.CreateObject( KIND_BATHYMETRY ) +garonne_point_L93.SetName( "garonne_point_L93" ) + +garonne_point_L93.SetAltitudesInverted( 0 ) +if not(garonne_point_L93.ImportFromFile( os.path.join(HYDRO_SAMPLES, "garonne_point_L93.xyz" ))): + raise ValueError('problem while loading bathymetry') + +garonne_point_L93.Update() + + +litMineur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMineur.SetName( "litMineur" ) + +litMineur.SetZLevel( 6 ) + +litMineur.SetAltitudeObject( garonne_point_L93 ) +litMineur.SetPolyline( garonne ) + +litMineur.Update() + + +litMajeur = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +litMajeur.SetName( "litMajeur" ) + +litMajeur.SetZLevel( 5 ) + +litMajeur.SetFillingColor( QColor( 0, 170, 127, 255 ) ) + +litMajeur.SetAltitudeObject( Cloud_02 ) +litMajeur.SetPolyline( lit_majeur ) + +litMajeur.Update() + + +domaineEtendu = hydro_doc.CreateObject( KIND_IMMERSIBLE_ZONE ) +domaineEtendu.SetName( "domaineEtendu" ) + +domaineEtendu.SetZLevel( 4 ) + +domaineEtendu.SetFillingColor( QColor( 201, 203, 55, 255 ) ) + +domaineEtendu.SetAltitudeObject( Cloud_02 ) +domaineEtendu.SetPolyline( domaine ) + +domaineEtendu.Update() + +# Land cover Map + + +CLC_decoupe = hydro_doc.CreateObject( KIND_LAND_COVER_MAP ) +CLC_decoupe.SetName( "CLC_decoupe" ) + +CLC_decoupe.SetZLevel( 13 ) + +if not(CLC_decoupe.ImportSHP( os.path.join(HYDRO_SAMPLES, 'HYDRO', 'CLC_decoupe.shp') )): + raise ValueError('problem while loading LandCoverMap shape') +attr_values = [] +attr_values.append( u"124" ) +attr_values.append( u"133" ) +attr_values.append( u"511" ) +attr_values.append( u"241" ) +attr_values.append( u"132" ) +attr_values.append( u"142" ) +attr_values.append( u"141" ) +attr_values.append( u"522" ) +attr_values.append( u"131" ) +attr_values.append( u"324" ) +attr_values.append( u"312" ) +attr_values.append( u"311" ) +attr_values.append( u"313" ) +attr_values.append( u"335" ) +attr_values.append( u"521" ) +attr_values.append( u"322" ) +attr_values.append( u"411" ) +attr_values.append( u"421" ) +attr_values.append( u"422" ) +attr_values.append( u"523" ) +attr_values.append( u"223" ) +attr_values.append( u"321" ) +attr_values.append( u"331" ) +attr_values.append( u"512" ) +attr_values.append( u"231" ) +attr_values.append( u"212" ) +attr_values.append( u"213" ) +attr_values.append( u"332" ) +attr_values.append( u"122" ) +attr_values.append( u"243" ) +attr_values.append( u"242" ) +attr_values.append( u"211" ) +attr_values.append( u"244" ) +attr_values.append( u"111" ) +attr_values.append( u"112" ) +attr_values.append( u"412" ) +attr_values.append( u"222" ) +attr_values.append( u"221" ) +attr_values.append( u"333" ) +attr_values.append( u"323" ) +attr_values.append( u"334" ) +attr_values.append( u"121" ) +attr_values.append( u"423" ) +attr_values.append( u"123" ) +types = [] +types.append( u"Aéroports" ) +types.append( u"Chantiers" ) +types.append( u"Cours et voies d'eau" ) +types.append( u"Cultures annuelles associées à des cultures permanentes" ) +types.append( u"Décharges" ) +types.append( u"Equipements sportifs et de loisirs" ) +types.append( u"Espaces verts urbains" ) +types.append( u"Estuaires" ) +types.append( u"Extraction de matériaux" ) +types.append( u"Forêt et végétation arbustive en mutation" ) +types.append( u"Forêts de conifères" ) +types.append( u"Forêts de feuillus" ) +types.append( u"Forêts mélangées" ) +types.append( u"Glaciers et neiges éternelles" ) +types.append( u"Lagunes littorales" ) +types.append( u"Landes et broussailles" ) +types.append( u"Marais intérieurs" ) +types.append( u"Marais maritimes" ) +types.append( u"Marais salants" ) +types.append( u"Mers et océans" ) +types.append( u"Oliveraies" ) +types.append( u"Pelouses et pâturages naturels" ) +types.append( u"Plages, dunes et sable" ) +types.append( u"Plans d'eau" ) +types.append( u"Prairies et autres surfaces toujours en herbe à usage agricole" ) +types.append( u"Périmètres irrigués en permanence" ) +types.append( u"Rizières" ) +types.append( u"Roches nues" ) +types.append( u"Réseaux routier et ferroviaire et espaces associés" ) +types.append( u"Surfaces essentiellement agricoles, interrompues par des espaces naturels importants" ) +types.append( u"Systèmes culturaux et parcellaires complexes" ) +types.append( u"Terres arables hors périmètres d'irrigation" ) +types.append( u"Territoires agroforestiers" ) +types.append( u"Tissu urbain continu" ) +types.append( u"Tissu urbain discontinu" ) +types.append( u"Tourbières" ) +types.append( u"Vergers et petits fruits" ) +types.append( u"Vignobles" ) +types.append( u"Végétation clairsemée" ) +types.append( u"Végétation sclérophylle" ) +types.append( u"Zones incendiées" ) +types.append( u"Zones industrielles ou commerciales et installations publiques" ) +types.append( u"Zones intertidales" ) +types.append( u"Zones portuaires" ) +if CLC_decoupe.ImportDBF( os.path.join(HYDRO_SAMPLES, 'HYDRO', 'CLC_decoupe.dbf'), 'CODE_06', attr_values, types ) != CLC_decoupe.DBFStatus_OK: + raise ValueError('problem while loading LandCoverMap data base') + + +# Calculation case +garonne_1 = hydro_doc.CreateObject( KIND_CALCULATION ) +garonne_1.SetName( "garonne_1" ) + +garonne_1.SetAssignmentMode( HYDROData_CalculationCase.MANUAL ) +garonne_1.AddGeometryObject( litMineur ) +garonne_1.AddGeometryObject( domaineEtendu ) +garonne_1.AddGeometryObject( litMajeur ) + +case_geom_group = domaineEtendu.GetGroup( 0 ) +garonne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMineur.GetGroup( 0 ) +garonne_1.AddGeometryGroup( case_geom_group ) +case_geom_group = litMajeur.GetGroup( 0 ) +garonne_1.AddGeometryGroup( case_geom_group ) +garonne_1.SetBoundaryPolyline( domaine ) +garonne_1.SetStricklerTable( def_strickler_table_06 ) +garonne_1.SetLandCoverMap( CLC_decoupe ) + +# Start the algorithm of the partition and assignment +garonne_1.Update() +garonne_1_litMineur = hydro_doc.FindObjectByName( "garonne_1_Reg_1" ) +garonne_1_Zone_1 = hydro_doc.FindObjectByName( "garonne_1_Zone_1" ) +garonne_1_Zone_1.SetMergeType( HYDROData_Zone.Merge_ZMIN ) +garonne_1_Zone_1.SetColor( QColor( 192, 113, 64 )) +garonne_1_litMineur.AddZone( garonne_1_Zone_1 ) + +garonne_1_riveDroite = hydro_doc.FindObjectByName( "garonne_1_Reg_2" ) +garonne_1_Zone_2 = hydro_doc.FindObjectByName( "garonne_1_Zone_2" ) +garonne_1_Zone_2.SetColor( QColor( 141, 192, 64 )) +garonne_1_riveDroite.AddZone( garonne_1_Zone_2 ) + +garonne_1_Zone_3 = hydro_doc.FindObjectByName( "garonne_1_Zone_3" ) +garonne_1_Zone_3.SetMergeType( HYDROData_Zone.Merge_Object ) +Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" ) +garonne_1_Zone_3.SetMergeObject( Cloud_02 ) +garonne_1_Zone_3.SetColor( QColor( 64, 192, 77 )) +garonne_1_riveDroite.AddZone( garonne_1_Zone_3 ) + +garonne_1_riveGauche = hydro_doc.FindObjectByName( "garonne_1_Reg_3" ) +garonne_1_Zone_4 = hydro_doc.FindObjectByName( "garonne_1_Zone_4" ) +garonne_1_Zone_4.SetMergeType( HYDROData_Zone.Merge_Object ) +Cloud_02 = hydro_doc.FindObjectByName( "Cloud_02" ) +garonne_1_Zone_4.SetMergeObject( Cloud_02 ) +garonne_1_Zone_4.SetColor( QColor( 64, 75, 192 )) +garonne_1_riveGauche.AddZone( garonne_1_Zone_4 ) + +garonne_1_Zone_5 = hydro_doc.FindObjectByName( "garonne_1_Zone_5" ) +garonne_1_Zone_5.SetColor( QColor( 64, 192, 77 )) +garonne_1_riveGauche.AddZone( garonne_1_Zone_5 ) + +garonne_1_litMineur.SetName("garonne_1_litMineur") +garonne_1_riveDroite.SetName("garonne_1_riveDroite") +garonne_1_riveGauche.SetName("garonne_1_riveGauche") + +# Export of the calculation case +garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() ) + +#---------------------- +# --- Geometry +#---------------------- + +# Get geometry shape and print debug information +import GEOM +from salome.geom import geomBuilder +import math +import SALOMEDS +from salome.hydrotools.controls import controlGeomProps + +geompy = geomBuilder.New(theStudy) + +print "Entry:", garonne_1_entry +HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) ) +print "Geom shape:", HYDRO_garonne_1 +print "Geom shape name:", HYDRO_garonne_1.GetName() + +# --- manual definition: geometrical faces +[riveGauche,litMineur,riveDroite] = geompy.ExtractShapes(HYDRO_garonne_1, geompy.ShapeType["FACE"], True) + +# --- manual definition: useful groups of edges +garonne_1_litMineur_Outer = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(garonne_1_litMineur_Outer, [7, 9]) +garonne_1_domaineEtendu_Outer = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(garonne_1_domaineEtendu_Outer, [4, 11, 14, 16, 18, 20, 22, 24, 27, 29, 31, 33]) + +aval = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(aval, [4]) +amont = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(amont, [11]) +SectionsGaronne = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(SectionsGaronne, [4, 11]) +bordGaucheDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(bordGaucheDomaine, [127, 30, 31, 33]) +bordDroiteDomaine = geompy.CreateGroup(HYDRO_garonne_1, geompy.ShapeType["EDGE"]) +geompy.UnionIDs(bordDroiteDomaine, [14, 16, 18, 20, 22, 24]) + +# --- publications dans l'étude +geompy.addToStudyInFather( HYDRO_garonne_1, riveGauche, 'riveGauche' ) +geompy.addToStudyInFather( HYDRO_garonne_1, litMineur, 'litMineur' ) +geompy.addToStudyInFather( HYDRO_garonne_1, riveDroite, 'riveDroite' ) +geompy.addToStudyInFather( HYDRO_garonne_1, aval, 'aval' ) +geompy.addToStudyInFather( HYDRO_garonne_1, amont, 'amont' ) +geompy.addToStudyInFather( HYDRO_garonne_1, SectionsGaronne, 'SectionsGaronne' ) +geompy.addToStudyInFather( HYDRO_garonne_1, bordGaucheDomaine, 'bordGaucheDomaine' ) +geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' ) + +# --- basic properties control: edges length, surfaces + +controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061) +controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388) +controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615) + +#---------------------- +# --- Meshing +#---------------------- + +med_file = r'/tmp/garonne_1.med' +try: + os.remove(med_file) +except OSError: + pass + + +import SMESH, SALOMEDS +from salome.smesh import smeshBuilder +from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats + +smesh = smeshBuilder.New(theStudy) + +# --- algorithms and hypothesis +garonne_1 = smesh.Mesh(HYDRO_garonne_1) + +NETGEN_2D = garonne_1.Triangle(algo=smeshBuilder.NETGEN_1D2D) +NETGEN_2D_Parameters = NETGEN_2D.Parameters() +NETGEN_2D_Parameters.SetMaxSize( 200 ) +NETGEN_2D_Parameters.SetSecondOrder( 0 ) +NETGEN_2D_Parameters.SetOptimize( 1 ) +NETGEN_2D_Parameters.SetFineness( 4 ) +NETGEN_2D_Parameters.SetMinSize( 50 ) +NETGEN_2D_Parameters.SetUseSurfaceCurvature( 1 ) +NETGEN_2D_Parameters.SetFuseEdges( 1 ) +NETGEN_2D_Parameters.SetQuadAllowed( 0 ) + +algo2D_litMineur = garonne_1.Quadrangle(algo=smeshBuilder.QUAD_MA_PROJ,geom=litMineur) +algo1D_litMineur = garonne_1.Segment(geom=litMineur) +hypo1D_litMineur = algo1D_litMineur.LocalLength(100,None,1e-07) +subMesh_litMineur = algo1D_litMineur.GetSubMesh() +smesh.SetName(subMesh_litMineur, "litMineur") + +algo1D_SectionsGaronne = garonne_1.Segment(geom=SectionsGaronne) +hypo1D_SectionsGaronne = algo1D_SectionsGaronne.NumberOfSegments(8) +hypo1D_SectionsGaronne.SetDistrType( 0 ) +subMesh_SectionsGaronne = algo1D_SectionsGaronne.GetSubMesh() +smesh.SetName(subMesh_SectionsGaronne, "SectionsGaronne") + +isDone = garonne_1.SetMeshOrder( [ [ subMesh_SectionsGaronne, subMesh_litMineur ] ]) + +# --- compute mesh +isDone = garonne_1.Compute() +isDone = garonne_1.SplitQuadObject( garonne_1, 1 ) +isDone = garonne_1.ReorientObject( garonne_1 ) + +# --- geometrical groups of edges +garonne_1_litMineur_Outer_1 = garonne_1.GroupOnGeom(garonne_1_litMineur_Outer,'garonne_1_litMineur_Outer',SMESH.EDGE) +garonne_1_domaineEtendu_Outer_1 = garonne_1.GroupOnGeom(garonne_1_domaineEtendu_Outer,'garonne_1_domaineEtendu_Outer',SMESH.EDGE) +aval_1 = garonne_1.GroupOnGeom(aval,'aval',SMESH.EDGE) +amont_1 = garonne_1.GroupOnGeom(amont,'amont',SMESH.EDGE) +bordGaucheDomaine_1 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.EDGE) +bordDroiteDomaine_1 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.EDGE) +SectionsGaronne_2 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.EDGE) + +# --- geometrical groups of faces +riveGauche_1 = garonne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.FACE) +litMineur_2 = garonne_1.GroupOnGeom(litMineur,'litMineur',SMESH.FACE) +riveDroite_1 = garonne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.FACE) + +# --- geometrical groups of nodes +garonne_1_litMineur_Outer_2 = garonne_1.GroupOnGeom(garonne_1_litMineur_Outer,'garonne_1_litMineur_Outer',SMESH.NODE) +garonne_1_domaineEtendu_Outer_2 = garonne_1.GroupOnGeom(garonne_1_domaineEtendu_Outer,'garonne_1_domaineEtendu_Outer',SMESH.NODE) +riveGauche_2 = garonne_1.GroupOnGeom(riveGauche,'riveGauche',SMESH.NODE) +litMineur_3 = garonne_1.GroupOnGeom(litMineur,'litMineur',SMESH.NODE) +riveDroite_2 = garonne_1.GroupOnGeom(riveDroite,'riveDroite',SMESH.NODE) +aval_2 = garonne_1.GroupOnGeom(aval,'aval',SMESH.NODE) +amont_2 = garonne_1.GroupOnGeom(amont,'amont',SMESH.NODE) +bordGaucheDomaine_2 = garonne_1.GroupOnGeom(bordGaucheDomaine,'bordGaucheDomaine',SMESH.NODE) +bordDroiteDomaine_2 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine',SMESH.NODE) +SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE) + +garonne_1.SetAutoColor( 1 ) +garonne_1.ExportMED( med_file, 0, SMESH.MED_V2_2, 1, None ,1) + +controlMeshStats(garonne_1, 3888, 475, 7597) +controlSubMeshStats(litMineur_2, 2384) +controlSubMeshStats(riveDroite_1, 2342) +controlSubMeshStats(riveGauche_1, 2871) + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) + +#---------------------- +# --- Z interpolation with HYDRO +#---------------------- + +from salome.hydrotools.interpolZ import interpolZ, createZfield2 +from salome.hydrotools.controls import controlStatZ + +# --- case name in HYDRO +nomCas = 'garonne_1' + +# --- med file 2D(x,y) of the case produced by SMESH +fichierMaillage = med_file + +# --- dictionary [med group name] = region name +dicoGroupeRegion= dict(litMineur = 'garonne_1_litMineur', + riveDroite = 'garonne_1_riveDroite', + riveGauche = 'garonne_1_riveGauche', + ) +# --- value to use for Z when the node is not in a region (used to detect problems) +zUndef = 90 + +# --- Z interpolation on the bathymety/altimetry on the mesh nodes +statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef) +#print statz +refstatz = {'riveDroite': (10.88, 32.61, 24.17, 5.12, 17.57, 31.33, 0.2), + 'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.2), + 'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)} +controlStatZ(statz, refstatz) + +# --- add a field on nodes of type double with z values, named "BOTTOM" +createZfield2(fichierMaillage) + +# --- create a field on nodes of type double with srtickler coefficient values, named "BOTTOM_FRICTION" +from salome.hydrotools.interpolS import assignStrickler + +assignStrickler(nomCas, '/tmp/garonne_1F.med', '/tmp/garonne_1S.med') diff --git a/src/HYDROData/HYDROData_LandCoverMap.cxx b/src/HYDROData/HYDROData_LandCoverMap.cxx index c766e5ca..18eaeee8 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.cxx +++ b/src/HYDROData/HYDROData_LandCoverMap.cxx @@ -1084,7 +1084,7 @@ TopoDS_Face HYDROData_LandCoverMap::FindByPoint( const gp_Pnt2d& thePoint, QStri void Dump( const QString& theName, const QStringList& theList, QStringList& theLines ) { - theLines.append( QString( "%1 = QStringList()" ).arg( theName ) ); + theLines.append( QString( "%1 = []" ).arg( theName ) ); foreach( QString anItem, theList ) theLines.append( QString( "%1.append( u\"%2\" )" ).arg( theName ).arg( anItem ) ); } @@ -1111,13 +1111,15 @@ QStringList HYDROData_LandCoverMap::DumpToPython( const QString& thePyScri HYDROData_Document::Document( myLab )->CollectQGISValues( anAttr, anAttrValues, aTypes ); ExportDBF( aDbfFileName, anAttr, anAttrValues, aTypes ); - aResList << QString( "%1.ImportSHP( '%2' )" ). + aResList << QString( "if not(%1.ImportSHP( '%2' )):" ). arg( aName ).arg( QFileInfo( aShpFileName ).fileName() ); + aResList << QString( " raise ValueError('problem while loading LandCoverMap shape')" ); Dump( "attr_values", anAttrValues, aResList ); Dump( "types", aTypes, aResList ); - aResList << QString( "%1.ImportDBF( '%2', '%3', attr_values, types )" ). + aResList << QString( "if (%1.ImportDBF( '%2', '%3', attr_values, types ) != %1.DBFStatus_OK):" ). arg( aName ).arg( QFileInfo( aDbfFileName ).fileName() ).arg( anAttr ); + aResList << QString( " raise ValueError('problem while loading LandCoverMap data base')" ); return aResList; } -- 2.30.2