wolfhece 2.2.36__py3-none-any.whl → 2.2.37__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 +50 -0
- wolfhece/PyVertexvectors.py +143 -29
- wolfhece/apps/version.py +1 -1
- wolfhece/picc.py +38 -4
- {wolfhece-2.2.36.dist-info → wolfhece-2.2.37.dist-info}/METADATA +1 -1
- {wolfhece-2.2.36.dist-info → wolfhece-2.2.37.dist-info}/RECORD +9 -9
- {wolfhece-2.2.36.dist-info → wolfhece-2.2.37.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.36.dist-info → wolfhece-2.2.37.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.36.dist-info → wolfhece-2.2.37.dist-info}/top_level.txt +0 -0
wolfhece/PyDraw.py
CHANGED
@@ -12229,6 +12229,46 @@ class WolfMapViewer(wx.Frame):
|
|
12229
12229
|
self.selected_object.active_vector.parentzone.add_vector(vec_raster, forceparent=True, update_struct=True)
|
12230
12230
|
self.selected_object.active_vector.parentzone.reset_listogl()
|
12231
12231
|
|
12232
|
+
elif _('Extrude on active array') in text:
|
12233
|
+
|
12234
|
+
if isinstance(self.selected_object, Picc_data):
|
12235
|
+
|
12236
|
+
if self.active_array is None:
|
12237
|
+
logging.warning(_('No active array selected'))
|
12238
|
+
return
|
12239
|
+
|
12240
|
+
logging.info(_('Extruding polygons on active array'))
|
12241
|
+
logging.info(_('Please wait, it could take some time...'))
|
12242
|
+
self.selected_object.extrude_polygons(self.active_array)
|
12243
|
+
logging.info(_('Extrusion done !'))
|
12244
|
+
|
12245
|
+
self.active_array.reset_plot()
|
12246
|
+
self.Refresh()
|
12247
|
+
|
12248
|
+
elif _('Interpolate on active array') in text:
|
12249
|
+
|
12250
|
+
if isinstance(self.selected_object, Zones):
|
12251
|
+
|
12252
|
+
if self.active_array is None:
|
12253
|
+
logging.warning(_('No active array selected'))
|
12254
|
+
return
|
12255
|
+
|
12256
|
+
dlg = wx.SingleChoiceDialog(None, _('With respect to the array values, keep the extruded values which are ?'), _('Interpolate on active array'), ['Above', 'Below', 'All'], style=wx.CHOICEDLG_STYLE)
|
12257
|
+
ret = dlg.ShowModal()
|
12258
|
+
if ret != wx.ID_OK:
|
12259
|
+
dlg.Destroy()
|
12260
|
+
return
|
12261
|
+
choice = dlg.GetStringSelection().lower()
|
12262
|
+
dlg.Destroy()
|
12263
|
+
|
12264
|
+
|
12265
|
+
logging.info(_('Interpolating polygons on active array'))
|
12266
|
+
logging.info(_('Please wait, it could take some time...'))
|
12267
|
+
for curzone in self.selected_object.myzones:
|
12268
|
+
self.active_array.interpolate_on_polygons(curzone, keep = choice)
|
12269
|
+
logging.info(_('Interpolation done !'))
|
12270
|
+
|
12271
|
+
|
12232
12272
|
def OnClose(self, event):
|
12233
12273
|
""" Close the application """
|
12234
12274
|
|
@@ -12292,6 +12332,7 @@ class WolfMapViewer(wx.Frame):
|
|
12292
12332
|
nameitem = self.treelist.GetItemText(myitem).lower()
|
12293
12333
|
|
12294
12334
|
ctrl = wx.GetKeyState(wx.WXK_CONTROL)
|
12335
|
+
shiftdown = wx.GetKeyState(wx.WXK_SHIFT)
|
12295
12336
|
|
12296
12337
|
# ctrl = event.ControlDown()
|
12297
12338
|
|
@@ -12345,6 +12386,8 @@ class WolfMapViewer(wx.Frame):
|
|
12345
12386
|
else:
|
12346
12387
|
if issubclass(type(curobj), WolfArray):
|
12347
12388
|
curobj.uncheck_plot(not ctrl,ctrl)
|
12389
|
+
elif isinstance(curobj, Picc_data):
|
12390
|
+
curobj.uncheck_plot(ctrl, shiftdown)
|
12348
12391
|
else:
|
12349
12392
|
curobj.uncheck_plot()
|
12350
12393
|
|
@@ -15157,6 +15200,9 @@ class WolfMapViewer(wx.Frame):
|
|
15157
15200
|
tracks.append(_('Rasterize active zone'))
|
15158
15201
|
tracks.append(_('Rasterize active vector'))
|
15159
15202
|
|
15203
|
+
tracks.append(_('Extrude on active array'))
|
15204
|
+
tracks.append(_('Interpolate on active array'))
|
15205
|
+
|
15160
15206
|
# Récupération des items du menu contextuel
|
15161
15207
|
menuitems = self.popupmenu.GetMenuItems()
|
15162
15208
|
text = [cur.GetItemLabelText() for cur in menuitems]
|
@@ -15197,6 +15243,7 @@ class WolfMapViewer(wx.Frame):
|
|
15197
15243
|
if isinstance(self.selected_object, Zones):
|
15198
15244
|
self.popupmenu.Append(wx.ID_ANY, _('Rasterize active zone'), _('Rasterize active zone'))
|
15199
15245
|
self.popupmenu.Append(wx.ID_ANY, _('Rasterize active vector'), _('Rasterize active vector'))
|
15246
|
+
self.popupmenu.Append(wx.ID_ANY, _('Interpolate on active array'), _('Interpolate Z-values on active array'))
|
15200
15247
|
|
15201
15248
|
if isinstance(self.selected_object, Zones | Bridge | Weir):
|
15202
15249
|
self.popupmenu.Append(wx.ID_ANY, _('Export to Shape file'), _('Export to Shape file'))
|
@@ -15229,6 +15276,9 @@ class WolfMapViewer(wx.Frame):
|
|
15229
15276
|
moviemenu.Append(wx.ID_ANY, _('Load flight'), _('Load flight'))
|
15230
15277
|
moviemenu.Append(wx.ID_ANY, _('Save flight'), _('Save flight'))
|
15231
15278
|
|
15279
|
+
if isinstance(self.selected_object, Picc_data):
|
15280
|
+
self.popupmenu.Append(wx.ID_ANY, _('Extrude on active array'), _('Extrude building elevation on active array'))
|
15281
|
+
|
15232
15282
|
self.treelist.PopupMenu(self.popupmenu)
|
15233
15283
|
|
15234
15284
|
def zoom_on_whole_walonia(self):
|
wolfhece/PyVertexvectors.py
CHANGED
@@ -2276,6 +2276,43 @@ class vector:
|
|
2276
2276
|
|
2277
2277
|
return len(not_in_use) > 0
|
2278
2278
|
|
2279
|
+
def check_if_interior_exists(self):
|
2280
|
+
""" Check if the vector has an interior and adapt in_use accordingly.
|
2281
|
+
|
2282
|
+
The verification is only made in 2D, as the interior is defined as a pair of segments that correspond exactly to the same coordinates.
|
2283
|
+
Z coordinates are not taken into account in this verification.
|
2284
|
+
|
2285
|
+
"""
|
2286
|
+
|
2287
|
+
xy = self.xy
|
2288
|
+
if self.closed and (xy[0,0] == xy[-1,0] and xy[0,1] == xy[-1,1]):
|
2289
|
+
# If the vector is closed, we remove the last vertex to avoid checking it
|
2290
|
+
xy = xy[:-1]
|
2291
|
+
|
2292
|
+
xy_unique, inverse, count = np.unique(xy, return_inverse=True, return_counts=True, axis=0)
|
2293
|
+
|
2294
|
+
duplicate_found = False
|
2295
|
+
|
2296
|
+
if xy.shape[0] != xy_unique.shape[0]:
|
2297
|
+
# There are duplicates, we need to test if the duplicate form a segment
|
2298
|
+
|
2299
|
+
# Find the duplicate indices
|
2300
|
+
duplicate_indices = np.where(count > 1)[0]
|
2301
|
+
# Find the inverse indices of the duplicates
|
2302
|
+
duplicate_indices = np.where(np.isin(inverse, duplicate_indices))[0]
|
2303
|
+
diff = np.diff(duplicate_indices)
|
2304
|
+
|
2305
|
+
for i in range(len(diff)):
|
2306
|
+
# Set the in_use property to False for the vertices that are not used
|
2307
|
+
if diff[i] == 1:
|
2308
|
+
self.myvertices[duplicate_indices[i+1]].in_use = False
|
2309
|
+
duplicate_found = True
|
2310
|
+
|
2311
|
+
if duplicate_found:
|
2312
|
+
self.reset_linestring()
|
2313
|
+
self._reset_listogl()
|
2314
|
+
|
2315
|
+
|
2279
2316
|
@property
|
2280
2317
|
def nb_interiors(self) -> int:
|
2281
2318
|
""" Return the number of interiors in the vector.
|
@@ -2336,10 +2373,30 @@ class vector:
|
|
2336
2373
|
return tri.get_triangles_as_listwolfvertices()
|
2337
2374
|
|
2338
2375
|
else:
|
2339
|
-
if self.myprop.closed and (self.myvertices[0].x != self.myvertices[-1].x or self.myvertices[0].y != self.myvertices[-1].y):
|
2340
|
-
|
2341
|
-
else:
|
2342
|
-
|
2376
|
+
# if self.myprop.closed and (self.myvertices[0].x != self.myvertices[-1].x or self.myvertices[0].y != self.myvertices[-1].y):
|
2377
|
+
# return [self.myvertices + [self.myvertices[0]]]
|
2378
|
+
# else:
|
2379
|
+
# return [self.myvertices]
|
2380
|
+
xx, yy = self.polygon.exterior.xy
|
2381
|
+
|
2382
|
+
# On translate les coordonnées pour éviter les erreurs de triangulation
|
2383
|
+
tr_x = np.array(xx).min()
|
2384
|
+
tr_y = np.array(yy).min()
|
2385
|
+
|
2386
|
+
xx = np.array(xx)-tr_x
|
2387
|
+
yy = np.array(yy)-tr_y
|
2388
|
+
|
2389
|
+
geom = {'vertices' : [[x,y] for x,y in zip(xx[:-1],yy[:-1])], 'segments' : [[i,i+1] for i in range(len(xx)-2)]+[[len(xx)-2,0]]}
|
2390
|
+
|
2391
|
+
try:
|
2392
|
+
delaunay = triangle.triangulate(geom, 'p')
|
2393
|
+
tri = []
|
2394
|
+
for curtri in delaunay['triangles']:
|
2395
|
+
# on traduit les coordonnées pour revenir dans le monde réel
|
2396
|
+
tri.append([wolfvertex(delaunay['vertices'][curtri[i]][0] + tr_x, delaunay['vertices'][curtri[i]][1] + tr_y) for i in range(3)])
|
2397
|
+
return tri
|
2398
|
+
except:
|
2399
|
+
pass
|
2343
2400
|
|
2344
2401
|
else:
|
2345
2402
|
if self.has_interior:
|
@@ -2509,28 +2566,35 @@ class vector:
|
|
2509
2566
|
logging.debug(_('Polygon not in Polygon'))
|
2510
2567
|
|
2511
2568
|
else:
|
2512
|
-
#En attendant de lier WOLF-Fortran, on utilise la triangulation contrainte de la librairie Triangle -- https://rufat.be/triangle/
|
2513
|
-
xx, yy = ls.exterior.xy
|
2514
|
-
|
2515
|
-
# On translate les coordonnées pour éviter les erreurs de triangulation
|
2516
|
-
tr_x = np.array(xx).min()
|
2517
|
-
tr_y = np.array(yy).min()
|
2518
|
-
|
2519
|
-
xx = np.array(xx)-tr_x
|
2520
|
-
yy = np.array(yy)-tr_y
|
2521
|
-
|
2522
|
-
geom = {'vertices' : [[x,y] for x,y in zip(xx[:-1],yy[:-1])], 'segments' : [[i,i+1] for i in range(len(xx)-2)]+[[len(xx)-2,0]]}
|
2523
|
-
|
2524
|
-
try:
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
except:
|
2533
|
-
|
2569
|
+
# #En attendant de lier WOLF-Fortran, on utilise la triangulation contrainte de la librairie Triangle -- https://rufat.be/triangle/
|
2570
|
+
# xx, yy = ls.exterior.xy
|
2571
|
+
|
2572
|
+
# # On translate les coordonnées pour éviter les erreurs de triangulation
|
2573
|
+
# tr_x = np.array(xx).min()
|
2574
|
+
# tr_y = np.array(yy).min()
|
2575
|
+
|
2576
|
+
# xx = np.array(xx)-tr_x
|
2577
|
+
# yy = np.array(yy)-tr_y
|
2578
|
+
|
2579
|
+
# geom = {'vertices' : [[x,y] for x,y in zip(xx[:-1],yy[:-1])], 'segments' : [[i,i+1] for i in range(len(xx)-2)]+[[len(xx)-2,0]]}
|
2580
|
+
|
2581
|
+
# try:
|
2582
|
+
# delaunay = triangle.triangulate(geom, 'p')
|
2583
|
+
# for curtri in delaunay['triangles']:
|
2584
|
+
# glBegin(GL_POLYGON)
|
2585
|
+
# for i in range(3):
|
2586
|
+
# # on retraduit les coordonnées pour revenir dans le monde réel
|
2587
|
+
# glVertex2d(delaunay['vertices'][curtri[i]][0] + tr_x, delaunay['vertices'][curtri[i]][1] + tr_y)
|
2588
|
+
# glEnd()
|
2589
|
+
# except:
|
2590
|
+
# pass
|
2591
|
+
|
2592
|
+
all_polys = self.get_subpolygons()
|
2593
|
+
for curpoly in all_polys:
|
2594
|
+
glBegin(GL_POLYGON)
|
2595
|
+
for curvertex in curpoly:
|
2596
|
+
glVertex2d(curvertex.x, curvertex.y)
|
2597
|
+
glEnd()
|
2534
2598
|
|
2535
2599
|
else:
|
2536
2600
|
all_polys = self.get_subpolygons()
|
@@ -2975,6 +3039,28 @@ class vector:
|
|
2975
3039
|
gridto.SetCellValue(k,5,'1' if curv.in_use else '0')
|
2976
3040
|
k+=1
|
2977
3041
|
|
3042
|
+
def _fillgrid_only_i(self, gridto:CpGrid):
|
3043
|
+
"""
|
3044
|
+
Remplissage d'un CpGrid
|
3045
|
+
"""
|
3046
|
+
curv:wolfvertex
|
3047
|
+
|
3048
|
+
gridto.SetColLabelValue(0,'X')
|
3049
|
+
gridto.SetColLabelValue(1,'Y')
|
3050
|
+
gridto.SetColLabelValue(2,'Z')
|
3051
|
+
gridto.SetColLabelValue(3,'value')
|
3052
|
+
gridto.SetColLabelValue(4,'s curvi')
|
3053
|
+
gridto.SetColLabelValue(5,'in use')
|
3054
|
+
|
3055
|
+
nb=gridto.GetNumberRows()
|
3056
|
+
if len(self.myvertices)-nb>0:
|
3057
|
+
gridto.AppendRows(len(self.myvertices)-nb)
|
3058
|
+
k=0
|
3059
|
+
|
3060
|
+
for curv in self.myvertices:
|
3061
|
+
gridto.SetCellValue(k, 5, '1' if curv.in_use else '0')
|
3062
|
+
k+=1
|
3063
|
+
|
2978
3064
|
def updatefromgrid(self,gridfrom:CpGrid):
|
2979
3065
|
"""
|
2980
3066
|
Mise à jour depuis un CpGrid
|
@@ -4045,6 +4131,11 @@ class zone:
|
|
4045
4131
|
# Object can be created from a shapely object
|
4046
4132
|
self.import_shapelyobj(fromshapely)
|
4047
4133
|
|
4134
|
+
def check_if_interior_exists(self):
|
4135
|
+
""" Check if the zone has at least one vector with interior points """
|
4136
|
+
for curvec in self.myvectors:
|
4137
|
+
curvec.check_if_interior_exists()
|
4138
|
+
|
4048
4139
|
def add_values(self, key:str, values:np.ndarray):
|
4049
4140
|
""" add values to the zone """
|
4050
4141
|
|
@@ -6410,6 +6501,11 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
6410
6501
|
|
6411
6502
|
return [curzone.myname for curzone in self.myzones]
|
6412
6503
|
|
6504
|
+
def check_if_interior_exists(self):
|
6505
|
+
""" Check if the zone has at least one vector with interior points """
|
6506
|
+
for curzone in self.myzones:
|
6507
|
+
curzone.check_if_interior_exists()
|
6508
|
+
|
6413
6509
|
def add_values(self, key:str, values:np.ndarray | dict):
|
6414
6510
|
"""
|
6415
6511
|
Add values to the zones
|
@@ -6910,7 +7006,7 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
6910
7006
|
curvect.myprop.color = curcolor
|
6911
7007
|
curvect.myprop.alpha = 180
|
6912
7008
|
curvect.myprop.transparent = True
|
6913
|
-
curvect.myprop.filled = filled
|
7009
|
+
curvect.myprop.filled = filled and curvect.closed
|
6914
7010
|
|
6915
7011
|
def set_width(self, width:int) -> None:
|
6916
7012
|
""" Change with of all vectors in all zones """
|
@@ -7351,6 +7447,10 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
7351
7447
|
self.updatevertices.SetToolTip(_("Transfer the coordinates from the editor to the memory and update the plot"))
|
7352
7448
|
self.updatevertices.Bind(wx.EVT_BUTTON,self.Onupdatevertices)
|
7353
7449
|
|
7450
|
+
self._test_interior = wx.Button(self,label=_('Test interior'))
|
7451
|
+
self._test_interior.SetToolTip(_("Test if some segments of the active vector are exactly the same"))
|
7452
|
+
self._test_interior.Bind(wx.EVT_BUTTON,self.Ontest_interior)
|
7453
|
+
|
7354
7454
|
self.plot_mpl = wx.Button(self,label=_('Plot xy'))
|
7355
7455
|
self.plot_mpl.SetToolTip(_("Plot the active vector in a new window (matplotlib)"))
|
7356
7456
|
self.plot_mpl.Bind(wx.EVT_BUTTON,self.Onplotmpl)
|
@@ -7360,7 +7460,7 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
7360
7460
|
self.plot_mplsz.Bind(wx.EVT_BUTTON,self.Onplotmplsz)
|
7361
7461
|
|
7362
7462
|
sizer_add_update.Add(self.addrows,1, wx.EXPAND)
|
7363
|
-
sizer_add_update.Add(self.updatevertices,
|
7463
|
+
sizer_add_update.Add(self.updatevertices, 1, wx.EXPAND)
|
7364
7464
|
sizer_add_update.Add(self.plot_mpl,1, wx.EXPAND)
|
7365
7465
|
sizer_add_update.Add(self.plot_mplsz,1, wx.EXPAND)
|
7366
7466
|
|
@@ -7516,6 +7616,8 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
7516
7616
|
|
7517
7617
|
box_interp_indices = wx.BoxSizer(wx.HORIZONTAL)
|
7518
7618
|
box_interp_indices.Add(self.interpxyz,1,wx.EXPAND)
|
7619
|
+
box_interp_indices.Add(self._test_interior, 1, wx.EXPAND)
|
7620
|
+
|
7519
7621
|
|
7520
7622
|
boxright.Add(box_interp_indices,0,wx.EXPAND)
|
7521
7623
|
|
@@ -7691,7 +7793,7 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
7691
7793
|
self.fill_structure()
|
7692
7794
|
|
7693
7795
|
self.treelist.SetSize(200,500)
|
7694
|
-
self.SetSize(
|
7796
|
+
self.SetSize(650,700)
|
7695
7797
|
|
7696
7798
|
self.SetSizer(box)
|
7697
7799
|
|
@@ -9062,6 +9164,18 @@ class Zones(wx.Frame, Element_To_Draw):
|
|
9062
9164
|
self.active_vector.updatefromgrid(self.xls)
|
9063
9165
|
self.find_minmax(True)
|
9064
9166
|
|
9167
|
+
def Ontest_interior(self, event:wx.MouseEvent):
|
9168
|
+
""" Test if the active vector has interior portions """
|
9169
|
+
if self.verify_activevec():
|
9170
|
+
return
|
9171
|
+
|
9172
|
+
self.active_vector.check_if_interior_exists()
|
9173
|
+
|
9174
|
+
self.active_vector._fillgrid_only_i(self.xls)
|
9175
|
+
|
9176
|
+
self.get_mapviewer().Paint()
|
9177
|
+
|
9178
|
+
|
9065
9179
|
def Onplotmpl(self, event:wx.MouseEvent):
|
9066
9180
|
"""
|
9067
9181
|
Plot active vector in matplotlib
|
wolfhece/apps/version.py
CHANGED
wolfhece/picc.py
CHANGED
@@ -19,6 +19,7 @@ from .PyTranslate import _
|
|
19
19
|
from .PyVertexvectors import Zones, zone, vector, wolfvertex
|
20
20
|
from .PyVertex import cloud_vertices, getRGBfromI, getIfromRGB
|
21
21
|
from .drawing_obj import Element_To_Draw
|
22
|
+
from .wolf_array import WolfArray
|
22
23
|
|
23
24
|
class Picc_data(Element_To_Draw):
|
24
25
|
"""
|
@@ -38,7 +39,7 @@ class Picc_data(Element_To_Draw):
|
|
38
39
|
|
39
40
|
self.data_dir = data_dir
|
40
41
|
self._filename_vector = 'Wallonie.gdb' #'PICC_Vesdre.shp'
|
41
|
-
self._filename_points = 'PICC_Vesdre_points.shp'
|
42
|
+
self._filename_points = 'ADRESS_POINT.shp' #'PICC_Vesdre_points.shp'
|
42
43
|
self.zones = None
|
43
44
|
self.cloud = None
|
44
45
|
self._colors = {'Habitation': [255, 0, 0], 'Annexe': [0, 255, 0], 'Culture, sport ou loisir': [0, 0, 255], 'Autre': [10, 10, 10]}
|
@@ -59,9 +60,11 @@ class Picc_data(Element_To_Draw):
|
|
59
60
|
if data_dir is None:
|
60
61
|
data_dir = self.data_dir
|
61
62
|
|
63
|
+
data_dir = Path(data_dir)
|
64
|
+
|
62
65
|
datafile = data_dir / self._filename_vector
|
63
66
|
|
64
|
-
if datafile.exists():
|
67
|
+
if datafile.exists() and datafile.is_file():
|
65
68
|
self.zones = Zones(data_dir / self._filename_vector, bbox = bbox, mapviewer=self.mapviewer, colors= self._colors)
|
66
69
|
else:
|
67
70
|
logging.info(_('File not found : {}').format(datafile))
|
@@ -118,6 +121,24 @@ class Picc_data(Element_To_Draw):
|
|
118
121
|
else:
|
119
122
|
logging.error(_('Point file not found : {}').format(pointfile))
|
120
123
|
|
124
|
+
if self.mapviewer is not None:
|
125
|
+
dlg = wx.FileDialog(None, _('Select a point file'), wildcard="Shapefile (*.shp)|*.shp|Gpkg (*.gpkg)|*.gpkg", style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
126
|
+
if dlg.ShowModal() == wx.ID_CANCEL:
|
127
|
+
dlg.Destroy()
|
128
|
+
return
|
129
|
+
|
130
|
+
pathname = dlg.GetPath()
|
131
|
+
dlg.Destroy()
|
132
|
+
|
133
|
+
try:
|
134
|
+
self._filename_points = Path(pathname)
|
135
|
+
|
136
|
+
self.cloud = cloud_vertices(pathname, bbox = bbox, mapviewer=self.mapviewer)
|
137
|
+
self.cloud.myprop.width = 3
|
138
|
+
self.cloud.myprop.color = getIfromRGB([0, 0, 255])
|
139
|
+
except:
|
140
|
+
logging.error(_('File not found : {}').format(pathname))
|
141
|
+
|
121
142
|
|
122
143
|
def plot(self, sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None):
|
123
144
|
""" Plot data in OpenGL context
|
@@ -132,10 +153,11 @@ class Picc_data(Element_To_Draw):
|
|
132
153
|
"""
|
133
154
|
|
134
155
|
if self.zones is not None:
|
135
|
-
|
156
|
+
self.zones.plot(sx=sx, sy=sy, xmin=xmin, ymin=ymin, xmax=xmax, ymax=ymax, size=size)
|
136
157
|
if self.cloud is not None:
|
137
158
|
self.cloud.plot(sx=sx, sy=sy, xmin=xmin, ymin=ymin, xmax=xmax, ymax=ymax, size=size)
|
138
159
|
|
160
|
+
|
139
161
|
def check_plot(self):
|
140
162
|
""" Generic function responding to check operation from mapviewer """
|
141
163
|
|
@@ -153,7 +175,7 @@ class Picc_data(Element_To_Draw):
|
|
153
175
|
|
154
176
|
self.mapviewer.Refresh()
|
155
177
|
|
156
|
-
def uncheck_plot(self, unload: bool = True):
|
178
|
+
def uncheck_plot(self, unload: bool = True, reset_filename: bool = False):
|
157
179
|
""" Generic function responding to uncheck operation from mapviewer """
|
158
180
|
|
159
181
|
super().uncheck_plot(unload = unload)
|
@@ -162,6 +184,11 @@ class Picc_data(Element_To_Draw):
|
|
162
184
|
self.zones = None
|
163
185
|
self.cloud = None
|
164
186
|
|
187
|
+
if reset_filename:
|
188
|
+
self._filename_vector = ''
|
189
|
+
self._filename_points = ''
|
190
|
+
self.data_dir = Path(r'./data/PICC')
|
191
|
+
|
165
192
|
def show_properties(self):
|
166
193
|
""" Showing properties of the object """
|
167
194
|
|
@@ -201,6 +228,13 @@ class Picc_data(Element_To_Draw):
|
|
201
228
|
else:
|
202
229
|
logging.warning(_('No mapviewer to activate zone !'))
|
203
230
|
|
231
|
+
def extrude_polygons(self, dest_array: WolfArray):
|
232
|
+
""" Extrude the active polygon along the z-axis """
|
233
|
+
|
234
|
+
if self.zones is not None:
|
235
|
+
for curzone in self.zones.myzones:
|
236
|
+
dest_array.interpolate_on_polygons(curzone, keep = 'above')
|
237
|
+
|
204
238
|
class Cadaster_data(Picc_data):
|
205
239
|
""" Read and show cadaster data """
|
206
240
|
|
@@ -8,7 +8,7 @@ wolfhece/Model1D.py,sha256=snEmu8Uj2YGcp1ybPnly-4A389XRnuOujGduqInNcgw,477001
|
|
8
8
|
wolfhece/PandasGrid.py,sha256=YIleVkUkoP2MjtQBZ9Xgwk61zbgMj4Pmjj-clVTfPRs,2353
|
9
9
|
wolfhece/PyConfig.py,sha256=13DDWjJdohYHwn1uRVHB0s8Jcwq_b9pwcwbAr8NlZyc,19667
|
10
10
|
wolfhece/PyCrosssections.py,sha256=2m372NSriH41AcIk723y2i44mwUXodbIMIzqkuVMjUY,127365
|
11
|
-
wolfhece/PyDraw.py,sha256=
|
11
|
+
wolfhece/PyDraw.py,sha256=F2zS8Mf8H44JDsV-ZaXaMIGx3lSFDUIyCeoLDQYRAiU,690532
|
12
12
|
wolfhece/PyGui.py,sha256=mcLuHT_pGjW1ltJ-kjNFstVXyeBoZRCvM3vHWv5srB8,148594
|
13
13
|
wolfhece/PyGuiHydrology.py,sha256=sKafpOopBg50L5llZCI_fZtbebVTDtxvoRI6-osUwhg,14745
|
14
14
|
wolfhece/PyHydrographs.py,sha256=1P5XAURNqCvtSsMQXhOn1ihjTpr725sRsZdlCEhhk6M,3730
|
@@ -17,7 +17,7 @@ wolfhece/PyParams.py,sha256=BgTAwxxq831rYEq_KLcFBX_upjiSUpVtfoQnCxCNWUI,100443
|
|
17
17
|
wolfhece/PyPictures.py,sha256=5X2HBkZG1gTaMKMu6UoU-cOY8SRkFyPScJ8bhdoNY7g,18930
|
18
18
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
19
19
|
wolfhece/PyVertex.py,sha256=a56oY1NB45QnwARg96Tbnq-z-mhZKFkYOkFOO1lNtlk,51056
|
20
|
-
wolfhece/PyVertexvectors.py,sha256
|
20
|
+
wolfhece/PyVertexvectors.py,sha256=LhuvLC-zrCMFmwo9JwxgME_3QnTeZMC0vgo8MHg4miw,374955
|
21
21
|
wolfhece/PyWMS.py,sha256=XcSlav5icct2UwV7K2r7vpxa5rKZWiHkp732lI94HFI,31534
|
22
22
|
wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
|
23
23
|
wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
|
@@ -46,7 +46,7 @@ wolfhece/lifewatch.py,sha256=Q_Wy6VGkrD-xxY0fv3PKpT8U8oXxNMgiLlrAE3bMheo,16340
|
|
46
46
|
wolfhece/matplotlib_fig.py,sha256=vnFI6sghw9N9jKhR8X1Z4aWli_5fPNylZQtFuujFJDY,84075
|
47
47
|
wolfhece/multiprojects.py,sha256=Sd6Bl6YP33jlR79A6rvSLu23vq8sqbFYL8lWuVPkEpE,21549
|
48
48
|
wolfhece/os_check.py,sha256=SUHyUZ_tuRDvL995LFoJ6ncE91HcYpd9xN8Tfcg4RUA,316
|
49
|
-
wolfhece/picc.py,sha256=
|
49
|
+
wolfhece/picc.py,sha256=2haBqyY7tMphyifIPafPjC7ZnxZRcD585DDkgEFLATw,9988
|
50
50
|
wolfhece/pidcontroller.py,sha256=PHYenOdzfyPK2pXAhyRolCxMSMRd2AFza0eVMafpPHk,5205
|
51
51
|
wolfhece/pyGui1D.py,sha256=9g7OS3YiKsqy--6y0cBD7x2gaqTTYFXWkxImpgnTA20,121937
|
52
52
|
wolfhece/pybridges.py,sha256=bFAqjL4ColeJtwvyCPGQ8VllWoq1RbVWXxFrdfrvqm8,65954
|
@@ -89,7 +89,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
89
89
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
90
90
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
91
91
|
wolfhece/apps/splashscreen.py,sha256=EdGDN9NhudIiP7c3gVqj7dp4MWFB8ySizM_tpMnsgpE,3091
|
92
|
-
wolfhece/apps/version.py,sha256=
|
92
|
+
wolfhece/apps/version.py,sha256=UZe3RYrHjNWqrUoSi1X0dcpPsQWu6xdtW_vEQehWduM,388
|
93
93
|
wolfhece/apps/wolf.py,sha256=mRnjYsUu4KIsRuamdQWAINFMuwN4eJgMo9erG-hkZ70,729
|
94
94
|
wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
|
95
95
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -308,8 +308,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=u4C7CXe_bUyGKx7c_Bi0x9
|
|
308
308
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
309
309
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
310
310
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
311
|
-
wolfhece-2.2.
|
312
|
-
wolfhece-2.2.
|
313
|
-
wolfhece-2.2.
|
314
|
-
wolfhece-2.2.
|
315
|
-
wolfhece-2.2.
|
311
|
+
wolfhece-2.2.37.dist-info/METADATA,sha256=4emqUYlgiP4zz7VHzAxBZXBN8-fklrJF7eqNnV-Na4g,2729
|
312
|
+
wolfhece-2.2.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
313
|
+
wolfhece-2.2.37.dist-info/entry_points.txt,sha256=Jr187pyvA3EeJiQLjZK9yo6mJX7IAn6ygZU9T8qF_gQ,658
|
314
|
+
wolfhece-2.2.37.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
315
|
+
wolfhece-2.2.37.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|