mirror of https://gitlab.com/pamhyr/pamhyr2
add talweg in update_rk
parent
5fecd29666
commit
674247db09
|
|
@ -93,6 +93,9 @@ class Profile(object):
|
||||||
return self.points[0]
|
return self.points[0]
|
||||||
elif name == "np":
|
elif name == "np":
|
||||||
return self.points[-1]
|
return self.points[-1]
|
||||||
|
elif name == "talweg":
|
||||||
|
zm = self.z_min()
|
||||||
|
return next((p for p in self.points if p.z == zm), None)
|
||||||
else:
|
else:
|
||||||
return next((p for p in self.points if p.name == name), None)
|
return next((p for p in self.points if p.name == name), None)
|
||||||
|
|
||||||
|
|
@ -101,6 +104,12 @@ class Profile(object):
|
||||||
return 0
|
return 0
|
||||||
elif name == "np":
|
elif name == "np":
|
||||||
return len(self.points) - 1
|
return len(self.points) - 1
|
||||||
|
elif name == "talweg":
|
||||||
|
zm = self.z_min()
|
||||||
|
return next(
|
||||||
|
(p for p in enumerate(self.points) if p[1].z == zm),
|
||||||
|
None
|
||||||
|
)[0]
|
||||||
else:
|
else:
|
||||||
return next(
|
return next(
|
||||||
(p for p in enumerate(self.points) if p[1].name == name),
|
(p for p in enumerate(self.points) if p[1].name == name),
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,8 @@ class UpdateRKDialog(PamhyrDialog):
|
||||||
return name
|
return name
|
||||||
|
|
||||||
def _init_default_values_guidelines(self):
|
def _init_default_values_guidelines(self):
|
||||||
bgl = ['un'] + self._gl + ['np']
|
bgl = ['un'] + self._gl + ['np', 'talweg']
|
||||||
egl = ['un'] + self._gl + ['np']
|
egl = ['un'] + self._gl + ['np', 'talweg']
|
||||||
|
|
||||||
self.combobox_add_items("comboBox_begin_gl", bgl)
|
self.combobox_add_items("comboBox_begin_gl", bgl)
|
||||||
self.combobox_add_items("comboBox_end_gl", egl)
|
self.combobox_add_items("comboBox_end_gl", egl)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue