Salome HOME
move ref test data to win32/linux folders
[modules/hydro.git] / src / HYDRO_tests / reference_data / linux / lc_dump.py
1 # -*- coding: utf-8 -*-
2
3 ###
4 ### This file is generated automatically by SALOME v7.6.0 with dump python functionality
5 ###
6
7 import sys
8 import salome
9
10 salome.salome_init()
11 theStudy = salome.myStudy
12
13 import salome_notebook
14 notebook = salome_notebook.NoteBook(theStudy)
15 sys.path.insert( 0, r'D:/asl/hydro/studies')
16
17 ###
18 ### HYDRO component
19 ###
20
21 from HYDROPy import *
22 from PyQt4.QtCore import *
23 from PyQt4.QtGui import *
24
25 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() );
26
27 hydro_doc.SetLocalCS( 0, 0 )
28
29 DefStr = hydro_doc.CreateObject( KIND_STRICKLER_TABLE );
30 DefStr.SetName( "DefStr" );
31
32 DefStr.SetAttrName( "CODE_06" );
33
34 DefStr.Set( u"Zones de champs, prairies, sans cultures", 20 );
35 DefStr.SetAttrValue( u"Zones de champs, prairies, sans cultures", "511" );
36 DefStr.SetColor( u"Zones de champs, prairies, sans cultures", QColor( 255, 0, 0 ) );
37
38 DefStr.Set( u"Zones à faible urbanisation (bourg)", 9 );
39 DefStr.SetAttrValue( u"Zones à faible urbanisation (bourg)", "" );
40 DefStr.SetColor( u"Zones à faible urbanisation (bourg)", QColor( 0, 0, 255 ) );
41
42 DefStr.Set( u"Zones de champs cultivé à végétation haute", 12.5 );
43 DefStr.SetAttrValue( u"Zones de champs cultivé à végétation haute", "" );
44 DefStr.SetColor( u"Zones de champs cultivé à végétation haute", QColor( 0, 255, 0 ) );
45
46 DefStr.Set( u"Canaux artificiels en béton", 65 );
47 DefStr.SetAttrValue( u"Canaux artificiels en béton", "" );
48 DefStr.SetColor( u"Canaux artificiels en béton", QColor( 136, 136, 136 ) );
49
50 DefStr.Set( u"Canaux naturels", 35 );
51 DefStr.SetAttrValue( u"Canaux naturels", "" );
52 DefStr.SetColor( u"Canaux naturels", QColor( 255, 0, 255 ) );
53
54 DefStr.Set( u"Zones à forte urbanisation (agglomération)", 9 );
55 DefStr.SetAttrValue( u"Zones à forte urbanisation (agglomération)", "" );
56 DefStr.SetColor( u"Zones à forte urbanisation (agglomération)", QColor( 18, 52, 86 ) );
57
58 DefStr.Set( u"Zones de champs cultivé à végétation basse", 17.5 );
59 DefStr.SetAttrValue( u"Zones de champs cultivé à végétation basse", "512" );
60 DefStr.SetColor( u"Zones de champs cultivé à végétation basse", QColor( 255, 255, 0 ) );
61
62 DefStr.Set( u"Zones d'arbustes, de sous-bois", 10 );
63 DefStr.SetAttrValue( u"Zones d'arbustes, de sous-bois", "" );
64 DefStr.SetColor( u"Zones d'arbustes, de sous-bois", QColor( 0, 255, 255 ) );
65
66
67 DefStr.Update();
68
69 test_LCM = hydro_doc.CreateObject( KIND_LAND_COVER_MAP );
70 test_LCM.SetName( "test_LCM" );
71
72 attr_values = QStringList()
73 attr_values.append( u"" )
74 attr_values.append( u"" )
75 attr_values.append( u"" )
76 attr_values.append( u"512" )
77 attr_values.append( u"" )
78 attr_values.append( u"511" )
79 attr_values.append( u"" )
80 attr_values.append( u"" )
81 types = QStringList()
82 types.append( u"Canaux artificiels en béton" )
83 types.append( u"Canaux naturels" )
84 types.append( u"Zones d'arbustes, de sous-bois" )
85 types.append( u"Zones de champs cultivé à végétation basse" )
86 types.append( u"Zones de champs cultivé à végétation haute" )
87 types.append( u"Zones de champs, prairies, sans cultures" )
88 types.append( u"Zones à faible urbanisation (bourg)" )
89 types.append( u"Zones à forte urbanisation (agglomération)" )
90 test_LCM.ImportSHP( 'lc_dump.shp' )
91 test_LCM.ImportDBF( 'lc_dump.dbf', 'CODE_06', attr_values, types )
92