wolfhece 2.2.33__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/PyConfig.py +26 -3
- wolfhece/PyCrosssections.py +293 -16
- wolfhece/PyDraw.py +349 -7
- wolfhece/PyGui.py +43 -1
- wolfhece/PyPictures.py +420 -3
- wolfhece/PyVertexvectors.py +128 -12
- wolfhece/__init__.py +1 -0
- wolfhece/analyze_poly.py +1 -1
- wolfhece/apps/version.py +1 -1
- wolfhece/textpillow.py +1 -1
- wolfhece/wolf_array.py +1233 -305
- wolfhece/wolf_texture.py +81 -13
- wolfhece/wolf_zi_db.py +741 -2
- {wolfhece-2.2.33.dist-info → wolfhece-2.2.35.dist-info}/METADATA +1 -1
- {wolfhece-2.2.33.dist-info → wolfhece-2.2.35.dist-info}/RECORD +18 -18
- {wolfhece-2.2.33.dist-info → wolfhece-2.2.35.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.33.dist-info → wolfhece-2.2.35.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.33.dist-info → wolfhece-2.2.35.dist-info}/top_level.txt +0 -0
wolfhece/PyConfig.py
CHANGED
@@ -37,6 +37,7 @@ class ConfigurationKeys(Enum):
|
|
37
37
|
DIRECTORY_LAZ = "Default LAZ directory"
|
38
38
|
ACTIVE_VECTOR_COLOR = "Active vector color"
|
39
39
|
ACTIVE_VECTOR_SIZE_SQUARE = "Active vector square size"
|
40
|
+
XLSX_HECE_DATABASE = "Hece Database XLSX file"
|
40
41
|
|
41
42
|
class WolfConfiguration:
|
42
43
|
""" Holds the PyWolf configuration """
|
@@ -86,8 +87,8 @@ class WolfConfiguration:
|
|
86
87
|
ConfigurationKeys.DIRECTORY_DTM.value: "",
|
87
88
|
ConfigurationKeys.DIRECTORY_LAZ.value: "",
|
88
89
|
ConfigurationKeys.ACTIVE_VECTOR_COLOR.value: [0, 0, 0, 255],
|
89
|
-
ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE.value: 5
|
90
|
-
|
90
|
+
ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE.value: 5,
|
91
|
+
ConfigurationKeys.XLSX_HECE_DATABASE.value: ""
|
91
92
|
}
|
92
93
|
self._types = {
|
93
94
|
ConfigurationKeys.VERSION.value: int,
|
@@ -104,7 +105,8 @@ class WolfConfiguration:
|
|
104
105
|
ConfigurationKeys.DIRECTORY_DTM.value: str,
|
105
106
|
ConfigurationKeys.DIRECTORY_LAZ.value: str,
|
106
107
|
ConfigurationKeys.ACTIVE_VECTOR_COLOR.value: list,
|
107
|
-
ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE.value: int
|
108
|
+
ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE.value: int,
|
109
|
+
ConfigurationKeys.XLSX_HECE_DATABASE.value: str
|
108
110
|
}
|
109
111
|
|
110
112
|
self._check_config()
|
@@ -169,6 +171,7 @@ class GlobalOptionsDialog(wx.Dialog):
|
|
169
171
|
self.cfg_directory_laz.SetValue(str(configuration[ConfigurationKeys.DIRECTORY_LAZ]))
|
170
172
|
self.cfg_vector_color.SetColour(configuration[ConfigurationKeys.ACTIVE_VECTOR_COLOR])
|
171
173
|
self.cfg_square_size.SetValue(str(configuration[ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE]))
|
174
|
+
self.cfg_xlsx_hece_database.SetValue(str(configuration[ConfigurationKeys.XLSX_HECE_DATABASE]))
|
172
175
|
|
173
176
|
def pull_configuration(self, configuration):
|
174
177
|
configuration[ConfigurationKeys.PLAY_WELCOME_SOUND] = self.cfg_welcome_voice.IsChecked()
|
@@ -185,6 +188,7 @@ class GlobalOptionsDialog(wx.Dialog):
|
|
185
188
|
configuration[ConfigurationKeys.DIRECTORY_LAZ] = str(self.cfg_directory_laz.Value)
|
186
189
|
configuration[ConfigurationKeys.ACTIVE_VECTOR_COLOR] = list(self.cfg_vector_color.GetColour())
|
187
190
|
configuration[ConfigurationKeys.ACTIVE_VECTOR_SIZE_SQUARE] = int(self.cfg_square_size.Value)
|
191
|
+
configuration[ConfigurationKeys.XLSX_HECE_DATABASE] = str(self.cfg_xlsx_hece_database.Value)
|
188
192
|
|
189
193
|
def InitUI(self):
|
190
194
|
|
@@ -304,9 +308,20 @@ class GlobalOptionsDialog(wx.Dialog):
|
|
304
308
|
dir_laz.Add(self.cfg_directory_laz, 1, wx.EXPAND, 5)
|
305
309
|
dir_laz.Add(self.btn_choose_laz, 1, wx.EXPAND, 5)
|
306
310
|
|
311
|
+
# XLSX HECE database
|
312
|
+
dir_xlsx = wx.BoxSizer(wx.HORIZONTAL)
|
313
|
+
self.label_xlsx_hece_database = wx.StaticText(pnl, label=_('HECE Database file'))
|
314
|
+
self.cfg_xlsx_hece_database = wx.TextCtrl(pnl, value='', style=wx.TE_CENTRE)
|
315
|
+
self.btn_choose_xlsx = wx.Button(pnl, label=_('Choose'))
|
316
|
+
self.btn_choose_xlsx.Bind(wx.EVT_BUTTON, self.OnChooseXLSX)
|
317
|
+
dir_xlsx.Add(self.label_xlsx_hece_database, 1, wx.EXPAND, 2)
|
318
|
+
dir_xlsx.Add(self.cfg_xlsx_hece_database, 1, wx.EXPAND, 5)
|
319
|
+
dir_xlsx.Add(self.btn_choose_xlsx, 1, wx.EXPAND, 5)
|
320
|
+
|
307
321
|
sbs.Add(dir_dem, 1, wx.EXPAND, 5)
|
308
322
|
sbs.Add(dir_dtm, 1, wx.EXPAND, 5)
|
309
323
|
sbs.Add(dir_laz, 1, wx.EXPAND, 5)
|
324
|
+
sbs.Add(dir_xlsx, 1, wx.EXPAND, 5)
|
310
325
|
|
311
326
|
# Vector color
|
312
327
|
color_vector = wx.BoxSizer(wx.HORIZONTAL)
|
@@ -364,6 +379,14 @@ class GlobalOptionsDialog(wx.Dialog):
|
|
364
379
|
self.cfg_directory_laz.SetValue(str(dlg.GetPath()))
|
365
380
|
dlg.Destroy()
|
366
381
|
|
382
|
+
def OnChooseXLSX(self, e):
|
383
|
+
""" Choose a XLSX file for HECE database """
|
384
|
+
dlg = wx.FileDialog(self, _("Choose a HECE database file"), style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
385
|
+
dlg.SetWildcard("Excel files (*.xlsx)|*.xlsx")
|
386
|
+
if dlg.ShowModal() == wx.ID_OK:
|
387
|
+
self.cfg_xlsx_hece_database.SetValue(str(dlg.GetPath()))
|
388
|
+
dlg.Destroy()
|
389
|
+
|
367
390
|
def OnOk(self, e):
|
368
391
|
if self.IsModal():
|
369
392
|
self.EndModal(wx.ID_OK)
|