wolfhece 1.8.13__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. wolfhece/GraphNotebook.py +0 -1
  2. wolfhece/PyCrosssections.py +591 -5
  3. wolfhece/PyDraw.py +1151 -413
  4. wolfhece/PyGui.py +2 -4
  5. wolfhece/PyParams.py +1515 -852
  6. wolfhece/PyVertex.py +73 -73
  7. wolfhece/PyVertexvectors.py +226 -808
  8. wolfhece/RatingCurve.py +19 -6
  9. wolfhece/apps/wolf2D.py +11 -0
  10. wolfhece/apps/wolfcompare2Darrays.py +51 -22
  11. wolfhece/bernoulli/NetworkOpenGL.py +337 -341
  12. wolfhece/drawing_obj.py +25 -0
  13. wolfhece/hydrology/Catchment.py +77 -77
  14. wolfhece/hydrology/Optimisation.py +206 -53
  15. wolfhece/hydrology/PostProcessHydrology.py +22 -22
  16. wolfhece/hydrology/SubBasin.py +17 -17
  17. wolfhece/hydrology/constant.py +4 -0
  18. wolfhece/hydrology/cst_exchanges.py +2 -1
  19. wolfhece/lazviewer/processing/estimate_normals/estimate_normals.cp310-win_amd64.pyd +0 -0
  20. wolfhece/lazviewer/vfuncs/vfuncs.cp310-win_amd64.pyd +0 -0
  21. wolfhece/libs/WolfDll.dll +0 -0
  22. wolfhece/libs/wolfogl.cp310-win_amd64.pyd +0 -0
  23. wolfhece/libs/wolfpy.cp310-win_amd64.pyd +0 -0
  24. wolfhece/mesh2d/wolf2dprev.py +4 -4
  25. wolfhece/multiprojects.py +13 -13
  26. wolfhece/pylogging.py +1 -1
  27. wolfhece/pyviews.py +23 -23
  28. wolfhece/wolf_array.py +69 -152
  29. wolfhece/wolf_texture.py +39 -16
  30. wolfhece/wolfresults_2D.py +1 -1
  31. {wolfhece-1.8.13.dist-info → wolfhece-2.0.0.dist-info}/METADATA +3 -2
  32. {wolfhece-1.8.13.dist-info → wolfhece-2.0.0.dist-info}/RECORD +37 -33
  33. wolfhece/apps/wolfgpu.py +0 -19
  34. /wolfhece/lazviewer/processing/estimate_normals/{estimate_normals.pyd → estimate_normals.cp39-win_amd64.pyd} +0 -0
  35. /wolfhece/lazviewer/vfuncs/{vfuncs.pyd → vfuncs.cp39-win_amd64.pyd} +0 -0
  36. {wolfhece-1.8.13.dist-info → wolfhece-2.0.0.dist-info}/LICENCE +0 -0
  37. {wolfhece-1.8.13.dist-info → wolfhece-2.0.0.dist-info}/WHEEL +0 -0
  38. {wolfhece-1.8.13.dist-info → wolfhece-2.0.0.dist-info}/top_level.txt +0 -0
wolfhece/PyVertex.py CHANGED
@@ -16,7 +16,7 @@ import re
16
16
  import logging
17
17
  from scipy.spatial import KDTree
18
18
 
19
- from .PyParams import Wolf_Param
19
+ from .PyParams import Wolf_Param, key_Param, Type_Param
20
20
  from .PyTranslate import _
21
21
  from .drawing_obj import Element_To_Draw
22
22
 
@@ -208,89 +208,89 @@ class cloudproperties:
208
208
  if 'Draw' in curdict.keys():
209
209
  keysactive = curdict['Draw'].keys()
210
210
  if 'Color' in keysactive:
211
- self.color = getIfromRGB(curdict['Draw']['Color']['value'])
211
+ self.color = getIfromRGB(curdict['Draw']['Color'][key_Param.VALUE])
212
212
  if 'Width' in keysactive:
213
- self.width = int(curdict['Draw']['Width']['value'])
213
+ self.width = int(curdict['Draw']['Width'][key_Param.VALUE])
214
214
  if 'Style' in keysactive:
215
- self.style = int(curdict['Draw']['Style']['value'])
215
+ self.style = int(curdict['Draw']['Style'][key_Param.VALUE])
216
216
  if 'Filled' in keysactive:
217
- self.filled = bool(curdict['Draw']['Filled']['value'])
217
+ self.filled = bool(curdict['Draw']['Filled'][key_Param.VALUE])
218
218
  if 'Transparent' in keysactive:
219
- self.transparent = bool(curdict['Draw']['Transparent']['value'])
219
+ self.transparent = bool(curdict['Draw']['Transparent'][key_Param.VALUE])
220
220
  if 'Alpha' in keysactive:
221
- self.alpha = int(curdict['Draw']['Alpha']['value'])
221
+ self.alpha = int(curdict['Draw']['Alpha'][key_Param.VALUE])
222
222
  if 'Flash' in keysactive:
223
- self.flash = bool(curdict['Draw']['Flash']['value'])
223
+ self.flash = bool(curdict['Draw']['Flash'][key_Param.VALUE])
224
224
 
225
225
  if 'Legend' in curdict.keys():
226
226
  keysactive = curdict['Legend'].keys()
227
227
  if 'Underlined' in keysactive:
228
- self.legendunderlined = bool(curdict['Legend']['Underlined']['value'])
228
+ self.legendunderlined = bool(curdict['Legend']['Underlined'][key_Param.VALUE])
229
229
  if 'Bold' in keysactive:
230
- self.legendbold = bool(curdict['Legend']['Bold']['value'])
230
+ self.legendbold = bool(curdict['Legend']['Bold'][key_Param.VALUE])
231
231
  if 'Font name' in keysactive:
232
- self.legendfontname = str(curdict['Legend']['Font name']['value'])
232
+ self.legendfontname = str(curdict['Legend']['Font name'][key_Param.VALUE])
233
233
  if 'Font size' in keysactive:
234
- self.legendfontsize = int(curdict['Legend']['Font size']['value'])
234
+ self.legendfontsize = int(curdict['Legend']['Font size'][key_Param.VALUE])
235
235
  if 'Color' in keysactive:
236
- self.legendcolor = getIfromRGB(curdict['Legend']['Color']['value'])
236
+ self.legendcolor = getIfromRGB(curdict['Legend']['Color'][key_Param.VALUE])
237
237
  if 'Italic' in keysactive:
238
- self.legenditalic = bool(curdict['Legend']['Italic']['value'])
238
+ self.legenditalic = bool(curdict['Legend']['Italic'][key_Param.VALUE])
239
239
  if 'relative Position' in keysactive:
240
- self.legendrelpos = int(curdict['Legend']['relative Position']['value'])
240
+ self.legendrelpos = int(curdict['Legend']['relative Position'][key_Param.VALUE])
241
241
  if 'Text' in keysactive:
242
- self.legendtext = str(curdict['Legend']['Text']['value'])
242
+ self.legendtext = str(curdict['Legend']['Text'][key_Param.VALUE])
243
243
  if 'Visible' in keysactive:
244
- self.legendvisible = bool(curdict['Legend']['Visible']['value'])
244
+ self.legendvisible = bool(curdict['Legend']['Visible'][key_Param.VALUE])
245
245
  if 'X' in keysactive:
246
- self.legendx = float(curdict['Legend']['X']['value'])
246
+ self.legendx = float(curdict['Legend']['X'][key_Param.VALUE])
247
247
  if 'Y' in keysactive:
248
- self.legendy = float(curdict['Legend']['Y']['value'])
248
+ self.legendy = float(curdict['Legend']['Y'][key_Param.VALUE])
249
249
 
250
250
  curdict = self.myprops.myparams
251
251
  if 'Draw' in curdict.keys():
252
252
  keysactive = curdict['Draw'].keys()
253
253
  if 'Color' in keysactive:
254
254
  self.color = getIfromRGB(
255
- curdict['Draw']['Color']['value'].replace('(', '').replace(')', '').split(', '))
255
+ curdict['Draw']['Color'][key_Param.VALUE].replace('(', '').replace(')', '').split(', '))
256
256
  if 'Width' in keysactive:
257
- self.width = int(curdict['Draw']['Width']['value'])
257
+ self.width = int(curdict['Draw']['Width'][key_Param.VALUE])
258
258
  if 'Style' in keysactive:
259
- self.style = int(curdict['Draw']['Style']['value'])
259
+ self.style = int(curdict['Draw']['Style'][key_Param.VALUE])
260
260
  if 'Filled' in keysactive:
261
- self.filled = bool(curdict['Draw']['Filled']['value'])
261
+ self.filled = bool(curdict['Draw']['Filled'][key_Param.VALUE])
262
262
  if 'Transparent' in keysactive:
263
- self.transparent = bool(curdict['Draw']['Transparent']['value'])
263
+ self.transparent = bool(curdict['Draw']['Transparent'][key_Param.VALUE])
264
264
  if 'Alpha' in keysactive:
265
- self.alpha = int(curdict['Draw']['Alpha']['value'])
265
+ self.alpha = int(curdict['Draw']['Alpha'][key_Param.VALUE])
266
266
  if 'Flash' in keysactive:
267
- self.flash = bool(curdict['Draw']['Flash']['value'])
267
+ self.flash = bool(curdict['Draw']['Flash'][key_Param.VALUE])
268
268
 
269
269
  if 'Legend' in curdict.keys():
270
270
  keysactive = curdict['Legend'].keys()
271
271
  if 'Underlined' in keysactive:
272
- self.legendunderlined = bool(curdict['Legend']['Underlined']['value'])
272
+ self.legendunderlined = bool(curdict['Legend']['Underlined'][key_Param.VALUE])
273
273
  if 'Bold' in keysactive:
274
- self.legendbold = bool(curdict['Legend']['Bold']['value'])
274
+ self.legendbold = bool(curdict['Legend']['Bold'][key_Param.VALUE])
275
275
  if 'Font name' in keysactive:
276
- self.legendfontname = str(curdict['Legend']['Font name']['value'])
276
+ self.legendfontname = str(curdict['Legend']['Font name'][key_Param.VALUE])
277
277
  if 'Font size' in keysactive:
278
- self.legendfontsize = int(curdict['Legend']['Font size']['value'])
278
+ self.legendfontsize = int(curdict['Legend']['Font size'][key_Param.VALUE])
279
279
  if 'Color' in keysactive:
280
280
  self.legendcolor = getIfromRGB(
281
- curdict['Legend']['Color']['value'].replace('(', '').replace(')', '').split(', '))
281
+ curdict['Legend']['Color'][key_Param.VALUE].replace('(', '').replace(')', '').split(', '))
282
282
  if 'Italic' in keysactive:
283
- self.legenditalic = bool(curdict['Legend']['Italic']['value'])
283
+ self.legenditalic = bool(curdict['Legend']['Italic'][key_Param.VALUE])
284
284
  if 'relative Position' in keysactive:
285
- self.legendrelpos = int(curdict['Legend']['relative Position']['value'])
285
+ self.legendrelpos = int(curdict['Legend']['relative Position'][key_Param.VALUE])
286
286
  if 'Text' in keysactive:
287
- self.legendtext = str(curdict['Legend']['Text']['value'])
287
+ self.legendtext = str(curdict['Legend']['Text'][key_Param.VALUE])
288
288
  if 'Visible' in keysactive:
289
- self.legendvisible = bool(curdict['Legend']['Visible']['value'])
289
+ self.legendvisible = bool(curdict['Legend']['Visible'][key_Param.VALUE])
290
290
  if 'X' in keysactive:
291
- self.legendx = float(curdict['Legend']['X']['value'])
291
+ self.legendx = float(curdict['Legend']['X'][key_Param.VALUE])
292
292
  if 'Y' in keysactive:
293
- self.legendy = float(curdict['Legend']['Y']['value'])
293
+ self.legendy = float(curdict['Legend']['Y'][key_Param.VALUE])
294
294
 
295
295
  self.parent.forceupdategl = True
296
296
 
@@ -303,25 +303,25 @@ class cloudproperties:
303
303
  self.myprops.loadme.Disable()
304
304
  self.myprops.reloadme.Disable()
305
305
 
306
- self.myprops.addparam('Draw', 'Color', getRGBfromI(0), 'Color', 'Drawing color', whichdict='Default')
307
- self.myprops.addparam('Draw', 'Width', 10, 'Float', 'Drawing width', whichdict='Default')
308
- self.myprops.addparam('Draw', 'Style', 0, 'Integer', 'Drawing style', whichdict='Default')
309
- self.myprops.addparam('Draw', 'Filled', False, 'Logical', '', whichdict='Default')
310
- self.myprops.addparam('Draw', 'Transparent', False, 'Logical', '', whichdict='Default')
311
- self.myprops.addparam('Draw', 'Alpha', 0, 'Integer', 'Transparent intensity', whichdict='Default')
312
- self.myprops.addparam('Draw', 'Flash', False, 'Logical', '', whichdict='Default')
313
-
314
- self.myprops.addparam('Legend', 'Visible', False, 'Logical', '', whichdict='Default')
315
- self.myprops.addparam('Legend', 'Text', '', 'String', '', whichdict='Default')
316
- self.myprops.addparam('Legend', 'relative Position', 5, 'Integer', '', whichdict='Default')
306
+ self.myprops.addparam('Draw', 'Color', getRGBfromI(0), Type_Param.Color, 'Drawing color', whichdict='Default')
307
+ self.myprops.addparam('Draw', 'Width', 10, Type_Param.Float, 'Drawing width', whichdict='Default')
308
+ self.myprops.addparam('Draw', 'Style', 0, Type_Param.Integer, 'Drawing style', whichdict='Default')
309
+ self.myprops.addparam('Draw', 'Filled', False, Type_Param.Logical, '', whichdict='Default')
310
+ self.myprops.addparam('Draw', 'Transparent', False, Type_Param.Logical, '', whichdict='Default')
311
+ self.myprops.addparam('Draw', 'Alpha', 0, Type_Param.Integer, 'Transparent intensity', whichdict='Default')
312
+ self.myprops.addparam('Draw', 'Flash', False, Type_Param.Logical, '', whichdict='Default')
313
+
314
+ self.myprops.addparam('Legend', 'Visible', False, Type_Param.Logical, '', whichdict='Default')
315
+ self.myprops.addparam('Legend', 'Text', '', Type_Param.String, '', whichdict='Default')
316
+ self.myprops.addparam('Legend', 'relative Position', 5, Type_Param.Integer, '', whichdict='Default')
317
317
  self.myprops.addparam('Legend', 'X', 0, 'Float', '', whichdict='Default')
318
318
  self.myprops.addparam('Legend', 'Y', 0, 'Float', '', whichdict='Default')
319
- self.myprops.addparam('Legend', 'Bold', False, 'Logical', '', whichdict='Default')
320
- self.myprops.addparam('Legend', 'Italic', False, 'Logical', '', whichdict='Default')
321
- self.myprops.addparam('Legend', 'Font name', 'Arial', 'String', '', whichdict='Default')
322
- self.myprops.addparam('Legend', 'Font size', 10, 'Integer', '', whichdict='Default')
323
- self.myprops.addparam('Legend', 'Color', getRGBfromI(0), 'Color', '', whichdict='Default')
324
- self.myprops.addparam('Legend', 'Underlined', False, 'Logical', '', whichdict='Default')
319
+ self.myprops.addparam('Legend', 'Bold', False, Type_Param.Logical, '', whichdict='Default')
320
+ self.myprops.addparam('Legend', 'Italic', False, Type_Param.Logical, '', whichdict='Default')
321
+ self.myprops.addparam('Legend', 'Font name', 'Arial', Type_Param.String, '', whichdict='Default')
322
+ self.myprops.addparam('Legend', 'Font size', 10, Type_Param.Integer, '', whichdict='Default')
323
+ self.myprops.addparam('Legend', 'Color', getRGBfromI(0), Type_Param.Color, '', whichdict='Default')
324
+ self.myprops.addparam('Legend', 'Underlined', False, Type_Param.Logical, '', whichdict='Default')
325
325
 
326
326
  def destroyprop(self):
327
327
  self.myprops = None
@@ -329,25 +329,25 @@ class cloudproperties:
329
329
  def show(self):
330
330
  self.defaultprop()
331
331
 
332
- self.myprops.addparam('Draw', 'Color', getRGBfromI(self.color), 'Color', 'Drawing color')
332
+ self.myprops.addparam('Draw', 'Color', getRGBfromI(self.color), Type_Param.Color, 'Drawing color')
333
333
  self.myprops.addparam('Draw', 'Width', self.width, 'Float', 'Drawing width')
334
- self.myprops.addparam('Draw', 'Style', self.style, 'Integer', 'Drawing style')
335
- self.myprops.addparam('Draw', 'Filled', self.filled, 'Logical', '')
336
- self.myprops.addparam('Draw', 'Transparent', self.transparent, 'Logical', '')
337
- self.myprops.addparam('Draw', 'Alpha', self.alpha, 'Integer', 'Transparent intensity')
338
- self.myprops.addparam('Draw', 'Flash', self.flash, 'Logical', '')
339
-
340
- self.myprops.addparam('Legend', 'Visible', self.legendvisible, 'Logical', '')
341
- self.myprops.addparam('Legend', 'Text', self.legendtext, 'String', '')
342
- self.myprops.addparam('Legend', 'relative Position', self.legendrelpos, 'Integer', '')
334
+ self.myprops.addparam('Draw', 'Style', self.style, Type_Param.Integer, 'Drawing style')
335
+ self.myprops.addparam('Draw', 'Filled', self.filled, Type_Param.Logical, '')
336
+ self.myprops.addparam('Draw', 'Transparent', self.transparent, Type_Param.Logical, '')
337
+ self.myprops.addparam('Draw', 'Alpha', self.alpha, Type_Param.Integer, 'Transparent intensity')
338
+ self.myprops.addparam('Draw', 'Flash', self.flash, Type_Param.Logical, '')
339
+
340
+ self.myprops.addparam('Legend', 'Visible', self.legendvisible, Type_Param.Logical, '')
341
+ self.myprops.addparam('Legend', 'Text', self.legendtext, Type_Param.String, '')
342
+ self.myprops.addparam('Legend', 'relative Position', self.legendrelpos, Type_Param.Integer, '')
343
343
  self.myprops.addparam('Legend', 'X', self.legendx, 'Float', '')
344
344
  self.myprops.addparam('Legend', 'Y', self.legendy, 'Float', '')
345
- self.myprops.addparam('Legend', 'Bold', self.legendbold, 'Logical', '')
346
- self.myprops.addparam('Legend', 'Italic', self.legenditalic, 'Logical', '')
347
- self.myprops.addparam('Legend', 'Font name', self.legendfontname, 'String', '')
348
- self.myprops.addparam('Legend', 'Font size', self.legendfontsize, 'Integer', '')
349
- self.myprops.addparam('Legend', 'Color', getRGBfromI(self.legendcolor), 'Color', '')
350
- self.myprops.addparam('Legend', 'Underlined', self.legendunderlined, 'Logical', '')
345
+ self.myprops.addparam('Legend', 'Bold', self.legendbold, Type_Param.Logical, '')
346
+ self.myprops.addparam('Legend', 'Italic', self.legenditalic, Type_Param.Logical, '')
347
+ self.myprops.addparam('Legend', 'Font name', self.legendfontname, Type_Param.String, '')
348
+ self.myprops.addparam('Legend', 'Font size', self.legendfontsize, Type_Param.Integer, '')
349
+ self.myprops.addparam('Legend', 'Color', getRGBfromI(self.legendcolor), Type_Param.Color, '')
350
+ self.myprops.addparam('Legend', 'Underlined', self.legendunderlined, Type_Param.Logical, '')
351
351
 
352
352
  self.myprops.Populate()
353
353
  self.myprops.Show()
@@ -638,7 +638,7 @@ class cloud_vertices(Element_To_Draw):
638
638
  self.updatebounds(newcloud=cloud)
639
639
  pass
640
640
 
641
- def plot(self, update=False):
641
+ def plot(self, update=False, *args, **kwargs):
642
642
 
643
643
  if update or self.gllist == 0 or self.forceupdategl and not self.ongoing:
644
644
  curvert: wolfvertex
@@ -745,9 +745,9 @@ class cloud_vertices(Element_To_Draw):
745
745
  self.zmax = -1.e300
746
746
 
747
747
  # if no vertice or file not present -> return
748
- if len(self.myvertices) == 0 :
748
+ if len(self.myvertices) == 0 :
749
749
  return
750
-
750
+
751
751
  xyz = self.get_xyz()
752
752
  self.xmin = np.min(xyz[:,0])
753
753
  self.xmax = np.max(xyz[:,0])