wolfhece 2.1.1__py3-none-any.whl → 2.1.3__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 +30 -8
- wolfhece/PyVertex.py +6 -2
- wolfhece/apps/version.py +1 -1
- {wolfhece-2.1.1.dist-info → wolfhece-2.1.3.dist-info}/METADATA +1 -1
- {wolfhece-2.1.1.dist-info → wolfhece-2.1.3.dist-info}/RECORD +8 -8
- {wolfhece-2.1.1.dist-info → wolfhece-2.1.3.dist-info}/WHEEL +0 -0
- {wolfhece-2.1.1.dist-info → wolfhece-2.1.3.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.1.1.dist-info → wolfhece-2.1.3.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
@@ -3141,7 +3141,7 @@ class WolfMapViewer(wx.Frame):
|
|
3141
3141
|
if cur is not self:
|
3142
3142
|
cur.update()
|
3143
3143
|
|
3144
|
-
def zoom_on_id(self, id:str,
|
3144
|
+
def zoom_on_id(self, id:str, drawtype:draw_type = draw_type.ARRAYS, forceupdate=True, canvas_height=1024):
|
3145
3145
|
"""
|
3146
3146
|
Zoom on id
|
3147
3147
|
|
@@ -3150,19 +3150,19 @@ class WolfMapViewer(wx.Frame):
|
|
3150
3150
|
|
3151
3151
|
"""
|
3152
3152
|
|
3153
|
-
if
|
3153
|
+
if drawtype not in [draw_type.ARRAYS, draw_type.VECTORS]:
|
3154
3154
|
logging.warning(_('Draw type must be either ARRAYS or VECTORS'))
|
3155
3155
|
return
|
3156
3156
|
|
3157
|
-
obj = self.get_obj_from_id(id,
|
3157
|
+
obj = self.get_obj_from_id(id, drawtype)
|
3158
3158
|
|
3159
3159
|
if obj is None:
|
3160
|
-
logging.warning(_('No object found with id {} and drawtype {}'.format(id,
|
3160
|
+
logging.warning(_('No object found with id {} and drawtype {}'.format(id, drawtype)))
|
3161
3161
|
return
|
3162
3162
|
|
3163
|
-
if
|
3163
|
+
if drawtype == draw_type.ARRAYS:
|
3164
3164
|
self.zoom_on_array(obj, forceupdate=forceupdate, canvas_height=canvas_height)
|
3165
|
-
elif
|
3165
|
+
elif drawtype == draw_type.VECTORS:
|
3166
3166
|
self.zoom_on_vector(obj, forceupdate=forceupdate, canvas_height=canvas_height)
|
3167
3167
|
|
3168
3168
|
def zoom_on_array(self, array:WolfArray, forceupdate=True, canvas_height=1024):
|
@@ -3213,16 +3213,38 @@ class WolfMapViewer(wx.Frame):
|
|
3213
3213
|
for curarray in arrays:
|
3214
3214
|
|
3215
3215
|
if isinstance(curarray, WolfArray):
|
3216
|
+
|
3217
|
+
curarray.nullify_border(1)
|
3218
|
+
|
3216
3219
|
new_zone = zone(name = curarray.idx)
|
3217
3220
|
new_zones.add_zone(new_zone, forceparent=True)
|
3218
3221
|
|
3219
3222
|
sux, sux, curvect, interior = curarray.suxsuy_contour()
|
3220
3223
|
new_zone.add_vector(curvect, forceparent=True)
|
3224
|
+
|
3221
3225
|
curvect.set_legend_to_centroid(curarray.idx)
|
3226
|
+
curvect.myprop.width = 2
|
3227
|
+
|
3228
|
+
rectvect = vector(name = 'rect_boundary')
|
3229
|
+
new_zone.add_vector(rectvect, forceparent=True)
|
3230
|
+
|
3231
|
+
bounds = curarray.get_bounds()
|
3232
|
+
|
3233
|
+
rectvect.add_vertex(wolfvertex(bounds[0][0], bounds[1][0]))
|
3234
|
+
rectvect.add_vertex(wolfvertex(bounds[0][1], bounds[1][0]))
|
3235
|
+
rectvect.add_vertex(wolfvertex(bounds[0][1], bounds[1][1]))
|
3236
|
+
rectvect.add_vertex(wolfvertex(bounds[0][0], bounds[1][1]))
|
3237
|
+
rectvect.close_force()
|
3238
|
+
|
3239
|
+
rectvect.myprop.color = getIfromRGB([255,0,0])
|
3240
|
+
rectvect.myprop.width = 2
|
3241
|
+
|
3222
3242
|
logging.info(_('{} treated'.format(curarray.idx)))
|
3223
3243
|
else:
|
3224
3244
|
logging.warning(_('All elements in the list must be of type WolfArray'))
|
3225
3245
|
|
3246
|
+
new_zones.find_minmax(update=True)
|
3247
|
+
|
3226
3248
|
return new_zones
|
3227
3249
|
|
3228
3250
|
|
@@ -6107,11 +6129,11 @@ class WolfMapViewer(wx.Frame):
|
|
6107
6129
|
|
6108
6130
|
"""
|
6109
6131
|
|
6110
|
-
keys = self.get_list_keys(
|
6132
|
+
keys = self.get_list_keys(drawtype, checked_state=None)
|
6111
6133
|
if id.lower() in keys:
|
6112
6134
|
try:
|
6113
6135
|
idx = keys.index(id.lower())
|
6114
|
-
return self.get_list_objects(
|
6136
|
+
return self.get_list_objects(drawtype, checked_state=None)[idx]
|
6115
6137
|
except:
|
6116
6138
|
return None
|
6117
6139
|
|
wolfhece/PyVertex.py
CHANGED
@@ -27,14 +27,18 @@ from .textpillow import Text_Image, Text_Infos, Font_Priority
|
|
27
27
|
from .wolf_texture import Text_Image_Texture
|
28
28
|
|
29
29
|
|
30
|
-
def getRGBfromI(rgbint):
|
30
|
+
def getRGBfromI(rgbint:int):
|
31
|
+
""" Convert integer to RGB """
|
32
|
+
|
31
33
|
blue = rgbint & 255
|
32
34
|
green = (rgbint >> 8) & 255
|
33
35
|
red = (rgbint >> 16) & 255
|
34
36
|
return red, green, blue
|
35
37
|
|
36
38
|
|
37
|
-
def getIfromRGB(rgb):
|
39
|
+
def getIfromRGB(rgb:Union[list, tuple]):
|
40
|
+
""" Convert RGB to integer """
|
41
|
+
|
38
42
|
red = int(rgb[0])
|
39
43
|
green = int(rgb[1])
|
40
44
|
blue = int(rgb[2])
|
wolfhece/apps/version.py
CHANGED
@@ -6,7 +6,7 @@ wolfhece/ManageParams.py,sha256=Wgt5Zh7QBtyiwTAltPHunSLqt4XuVuRH76GTUrXabS4,219
|
|
6
6
|
wolfhece/Model1D.py,sha256=-cMz-ePSYzrKVVDidiDOz6cojEZ3y6u9gIb7RPwT6Y8,476593
|
7
7
|
wolfhece/PyConfig.py,sha256=oGSL1WsLM9uinlNP4zGBLK3uHPmBfduUi7R-VtWuRFA,8034
|
8
8
|
wolfhece/PyCrosssections.py,sha256=f4dNYRUGZKePruaaBiTcn5vlrw8TFTj9XwTDrdiF_uU,112450
|
9
|
-
wolfhece/PyDraw.py,sha256=
|
9
|
+
wolfhece/PyDraw.py,sha256=2pGgV1VwE-zfCiJnrPbJrjKfCG41ARhGTo_sF_kpd-s,376852
|
10
10
|
wolfhece/PyGui.py,sha256=TTRvqRiZ0gTaxOfDTMVLFYQ56QvdDMS032fRXcXxvUs,104024
|
11
11
|
wolfhece/PyGuiHydrology.py,sha256=wKhR-KthPRyzJ887NmsozmUpm2CIQIwO3IbYORCYjrE,7290
|
12
12
|
wolfhece/PyHydrographs.py,sha256=GKK8U0byI45H9O_e4LAOOi7Aw0Tg7Q0Lx322stPg5IQ,3453
|
@@ -14,7 +14,7 @@ wolfhece/PyPalette.py,sha256=_Nm2Lc4UxYlZgK8ifZDioG8a0at8oiteYC0x_4XugFc,24384
|
|
14
14
|
wolfhece/PyParams.py,sha256=361iy9b9zTjoPCj9gh8-OIo0TBW5laLG87AkWE6f_eg,96290
|
15
15
|
wolfhece/PyPictures.py,sha256=-mJB0JL2YYiEK3D7_ssDkvYiMWK4ve9kXhozQXNeSx8,2216
|
16
16
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
17
|
-
wolfhece/PyVertex.py,sha256=
|
17
|
+
wolfhece/PyVertex.py,sha256=dHTjyYYTn0F_NWerlAOBKHV79RUzEEtMJMldQtVc1Cs,40092
|
18
18
|
wolfhece/PyVertexvectors.py,sha256=Av1OqFrDtZUAXAjaTnoGGErzK4W9gJhVx0LxgULLcTA,222335
|
19
19
|
wolfhece/PyWMS.py,sha256=t6jVZpTxTNSLJxABk8A79cEMWTKoRM_S_SXRipsHLzw,4493
|
20
20
|
wolfhece/RatingCurve.py,sha256=YSQvSvdMHE6hSlWVBF5Oe0-Fh3waNMpOdmcymaCCTis,21706
|
@@ -66,7 +66,7 @@ wolfhece/apps/check_install.py,sha256=jrKR-njqnpIh6ZJqvP6KbDUPVCfwTNQj4glQhcyzs9
|
|
66
66
|
wolfhece/apps/curvedigitizer.py,sha256=avWERHuVxPnJBOD_ibczwW_XG4vAenqWS8W1zjhBox8,4898
|
67
67
|
wolfhece/apps/isocurrent.py,sha256=4XnNWPa8mYUK7V4zdDRFrHFIXNG2AN2og3TqWKKcqjY,3811
|
68
68
|
wolfhece/apps/splashscreen.py,sha256=m9hMTqzhSUcTudApyNNjoAK9e2u5vgEkJVV79xmfM1s,2118
|
69
|
-
wolfhece/apps/version.py,sha256=
|
69
|
+
wolfhece/apps/version.py,sha256=Or-ozTUagYZHC8C-Y56TsIQ5c1jVkNiIlxclTgBDkSc,387
|
70
70
|
wolfhece/apps/wolf.py,sha256=gqfm-ZaUJqNsfCzmdtemSeqLw-GVdSVix-evg5WArJI,293
|
71
71
|
wolfhece/apps/wolf2D.py,sha256=gWD9ee2-1pw_nUxjgRaJMuSe4kUT-RWhOeoTt_Lh1mM,267
|
72
72
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -264,8 +264,8 @@ wolfhece/sounds/sonsw2.wav,sha256=pFLVt6By0_EPQNt_3KfEZ9a1uSuYTgQSX1I_Zurv9Rc,11
|
|
264
264
|
wolfhece/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
265
265
|
wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=yGbU_JsF56jsmms0gh7mxa7tbNQ_SxqhpAZxhm-mTy4,14860
|
266
266
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=wCxGRnE3kzEkWlWA6-3X8ADOFux_B0a5QWJ2GnXTgJw,4709
|
267
|
-
wolfhece-2.1.
|
268
|
-
wolfhece-2.1.
|
269
|
-
wolfhece-2.1.
|
270
|
-
wolfhece-2.1.
|
271
|
-
wolfhece-2.1.
|
267
|
+
wolfhece-2.1.3.dist-info/METADATA,sha256=LvZPcQCsOcMiJYf7lSYhlTHa29Ld57npIH4HZCqx3fU,2281
|
268
|
+
wolfhece-2.1.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
269
|
+
wolfhece-2.1.3.dist-info/entry_points.txt,sha256=AIu1KMswrdsqNq_2jPtrRIU4tLjuTnj2dCY-pxIlshw,276
|
270
|
+
wolfhece-2.1.3.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
271
|
+
wolfhece-2.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|