-
Is there any functionality to read the markers of cross sections, e.g. left levee bank and lowest point? |
Beta Was this translation helpful? Give feedback.
Answered by
gedaskir
Nov 10, 2021
Replies: 1 comment 3 replies
-
Here is an example script to do that: import mikeio1d
from mikeio1d.res1d import Res1D
filename = "MyResults.res1d"
res1d = Res1D(filename)
reaches = list(res1d.data.Reaches)
for reach in reaches:
grid_points = list(reach.GridPoints)
for grid_point in grid_points:
try:
cross_section = grid_point.CrossSection
points = list(cross_section.Points)
left = points[cross_section.LeftLeveeBank]
lowest = points[cross_section.LowestPoint]
right = points[cross_section.RightLeveeBank]
print("Gridpoint:", reach.Name, grid_point.Chainage)
print(" Cross section ID:", cross_section.ID)
print(" Left levee bank coordinates:", left.X, left.Z)
print(" Lowest point coordinates:", lowest.X, lowest.Z)
print(" Right levee bank coordinates:", right.X, right.Z)
except:
pass |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
gedaskir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example script to do that: