mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Add hydro. struct. on kpc plot.
parent
4be43528e3
commit
e33c9cb2f0
|
|
@ -79,6 +79,7 @@ class PlotKPC(PamhyrPlot):
|
||||||
self.draw_water_elevation_max(reach)
|
self.draw_water_elevation_max(reach)
|
||||||
self.draw_water_elevation_overflow(reach)
|
self.draw_water_elevation_overflow(reach)
|
||||||
self.draw_current(reach)
|
self.draw_current(reach)
|
||||||
|
self.draw_profiles_hs(reach)
|
||||||
|
|
||||||
# self.enable_legend()
|
# self.enable_legend()
|
||||||
|
|
||||||
|
|
@ -105,6 +106,34 @@ class PlotKPC(PamhyrPlot):
|
||||||
|
|
||||||
self._river_bottom = z
|
self._river_bottom = z
|
||||||
|
|
||||||
|
def draw_profiles_hs(self, reach):
|
||||||
|
lhs = filter(
|
||||||
|
lambda hs: hs._input_reach.reach is reach.geometry,
|
||||||
|
self.results.study.river.hydraulic_structures.lst
|
||||||
|
)
|
||||||
|
|
||||||
|
for hs in lhs:
|
||||||
|
x = hs.input_kp
|
||||||
|
z_min = reach.geometry.get_z_min()
|
||||||
|
z_max = reach.geometry.get_z_max()
|
||||||
|
|
||||||
|
self.canvas.axes.plot(
|
||||||
|
[x, x],
|
||||||
|
[min(z_min), max(z_max)],
|
||||||
|
linestyle="solid",
|
||||||
|
lw=1.,
|
||||||
|
color=self.color_plot_previous,
|
||||||
|
)
|
||||||
|
|
||||||
|
self.canvas.axes.annotate(
|
||||||
|
" > " + hs.name,
|
||||||
|
(x, max(z_max)),
|
||||||
|
horizontalalignment='left',
|
||||||
|
verticalalignment='top',
|
||||||
|
annotation_clip=True,
|
||||||
|
fontsize=9, color=self.color_plot_previous,
|
||||||
|
)
|
||||||
|
|
||||||
def sl_compute_bedrock(self, reach):
|
def sl_compute_bedrock(self, reach):
|
||||||
z_min = reach.geometry.get_z_min()
|
z_min = reach.geometry.get_z_min()
|
||||||
sl = self.sl_compute_initial(reach)
|
sl = self.sl_compute_initial(reach)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue