wolfhece 2.2.47__py3-none-any.whl → 2.2.48__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.
- wolfhece/PyDraw.py +41 -20
- wolfhece/apps/version.py +1 -1
- wolfhece/report/compare_cs_dem.py +2 -1
- wolfhece/wolf_array.py +23 -4
- {wolfhece-2.2.47.dist-info → wolfhece-2.2.48.dist-info}/METADATA +2 -2
- {wolfhece-2.2.47.dist-info → wolfhece-2.2.48.dist-info}/RECORD +9 -9
- {wolfhece-2.2.47.dist-info → wolfhece-2.2.48.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.47.dist-info → wolfhece-2.2.48.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.47.dist-info → wolfhece-2.2.48.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
|
@@ -102,8 +102,10 @@ except ImportError as e:
|
|
|
102
102
|
|
|
103
103
|
try:
|
|
104
104
|
from .dike import DikeWolf, InjectorWolf as InjectorDike
|
|
105
|
+
WOLFPYDIKE_AVAILABLE = True
|
|
105
106
|
except:
|
|
106
107
|
logging.warning(_("Missing package. Install wolfpydike module via pip."))
|
|
108
|
+
WOLFPYDIKE_AVAILABLE = False
|
|
107
109
|
|
|
108
110
|
try:
|
|
109
111
|
from .hydrometry.kiwis_wolfgui import hydrometry_wolfgui
|
|
@@ -2142,9 +2144,11 @@ class WolfMapViewer(wx.Frame):
|
|
|
2142
2144
|
myviewers3d:list[Wolf_Viewer3D]
|
|
2143
2145
|
mylazdata:list[Wolf_LAZ_Data]
|
|
2144
2146
|
mydrownings: list[Drowning_victim_Viewer]
|
|
2145
|
-
mydikes: list[DikeWolf]
|
|
2146
2147
|
mypicturecollections: list[PictureCollection]
|
|
2147
|
-
|
|
2148
|
+
|
|
2149
|
+
if WOLFPYDIKE_AVAILABLE:
|
|
2150
|
+
mydikes: list[DikeWolf]
|
|
2151
|
+
myinjectors: list[InjectorDike]
|
|
2148
2152
|
|
|
2149
2153
|
mymplfigs:list[MplFigViewer]
|
|
2150
2154
|
|
|
@@ -2180,8 +2184,11 @@ class WolfMapViewer(wx.Frame):
|
|
|
2180
2184
|
active_weir : Weir
|
|
2181
2185
|
active_laz : Wolf_LAZ_Data
|
|
2182
2186
|
active_drowning: Drowning_victim_Viewer
|
|
2183
|
-
|
|
2184
|
-
|
|
2187
|
+
|
|
2188
|
+
if WOLFPYDIKE_AVAILABLE:
|
|
2189
|
+
active_dike : DikeWolf
|
|
2190
|
+
active_injector : InjectorDike
|
|
2191
|
+
|
|
2185
2192
|
active_picturecollection: PictureCollection
|
|
2186
2193
|
active_alaro: IRM_Alaro
|
|
2187
2194
|
|
|
@@ -2406,7 +2413,9 @@ class WolfMapViewer(wx.Frame):
|
|
|
2406
2413
|
create_acceptability = self.menucreateobj.Append(wx.ID_ANY, _('Create acceptability manager...'), _('Create acceptability manager'))
|
|
2407
2414
|
create_inbe = self.menucreateobj.Append(wx.ID_ANY, _('Create INBE manager...'), _('Create INBE manager'))
|
|
2408
2415
|
createdrowning = self.menucreateobj.Append(wx.ID_ANY, _('Create a drowning...'),_('Create a drowning'))
|
|
2409
|
-
|
|
2416
|
+
|
|
2417
|
+
if WOLFPYDIKE_AVAILABLE:
|
|
2418
|
+
createdike = self.menucreateobj.Append(wx.ID_ANY, _('Create dike...'), _('New dike'))
|
|
2410
2419
|
|
|
2411
2420
|
self.filemenu.AppendSeparator()
|
|
2412
2421
|
|
|
@@ -2434,7 +2443,9 @@ class WolfMapViewer(wx.Frame):
|
|
|
2434
2443
|
addweirs = self.menuaddobj.Append(wx.ID_ANY, _('Add weirs...'), _('Add bridges from directory'))
|
|
2435
2444
|
addview = self.menuaddobj.Append(wx.ID_ANY, _('Add view...'), _('Add view from project file'))
|
|
2436
2445
|
adddrowning = self.menuaddobj.Append(wx.ID_ANY, _('Add a drowning result...'),_('Add a drowning result'))
|
|
2437
|
-
|
|
2446
|
+
|
|
2447
|
+
if WOLFPYDIKE_AVAILABLE:
|
|
2448
|
+
adddike = self.menuaddobj.Append(wx.ID_ANY, _('Add dike...'), _('Add dike'))
|
|
2438
2449
|
|
|
2439
2450
|
self.precomputed_menu = None
|
|
2440
2451
|
if self.default_dem != "":
|
|
@@ -4295,6 +4306,9 @@ class WolfMapViewer(wx.Frame):
|
|
|
4295
4306
|
|
|
4296
4307
|
def Onmenudike(self, event: wx.MenuEvent):
|
|
4297
4308
|
|
|
4309
|
+
if not WOLFPYDIKE_AVAILABLE:
|
|
4310
|
+
raise ImportError('WolfPyDike not installed -- Please install WolfPyDike from pip to use this feature')
|
|
4311
|
+
|
|
4298
4312
|
id = event.GetId()
|
|
4299
4313
|
item = self.menubar.FindItemById(event.GetId())
|
|
4300
4314
|
|
|
@@ -6182,9 +6196,11 @@ class WolfMapViewer(wx.Frame):
|
|
|
6182
6196
|
self.myviewerslaz = []
|
|
6183
6197
|
self.mylazdata = []
|
|
6184
6198
|
self.mydrownings = []
|
|
6199
|
+
self.mypicturecollections = []
|
|
6200
|
+
|
|
6185
6201
|
self.mydikes = []
|
|
6186
6202
|
self.myinjectors = []
|
|
6187
|
-
|
|
6203
|
+
|
|
6188
6204
|
|
|
6189
6205
|
self.mymplfigs = []
|
|
6190
6206
|
|
|
@@ -12114,6 +12130,10 @@ class WolfMapViewer(wx.Frame):
|
|
|
12114
12130
|
|
|
12115
12131
|
elif which.lower() == 'dike':
|
|
12116
12132
|
|
|
12133
|
+
if not WOLFPYDIKE_AVAILABLE:
|
|
12134
|
+
logging.error('WolfPyDike module not available - cannot add dike')
|
|
12135
|
+
return -1
|
|
12136
|
+
|
|
12117
12137
|
curdict = self.mydikes
|
|
12118
12138
|
curtree = self.myitemsdike
|
|
12119
12139
|
|
|
@@ -14468,22 +14488,23 @@ class WolfMapViewer(wx.Frame):
|
|
|
14468
14488
|
logging.info(_('Activating Drowning victim event : ' + nameitem))
|
|
14469
14489
|
self.active_drowning = myobj
|
|
14470
14490
|
|
|
14471
|
-
elif
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14491
|
+
elif WOLFPYDIKE_AVAILABLE:
|
|
14492
|
+
if type(myobj) == DikeWolf:
|
|
14493
|
+
logging.info(_('Activating DikeWolf : ' + nameitem))
|
|
14494
|
+
self.active_dike = myobj
|
|
14495
|
+
if myobj.injector is not None:
|
|
14496
|
+
self.active_injector = myobj.injector
|
|
14497
|
+
logging.info(_('Activating InjectorDike : ' + nameitem))
|
|
14477
14498
|
|
|
14478
|
-
|
|
14479
|
-
|
|
14499
|
+
if ctrl:
|
|
14500
|
+
myobj.show_properties()
|
|
14480
14501
|
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14502
|
+
elif type(myobj) == InjectorDike:
|
|
14503
|
+
logging.info(_('Activating InjectorDike : ' + nameitem))
|
|
14504
|
+
self.active_injector = myobj
|
|
14484
14505
|
|
|
14485
|
-
|
|
14486
|
-
|
|
14506
|
+
if ctrl:
|
|
14507
|
+
myobj.show_properties()
|
|
14487
14508
|
|
|
14488
14509
|
def _update_mytooltip(self):
|
|
14489
14510
|
""" Update the tooltip with the values of the active arrays and results at position x,y """
|
wolfhece/apps/version.py
CHANGED
|
@@ -618,7 +618,8 @@ class CSvsDEM():
|
|
|
618
618
|
if output_file.exists():
|
|
619
619
|
logging.warning(f"Output file {output_file} already exists. It will be overwritten.")
|
|
620
620
|
|
|
621
|
-
|
|
621
|
+
diff_left, diff_right = self.differences
|
|
622
|
+
page = CSvsDEM_IndividualLayout(_("Group {} - Index {} - CS {} - Delta_left {} - Delta_right {}").format(self.index_group, self.index_cs, self._cs.myname, diff_left, diff_right))
|
|
622
623
|
page.create_report()
|
|
623
624
|
self._complete_report(page)
|
|
624
625
|
page.save_report(output_file)
|
wolfhece/wolf_array.py
CHANGED
|
@@ -7698,18 +7698,32 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
|
7698
7698
|
|
|
7699
7699
|
def interpolate_on_polygon(self, working_vector: vector,
|
|
7700
7700
|
method:Literal["nearest", "linear", "cubic"]="linear",
|
|
7701
|
-
keep:Literal['all', 'below', 'above'] = 'all'
|
|
7701
|
+
keep:Literal['all', 'below', 'above'] = 'all',
|
|
7702
|
+
rescale:bool = False):
|
|
7702
7703
|
"""
|
|
7703
|
-
Interpolation sous un polygone
|
|
7704
|
+
Interpolation sous un polygone.
|
|
7704
7705
|
|
|
7705
7706
|
L'interpolation a lieu :
|
|
7706
7707
|
- uniquement dans les mailles sélectionnées si elles existent
|
|
7707
7708
|
- dans les mailles contenues dans le polygone sinon
|
|
7708
7709
|
|
|
7709
7710
|
On utilise ensuite "griddata" de Scipy pour interpoler les altitudes des mailles
|
|
7710
|
-
depuis les vertices 3D du polygone
|
|
7711
|
+
depuis les vertices 3D du polygone.
|
|
7712
|
+
|
|
7713
|
+
:ATTENTION: l'interpolation est réalisée en réels flottants 64 bits. Le résultat sera ensuite transformé dans le type de la matrice.
|
|
7714
|
+
|
|
7715
|
+
:param working_vector: vector - polygon with z values
|
|
7716
|
+
:param method: interpolation method - 'nearest', 'linear' or 'cubic'
|
|
7717
|
+
:param keep: 'all' to keep all interpolated values
|
|
7718
|
+
'below' to keep only values below the current value in the array
|
|
7719
|
+
'above' to keep only values above the current value in the array
|
|
7720
|
+
:param rescale: rescale the input data to [0, 1] for better numerical stability (only for 'linear' and 'cubic' methods)
|
|
7721
|
+
:return: None
|
|
7711
7722
|
"""
|
|
7712
7723
|
|
|
7724
|
+
if self.wolftype in [WOLF_ARRAY_FULL_INTEGER, WOLF_ARRAY_FULL_INTEGER8, WOLF_ARRAY_FULL_INTEGER16]:
|
|
7725
|
+
logging.info(_('Your array contains integer data. The interpolation will be done in float and then converted to integer using "np.ceil" operator.'))
|
|
7726
|
+
|
|
7713
7727
|
if vector.area == 0.:
|
|
7714
7728
|
logging.error(_('The polygon has no area'))
|
|
7715
7729
|
return
|
|
@@ -7756,7 +7770,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
|
7756
7770
|
|
|
7757
7771
|
xyz = working_vector.asnparray3d()
|
|
7758
7772
|
|
|
7759
|
-
newvalues = griddata(xyz[:, :2], xyz[:, 2], destxy, method=method, fill_value=-99999
|
|
7773
|
+
newvalues = griddata(xyz[:, :2], xyz[:, 2], destxy, method=method, fill_value=-99999., rescale = rescale)
|
|
7760
7774
|
|
|
7761
7775
|
if keep == 'all':
|
|
7762
7776
|
locmask = np.where(newvalues != -99999.)
|
|
@@ -7765,6 +7779,11 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
|
7765
7779
|
elif keep == 'above':
|
|
7766
7780
|
locmask = np.where((newvalues != -99999.) & (newvalues > self.array.data[destij[:, 0], destij[:, 1]]))
|
|
7767
7781
|
|
|
7782
|
+
if self.wolftype in [WOLF_ARRAY_FULL_INTEGER, WOLF_ARRAY_FULL_INTEGER8, WOLF_ARRAY_FULL_INTEGER16]:
|
|
7783
|
+
logging.debug(_('Converting interpolated values to integer using "np.ceil" operator'))
|
|
7784
|
+
newvalues = np.ceil(newvalues)
|
|
7785
|
+
newvalues = newvalues.astype(self.array.dtype)
|
|
7786
|
+
|
|
7768
7787
|
self.array.data[destij[locmask][:, 0], destij[locmask][:, 1]] = newvalues[locmask]
|
|
7769
7788
|
|
|
7770
7789
|
def rasterize_vector_valuebyid(self, working_vector: vector, id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wolfhece
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.48
|
|
4
4
|
Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
|
|
5
5
|
Project-URL: Homepage, https://uee.uliege.be/hece
|
|
6
6
|
Project-URL: Issues, https://uee.uliege.be/hece
|
|
@@ -73,7 +73,7 @@ Requires-Dist: tabulate
|
|
|
73
73
|
Requires-Dist: ipympl
|
|
74
74
|
Requires-Dist: contextily
|
|
75
75
|
Requires-Dist: pefile
|
|
76
|
-
Requires-Dist: wolfpydike==0.1.
|
|
76
|
+
Requires-Dist: wolfpydike==0.1.4
|
|
77
77
|
Requires-Dist: PyMuPDF
|
|
78
78
|
Requires-Dist: eccodes
|
|
79
79
|
Requires-Dist: dataframe_image
|
|
@@ -9,7 +9,7 @@ wolfhece/MulticriteriAnalysis.py,sha256=vGmkzYagZohNe0XjwGJ6VUXcDPjOt80lNFthXpzx
|
|
|
9
9
|
wolfhece/PandasGrid.py,sha256=etfVhIHzja4Z1EUY6BcDOKX-w7V-Xou1yaf0NMqmclo,4599
|
|
10
10
|
wolfhece/PyConfig.py,sha256=13DDWjJdohYHwn1uRVHB0s8Jcwq_b9pwcwbAr8NlZyc,19667
|
|
11
11
|
wolfhece/PyCrosssections.py,sha256=kCZBlX3idRY-QqJRHE6MPm4Qxz0AOVublV-JSJYUab8,184622
|
|
12
|
-
wolfhece/PyDraw.py,sha256=
|
|
12
|
+
wolfhece/PyDraw.py,sha256=bAZGNQrwTJvdPCTnuPZbhj7IvXf9fcPIYofL5U72J9w,744916
|
|
13
13
|
wolfhece/PyGui.py,sha256=z8m4M4Q7DVnRt_bEpEDjUl5x0FMkmsEnH2XHnGKWo14,185336
|
|
14
14
|
wolfhece/PyGuiHydrology.py,sha256=dmBlRO8AljsvCPH6eVt0l9ZLx7g5j7Ubl9Srk7ECwyA,34693
|
|
15
15
|
wolfhece/PyHydrographs.py,sha256=1P5XAURNqCvtSsMQXhOn1ihjTpr725sRsZdlCEhhk6M,3730
|
|
@@ -68,7 +68,7 @@ wolfhece/textpillow.py,sha256=7hgfsLYAaE_rNKD-g8xsON8sdWvoV8vbqnGGxIayShE,14137
|
|
|
68
68
|
wolfhece/tools2d_dll.py,sha256=TfvvmyZUqEZIH0uHwUCJf0bdmCks_AiidDt23Unsp5w,13550
|
|
69
69
|
wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
|
|
70
70
|
wolfhece/toolshydrology_dll.py,sha256=cIGyhxV8H5f7GXhDqAamM7uC0W0hQTou3eTkqZdnqBE,5656
|
|
71
|
-
wolfhece/wolf_array.py,sha256=
|
|
71
|
+
wolfhece/wolf_array.py,sha256=eQGVH_yuJDqLixaho4JZzdPLf6pRf2jgrok86Uy6YUU,589560
|
|
72
72
|
wolfhece/wolf_hist.py,sha256=fTEb60Q4TEwobdZsRU4CFXAId1eOKdWAqF8lnF1xEWc,3590
|
|
73
73
|
wolfhece/wolf_texture.py,sha256=Pt1j_lX74p70Fj3y3qYxYMuN8gghVd8_ih1vFhTIdkA,23884
|
|
74
74
|
wolfhece/wolf_tiles.py,sha256=v-HohqaWuMYdn75XLnA22dlloAG90iwnIqrgnB0ASQ4,10488
|
|
@@ -96,7 +96,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
|
96
96
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
|
97
97
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
|
98
98
|
wolfhece/apps/splashscreen.py,sha256=EdGDN9NhudIiP7c3gVqj7dp4MWFB8ySizM_tpMnsgpE,3091
|
|
99
|
-
wolfhece/apps/version.py,sha256=
|
|
99
|
+
wolfhece/apps/version.py,sha256=kWKMCvHZwgWn23QbobBBBQzDHb6aopNtwTwORkNiRX8,388
|
|
100
100
|
wolfhece/apps/wolf.ico,sha256=ej-kLodlUrQLsFDxpDhu2Mak7BTuWw6c9NCJaCBOkHI,238323
|
|
101
101
|
wolfhece/apps/wolf.py,sha256=mRnjYsUu4KIsRuamdQWAINFMuwN4eJgMo9erG-hkZ70,729
|
|
102
102
|
wolfhece/apps/wolf2.png,sha256=YXd-MbtlxWRq38l5L6ky4Lg80DFuoZEKdbDwmeSsWqo,24714
|
|
@@ -287,7 +287,7 @@ wolfhece/rem/__init__.py,sha256=S2-J5uEGK_VaMFjRUYFIdSScJjZyuXH4RmMmnG3OG7I,19
|
|
|
287
287
|
wolfhece/report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
288
288
|
wolfhece/report/common.py,sha256=7nRf1DEXancWsh3V-mqSIqqleaquxn7HemTPTR-8cZ0,21311
|
|
289
289
|
wolfhece/report/compare_arrays.py,sha256=vduobNVgrhWC1LNgCNP7MJ5Dv1Bs-6omUqacbV9-H4w,44050
|
|
290
|
-
wolfhece/report/compare_cs_dem.py,sha256=
|
|
290
|
+
wolfhece/report/compare_cs_dem.py,sha256=kojFuXYEUGBB1dgt2W7CROU8ic9idHgQjiHkJHBFPRw,59612
|
|
291
291
|
wolfhece/report/pdf.py,sha256=WNz-uPDASvAtnP-rJaRRdz0nwiSs8XXWe4622FmeVVM,1953
|
|
292
292
|
wolfhece/report/reporting.py,sha256=JUEXovx_S4jpYkJEBU0AC-1Qw2OkkWyV3VAp6iOfSHc,19494
|
|
293
293
|
wolfhece/report/simplesimgpu.py,sha256=nQK1lY9-uSNTA34N9D5U_ftgCVaSMjtq1zPzz2nO7ts,58622
|
|
@@ -324,8 +324,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=u4C7CXe_bUyGKx7c_Bi0x9
|
|
|
324
324
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
|
325
325
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
326
326
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
|
327
|
-
wolfhece-2.2.
|
|
328
|
-
wolfhece-2.2.
|
|
329
|
-
wolfhece-2.2.
|
|
330
|
-
wolfhece-2.2.
|
|
331
|
-
wolfhece-2.2.
|
|
327
|
+
wolfhece-2.2.48.dist-info/METADATA,sha256=4QTa1R2s7lMNa7-ld4itSLW-MEE3w4erdAGxarCPOsY,2792
|
|
328
|
+
wolfhece-2.2.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
329
|
+
wolfhece-2.2.48.dist-info/entry_points.txt,sha256=Jr187pyvA3EeJiQLjZK9yo6mJX7IAn6ygZU9T8qF_gQ,658
|
|
330
|
+
wolfhece-2.2.48.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
|
331
|
+
wolfhece-2.2.48.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|