wolfhece 2.2.38__py3-none-any.whl → 2.2.39__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 (49) hide show
  1. wolfhece/Coordinates_operations.py +5 -0
  2. wolfhece/GraphNotebook.py +72 -1
  3. wolfhece/GraphProfile.py +1 -1
  4. wolfhece/MulticriteriAnalysis.py +1579 -0
  5. wolfhece/PandasGrid.py +62 -1
  6. wolfhece/PyCrosssections.py +194 -43
  7. wolfhece/PyDraw.py +891 -73
  8. wolfhece/PyGui.py +913 -72
  9. wolfhece/PyGuiHydrology.py +528 -74
  10. wolfhece/PyPalette.py +26 -4
  11. wolfhece/PyParams.py +33 -0
  12. wolfhece/PyPictures.py +2 -2
  13. wolfhece/PyVertex.py +25 -0
  14. wolfhece/PyVertexvectors.py +94 -28
  15. wolfhece/PyWMS.py +52 -36
  16. wolfhece/acceptability/acceptability.py +15 -8
  17. wolfhece/acceptability/acceptability_gui.py +507 -360
  18. wolfhece/acceptability/func.py +80 -183
  19. wolfhece/apps/version.py +1 -1
  20. wolfhece/compare_series.py +480 -0
  21. wolfhece/drawing_obj.py +12 -1
  22. wolfhece/hydrology/Catchment.py +228 -162
  23. wolfhece/hydrology/Internal_variables.py +43 -2
  24. wolfhece/hydrology/Models_characteristics.py +69 -67
  25. wolfhece/hydrology/Optimisation.py +893 -182
  26. wolfhece/hydrology/PyWatershed.py +267 -165
  27. wolfhece/hydrology/SubBasin.py +185 -140
  28. wolfhece/hydrology/cst_exchanges.py +76 -1
  29. wolfhece/hydrology/forcedexchanges.py +413 -49
  30. wolfhece/hydrology/read.py +65 -5
  31. wolfhece/hydrometry/kiwis.py +14 -7
  32. wolfhece/insyde_be/INBE_func.py +746 -0
  33. wolfhece/insyde_be/INBE_gui.py +1776 -0
  34. wolfhece/insyde_be/__init__.py +3 -0
  35. wolfhece/interpolating_raster.py +366 -0
  36. wolfhece/irm_alaro.py +1457 -0
  37. wolfhece/irm_qdf.py +889 -57
  38. wolfhece/lifewatch.py +6 -3
  39. wolfhece/picc.py +124 -8
  40. wolfhece/pyLandUseFlanders.py +146 -0
  41. wolfhece/pydownloader.py +2 -1
  42. wolfhece/pywalous.py +225 -31
  43. wolfhece/toolshydrology_dll.py +149 -0
  44. wolfhece/wolf_array.py +63 -25
  45. {wolfhece-2.2.38.dist-info → wolfhece-2.2.39.dist-info}/METADATA +3 -1
  46. {wolfhece-2.2.38.dist-info → wolfhece-2.2.39.dist-info}/RECORD +49 -40
  47. {wolfhece-2.2.38.dist-info → wolfhece-2.2.39.dist-info}/WHEEL +0 -0
  48. {wolfhece-2.2.38.dist-info → wolfhece-2.2.39.dist-info}/entry_points.txt +0 -0
  49. {wolfhece-2.2.38.dist-info → wolfhece-2.2.39.dist-info}/top_level.txt +0 -0
@@ -151,6 +151,11 @@ def reproject_and_resample_raster(input_raster_path:str, output_raster_path:str,
151
151
  # Transform the origin and the limits into the new projection 'Lambert 72'
152
152
  Orig_out = transform_coordinates(Orig, inputEPSG=input_srs, outputEPSG=output_srs)
153
153
 
154
+ if xRes is None or xRes <= 0:
155
+ xRes = xres
156
+ if yRes is None or yRes <= 0:
157
+ yRes = yres
158
+
154
159
  # Round each coordinate to the nearest multiple of the wanted resolution
155
160
  Orig_out[:,0] = np.round(Orig_out[:,0]/xRes)*xRes
156
161
  Orig_out[:,1] = np.round(Orig_out[:,1]/yRes)*yRes
wolfhece/GraphNotebook.py CHANGED
@@ -130,6 +130,10 @@ class PlotCS(PlotPanel):
130
130
  curs=5000
131
131
  self.slidergenhor = wx.Slider(self, wx.ID_ANY, curs, 0, 10000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL,name='sliderhor' )
132
132
  self.slidergenver = wx.Slider(self, wx.ID_ANY, curs, 0, 10000, wx.DefaultPosition, wx.DefaultSize, wx.SL_VERTICAL,name='sliderver' )
133
+
134
+ self.slidergenhor.SetToolTip(_("To shift Horizontal position of the section"))
135
+ self.slidergenver.SetToolTip(_("To shift Vertical position of the section"))
136
+
133
137
  self.sizer.Add(self.slidergenhor,0,wx.EXPAND)
134
138
  self.sizerfig.Add(self.slidergenver,0,wx.EXPAND)
135
139
 
@@ -140,6 +144,10 @@ class PlotCS(PlotPanel):
140
144
  curs = 0
141
145
  self.sliderleft = wx.Slider(self, wx.ID_ANY, curs, 0, 10000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL,name='sliderleft' )
142
146
  self.txtleft = wx.TextCtrl( self, wx.ID_ANY, str(curs), wx.DefaultPosition, wx.DefaultSize, style=wx.TE_CENTER|wx.TE_PROCESS_ENTER,name='textleft' )
147
+
148
+ self.sliderleft.SetToolTip(_("To shift Left bank position of the section"))
149
+ self.txtleft.SetToolTip(_("Curvilinear left bank position of the section [m]"))
150
+
143
151
  self.sizerslider1.Add( self.sliderleft, 1, wx.EXPAND)
144
152
  self.sizerslider1.Add( self.txtleft, 0, wx.EXPAND)
145
153
  self.sizerposbank.Add(self.sizerslider1,1,wx.EXPAND)
@@ -148,6 +156,10 @@ class PlotCS(PlotPanel):
148
156
  curs = 0
149
157
  self.sliderbed = wx.Slider(self, wx.ID_ANY, curs, 0, 10000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL,name='sliderbed' )
150
158
  self.txtbed = wx.TextCtrl( self, wx.ID_ANY, str(curs), wx.DefaultPosition, wx.DefaultSize, style=wx.TE_CENTER|wx.TE_PROCESS_ENTER,name='textbed' )
159
+
160
+ self.sliderbed.SetToolTip(_("To shift Bed position of the section"))
161
+ self.txtbed.SetToolTip(_("Curvilinear bed position of the section [m]"))
162
+
151
163
  self.sizerslider2.Add( self.sliderbed, 1, wx.EXPAND)
152
164
  self.sizerslider2.Add( self.txtbed, 0, wx.EXPAND)
153
165
  self.sizerposbank.Add(self.sizerslider2, 1, wx.EXPAND)
@@ -156,13 +168,30 @@ class PlotCS(PlotPanel):
156
168
  curs = 0
157
169
  self.sliderright = wx.Slider(self, wx.ID_ANY, curs, 0, 10000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL,name='sliderright' )
158
170
  self.txtright = wx.TextCtrl( self, wx.ID_ANY, str(curs), wx.DefaultPosition, wx.DefaultSize, style=wx.TE_CENTER|wx.TE_PROCESS_ENTER,name='textright' )
171
+
172
+ self.sliderright.SetToolTip(_("To shift Right bank position of the section"))
173
+ self.txtright.SetToolTip(_("Curvilinear right bank position of the section [m]"))
174
+
159
175
  self.sizerslider3.Add( self.sliderright, 1, wx.EXPAND)
160
176
  self.sizerslider3.Add( self.txtright, 0, wx.EXPAND)
161
177
  self.sizerposbank.Add(self.sizerslider3, 1, wx.EXPAND)
162
178
 
179
+ self._sizer_shift_general = wx.BoxSizer(wx.HORIZONTAL)
180
+ self._txt_zdatum = wx.TextCtrl(self, wx.ID_ANY, str(0), wx.DefaultPosition, wx.DefaultSize, style=wx.TE_CENTER|wx.TE_PROCESS_ENTER,name='textzdatum' )
181
+ self._txt_zdatum.SetToolTip(_("Vertical shifting position of the section [m]"))
182
+ self._txt_sdatum = wx.TextCtrl(self, wx.ID_ANY, str(0), wx.DefaultPosition, wx.DefaultSize, style=wx.TE_CENTER|wx.TE_PROCESS_ENTER,name='textsdatum' )
183
+ self._txt_sdatum.SetToolTip(_("Horizontal shifting position of the section [m]"))
184
+
185
+ self._sizer_shift_general.Add(self._txt_sdatum, 1, wx.EXPAND)
186
+ self._sizer_shift_general.Add(self._txt_zdatum, 1, wx.EXPAND)
187
+
188
+ self.sizer.Add(self._sizer_shift_general, 0, wx.EXPAND)
189
+
163
190
  self.txtbed.Bind(wx.EVT_TEXT_ENTER,self.movebanksslider)
164
191
  self.txtleft.Bind(wx.EVT_TEXT_ENTER,self.movebanksslider)
165
192
  self.txtright.Bind(wx.EVT_TEXT_ENTER,self.movebanksslider)
193
+ self._txt_zdatum.Bind(wx.EVT_TEXT_ENTER,self.movegenslider)
194
+ self._txt_sdatum.Bind(wx.EVT_TEXT_ENTER,self.movegenslider)
166
195
 
167
196
  self.sliderleft.Bind(wx.EVT_SLIDER,self.movebanksslider)
168
197
  self.sliderbed.Bind(wx.EVT_SLIDER,self.movebanksslider)
@@ -190,7 +219,7 @@ class PlotCS(PlotPanel):
190
219
 
191
220
  if self.wx_exists:
192
221
 
193
- sl,sb,sr,yl,yb,yr = self.mycs.get_sz_banksbed()
222
+ sl,sb,sr,yl,yb,yr, sld,srd,yld,yrd = self.mycs.get_sz_banksbed()
194
223
  length = self.mycs.length3D
195
224
 
196
225
  if self.mycs.bankleft is not None:
@@ -214,6 +243,16 @@ class PlotCS(PlotPanel):
214
243
  self.sliderright.SetValue(10000)
215
244
  self.txtright.SetLabelText(str(self.mycs.length3D))
216
245
 
246
+ if self.mycs.add_zdatum:
247
+ self._txt_zdatum.SetValue(str(self.mycs.zdatum))
248
+ else:
249
+ self._txt_zdatum.SetValue(str(0))
250
+
251
+ if self.mycs.add_sdatum:
252
+ self._txt_sdatum.SetValue(str(self.mycs.sdatum*10000./self.mycs.length3D))
253
+ else:
254
+ self._txt_sdatum.SetValue(str(0))
255
+
217
256
  if plot:
218
257
  self.plot_cs()
219
258
 
@@ -228,9 +267,35 @@ class PlotCS(PlotPanel):
228
267
  if id=='sliderhor':
229
268
  cs.sdatum = float(self.slidergenhor.Value-5000)/10000.*length
230
269
  cs.add_sdatum=True
270
+ self._txt_sdatum.SetValue(str(cs.sdatum))
271
+
231
272
  elif id=='sliderver':
232
273
  cs.zdatum = -float(self.slidergenver.Value-5000)/1000.
233
274
  cs.add_zdatum=True
275
+ self._txt_zdatum.SetValue(str(cs.zdatum))
276
+
277
+ elif id=='textzdatum':
278
+ try:
279
+ cs.zdatum = float(self._txt_zdatum.Value)
280
+ cs.add_zdatum=True
281
+ self.slidergenver.SetValue(int(cs.zdatum*1000.)+ 5000)
282
+ except ValueError:
283
+ self._txt_zdatum.SetValue(str(cs.zdatum))
284
+ logging.error("Invalid value for zdatum: %s", self._txt_zdatum.Value)
285
+ return
286
+
287
+ elif id=='textsdatum':
288
+ try:
289
+ cs.sdatum = float(self._txt_sdatum.Value)
290
+ cs.add_sdatum=True
291
+ self.slidergenhor.SetValue(int(cs.sdatum/length*10000.)+ 5000)
292
+ except ValueError:
293
+ self._txt_sdatum.SetValue(str(cs.sdatum))
294
+ logging.error("Invalid value for sdatum: %s", self._txt_sdatum.Value)
295
+ return
296
+
297
+ if cs.prepared:
298
+ cs.prepare()
234
299
 
235
300
  self.plot_cs()
236
301
 
@@ -303,17 +368,21 @@ class PlotCS(PlotPanel):
303
368
  if cs.down is not None and cs.down is not cs:
304
369
  cs.down._plot_only_cs(fig=fig, ax=ax, label=cs.down.myname, centerx=sb)
305
370
 
371
+ fig.canvas.draw()
372
+
306
373
  cursup=1
307
374
  if cursup in self.figsuppl.keys():
308
375
  fig=self.figsuppl[cursup]['figure']
309
376
  ax=self.figsuppl[cursup]['ax']
310
377
  cs.plot_cs(fig=fig, ax=ax, linked_arrays=self.linked_arrays)
378
+ fig.canvas.draw()
311
379
 
312
380
  cursup=2
313
381
  if cursup in self.figsuppl.keys():
314
382
  fig=self.figsuppl[cursup]['figure']
315
383
  ax=self.figsuppl[cursup]['ax']
316
384
  cs.plot_cs(fig=fig,ax=ax,forceaspect=False, linked_arrays=self.linked_arrays)
385
+ fig.canvas.draw()
317
386
 
318
387
  cursup=3
319
388
  if cursup in self.figsuppl.keys():
@@ -326,6 +395,7 @@ class PlotCS(PlotPanel):
326
395
  cs.up._plot_only_cs(fig=fig,ax=ax,style='dashdot',label=cs.up.myname,centerx=sl+(sr-sl)/2.)
327
396
  if cs.down is not None and cs.down is not cs:
328
397
  cs.down._plot_only_cs(fig=fig,ax=ax,label=cs.down.myname,centerx=sl+(sr-sl)/2.)
398
+ fig.canvas.draw()
329
399
 
330
400
  cursup=4
331
401
  if cursup in self.figsuppl.keys():
@@ -336,6 +406,7 @@ class PlotCS(PlotPanel):
336
406
  cs.up._plot_only_cs(fig=fig,ax=ax,style='dashdot',label=cs.up.myname,centerx=sl+(sr-sl)/2.,centery=yb)
337
407
  if cs.down is not None and cs.down is not cs:
338
408
  cs.down._plot_only_cs(fig=fig,ax=ax,label=cs.down.myname,centerx=sl+(sr-sl)/2.,centery=yb)
409
+ fig.canvas.draw()
339
410
 
340
411
  def plot_up(self,event):
341
412
 
wolfhece/GraphProfile.py CHANGED
@@ -507,7 +507,7 @@ class PlotCSAll(ProfilePanel):
507
507
  self.txthor.SetLabel("{0:.3f}".format(0))
508
508
  self.txtver.SetLabel("{0:.3f}".format(0))
509
509
 
510
- sl,sb,sr,yl,yb,yr = self.mycs.get_sz_banksbed()
510
+ sl,sb,sr,yl,yb,yr, sld, srd, yld, yrd = self.mycs.get_sz_banksbed()
511
511
 
512
512
  # Banks (sliders positions and text control values).
513
513
  if self.mycs.bankleft is not None: