wolfhece 2.2.34__py3-none-any.whl → 2.2.35__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 CHANGED
@@ -88,7 +88,7 @@ try:
88
88
  from .lazviewer.laz_viewer import myviewer, read_laz, clip_data_xyz, xyz_laz_grids, choices_laz_colormap, Classification_LAZ, Wolf_LAZ_Data, viewer as viewerlaz
89
89
  from . import Lidar2002
90
90
  from .picc import Picc_data, Cadaster_data
91
- from .wolf_zi_db import ZI_Databse_Elt, PlansTerrier, Ouvrages, Particularites, Enquetes
91
+ from .wolf_zi_db import ZI_Databse_Elt, PlansTerrier, Ouvrages, Particularites, Enquetes, Profils
92
92
  from .math_parser.calculator import Calculator
93
93
  from .wintab.wintab import Wintab
94
94
  from .images_tiles import ImagesTiles
@@ -2905,6 +2905,7 @@ class WolfMapViewer(wx.Frame):
2905
2905
  if len(glob_vrt) == 0:
2906
2906
  file_vrt = r'tmp.vrt'
2907
2907
  create_vrt(dirdata, fout=file_vrt)
2908
+ glob_vrt = file_vrt
2908
2909
  else:
2909
2910
  glob_vrt = glob_vrt[0]
2910
2911
 
@@ -10406,7 +10407,7 @@ class WolfMapViewer(wx.Frame):
10406
10407
  filterCloud = "xyz (*.xyz)|*.xyz|dxf (*.dxf)|*.dxf|text (*.txt)|*.txt|shp (*.shp)|*.shp|all (*.*)|*.*"
10407
10408
  filterlaz = "laz (*.laz)|*.laz|las (*.las)|*.las|Numpy (*.npz)|*.npz|all (*.*)|*.*"
10408
10409
  filtertri = "tri (*.tri)|*.tri|text (*.txt)|*.txt|dxf (*.dxf)|*.dxf|gltf (*.gltf)|*.gltf|gltf binary (*.glb)|*.glb|*.*'all (*.*)|*.*"
10409
- filterCs = "vecz WOLF (*.vecz)|*.vecz|txt 2022 (*.txt)|*.txt|WOLF (*.sxy)|*.sxy|text 2000 (*.txt)|*.txt|all (*.*)|*.*"
10410
+ filterCs = "vecz WOLF (*.vecz)|*.vecz|txt 2022 (*.txt)|*.txt|WOLF (*.sxy)|*.sxy|text 2000 (*.txt)|*.txt|xlsx 2025 (*.xlsx)|*.xlsx|all (*.*)|*.*"
10410
10411
  filterimage = "Geotif (*.tif)|*.tif|all (*.*)|*.*"
10411
10412
 
10412
10413
  if filename == '' and newobj is None:
@@ -10950,8 +10951,13 @@ class WolfMapViewer(wx.Frame):
10950
10951
  newobj = crosssections(filename, format='vecz', dirlaz=dirlaz, mapviewer=self)
10951
10952
  elif curfilter == 2: # sxy
10952
10953
  newobj = crosssections(filename, format='sxy', dirlaz=dirlaz, mapviewer=self)
10953
- else: # txt 2000
10954
+ elif curfilter == 3: # txt 2000
10954
10955
  newobj = crosssections(filename, format='2000', dirlaz=dirlaz, mapviewer=self)
10956
+ elif curfilter == 4: # xlsx
10957
+ newobj = crosssections(filename, format='2025_xlsx', dirlaz=dirlaz, mapviewer=self)
10958
+ else:
10959
+ newobj = crosssections(filename, format='2000', dirlaz=dirlaz, mapviewer=self)
10960
+
10955
10961
  del wait
10956
10962
  self.myvectors.append(newobj)
10957
10963
  newobj.mapviewer = self
@@ -11754,7 +11760,7 @@ class WolfMapViewer(wx.Frame):
11754
11760
  self.selected_object.saveas(fdlg.GetPath())
11755
11761
  fdlg.Destroy()
11756
11762
 
11757
- elif type(self.selected_object) in [PictureCollection, Particularites, Enquetes, Ouvrages]:
11763
+ elif type(self.selected_object) in [PictureCollection, Particularites, Enquetes, Ouvrages, Profils]:
11758
11764
  filterArray = "vec (*.vec)|*.vec|vecz (*.vecz)|*.vecz"
11759
11765
  fdlg = wx.FileDialog(self, "Choose file name for Collection :" + self.selected_object.idx, wildcard=filterArray,
11760
11766
  style=wx.FD_SAVE)
@@ -12326,6 +12332,13 @@ class WolfMapViewer(wx.Frame):
12326
12332
  else:
12327
12333
  logging.warning(_('Enquetes collection not initialized'))
12328
12334
 
12335
+ elif isinstance(curobj, Profils):
12336
+ if curobj.initialized:
12337
+ self.menu_pictcollection()
12338
+ logging.info(_('Profils collection initialized'))
12339
+ else:
12340
+ logging.warning(_('Profils collection not initialized'))
12341
+
12329
12342
  except Exception as ex:
12330
12343
  wx.LogMessage(str(ex))
12331
12344
  wx.MessageBox(str(ex), _("Error"), wx.ICON_ERROR)
@@ -13197,7 +13210,7 @@ class WolfMapViewer(wx.Frame):
13197
13210
  elif isinstance(myobj, PlansTerrier):
13198
13211
  self.active_landmap = myobj
13199
13212
 
13200
- elif isinstance(myobj, Particularites | Enquetes | Ouvrages):
13213
+ elif isinstance(myobj, Particularites | Enquetes | Ouvrages | Profils):
13201
13214
  self.active_picturecollection = myobj
13202
13215
 
13203
13216
  elif type(myobj) == hydrometry_wolfgui:
@@ -13974,6 +13987,7 @@ class WolfMapViewer(wx.Frame):
13974
13987
 
13975
13988
  if 'select by tmp vector' in locaction or 'select by vector' in locaction:
13976
13989
  inside_under = 'inside' in self.action
13990
+ outside_under = 'outside' in self.action
13977
13991
 
13978
13992
  self.end_action(_('End of vector selection'))
13979
13993
 
@@ -13982,6 +13996,9 @@ class WolfMapViewer(wx.Frame):
13982
13996
  if inside_under:
13983
13997
  self.active_vector.close_force()
13984
13998
  self.active_array.SelectionData.select_insidepoly(self.active_vector)
13999
+ elif outside_under:
14000
+ self.active_vector.close_force()
14001
+ self.active_array.SelectionData.select_outsidepoly(self.active_vector)
13985
14002
  else:
13986
14003
  self.active_array.SelectionData.select_underpoly(self.active_vector)
13987
14004
 
@@ -14774,7 +14791,7 @@ class WolfMapViewer(wx.Frame):
14774
14791
  self.active_array.SelectionData.myselection = 'all'
14775
14792
  elif len(cursel) > 0:
14776
14793
  self.active_array.SelectionData.myselection = cursel.copy()
14777
- self.active_array.SelectionData.update_nb_nodes_selection()
14794
+ # self.active_array.SelectionData.update_nb_nodes_selection()
14778
14795
 
14779
14796
  else:
14780
14797
  logging.info(_('Paste selection values'))
@@ -15570,7 +15587,7 @@ class WolfMapViewer(wx.Frame):
15570
15587
  ymin = min(locothers.ymin, ymin)
15571
15588
  ymax = max(locothers.ymax, ymax)
15572
15589
  k += 1
15573
- elif type(locothers) in [Particularites, Enquetes, Ouvrages]:
15590
+ elif type(locothers) in [Particularites, Enquetes, Ouvrages, Profils]:
15574
15591
  if locothers.initialized:
15575
15592
  xmin = min(locothers.xmin, xmin)
15576
15593
  xmax = max(locothers.xmax, xmax)
wolfhece/PyGui.py CHANGED
@@ -70,7 +70,7 @@ try:
70
70
  from .hydrology.forcedexchanges import forced_exchanges
71
71
  from .PyParams import Wolf_Param
72
72
  from .picc import Picc_data, Cadaster_data
73
- from .wolf_zi_db import ZI_Databse_Elt, PlansTerrier, Ouvrages, Enquetes, Particularites
73
+ from .wolf_zi_db import ZI_Databse_Elt, PlansTerrier, Ouvrages, Enquetes, Particularites, Profils
74
74
  from .CpGrid import CpGrid
75
75
  from .mesh2d.gpu_2d import Sim_2D_GPU
76
76
  from .mesh2d.wolf2dprev import prev_sim2D
@@ -245,6 +245,8 @@ class MapManager(GenMapManager):
245
245
  logging.info("MapManager - Enquetes created")
246
246
  self.particularites = Particularites(mapviewer=self.mapviewer, parent = self.mapviewer, idx='Features', plotted=True)
247
247
  logging.info("MapManager - Particularites created")
248
+ self.profils = Profils(mapviewer=self.mapviewer, parent = self.mapviewer, idx='CrossSections', plotted=True)
249
+ logging.info("MapManager - PlansTerrier created")
248
250
 
249
251
  self.mapviewer.add_object(which='other',
250
252
  newobj=self.ouvragesponts,
@@ -262,6 +264,12 @@ class MapManager(GenMapManager):
262
264
  newobj=self.particularites,
263
265
  ToCheck=False,
264
266
  id=_('Pictures "features"'))
267
+
268
+ self.mapviewer.add_object(which='other',
269
+ newobj=self.profils,
270
+ ToCheck=False,
271
+ id='Pictures "Cross sections"')
272
+
265
273
  except:
266
274
  logging.warning("Can't load some data (hydrometry, picc, cadaster, landmaps) -- Please check the data directories and/or report the issue")
267
275
 
@@ -2789,7 +2789,7 @@ class vector:
2789
2789
 
2790
2790
  return pts
2791
2791
 
2792
- def split(self,ds, new=True):
2792
+ def split(self, ds, new=True):
2793
2793
  """
2794
2794
  Création d'un nouveau vecteur sur base du découpage d'un autre et d'un pas spatial à respecter
2795
2795
  Le nouveau vecteur contient tous les points de l'ancien et des nouveaux sur base d'un découpage 3D
wolfhece/__init__.py CHANGED
@@ -32,6 +32,7 @@ def ensure_ntv2grid_exists():
32
32
  files = ['be_ign_bd72lb72_etrs89lb08.tif', 'be_ign_hBG18.tif', 'be_ign_README.txt']
33
33
 
34
34
  pyproj_datadir = Path(pyproj.datadir.get_data_dir())
35
+ os.environ["PROJ_DATA"] = pyproj.datadir.get_data_dir() # set the PROJ_DATA environment variable to pyproj data directory
35
36
 
36
37
  for file in files:
37
38
  if not (pyproj_datadir / file).exists():
wolfhece/analyze_poly.py CHANGED
@@ -231,7 +231,7 @@ class Array_analysis_onepolygon():
231
231
 
232
232
  import plotly.express as px
233
233
 
234
- fig = px.histogram(self.values('Values'), x='Values',
234
+ fig = px.histogram(self.values('Values'), x=self._polygon.myname,
235
235
  nbins=bins, title='Values distribution',
236
236
  histnorm='probability density')
237
237
 
wolfhece/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 2
8
- self.patch = 34
8
+ self.patch = 35
9
9
 
10
10
  def __str__(self):
11
11