auto BC generation

This commit is contained in:
Theophile Terraz committed 2024-08-07 17:49:52 +02:00
1 parent fb62298bd2
commit 3693c32d4b
6 files changed
+119 -4

No files matched your search

+3 -4
View File
@@ -436,8 +436,6 @@ class ProfileXYZ(Profile, SQLSubModel):
area += poly.area
return area
return poly.area
def wet_radius(self, z):
p = self.wet_perimeter(z)
a = self.wet_area(z)
@@ -482,14 +480,15 @@ class ProfileXYZ(Profile, SQLSubModel):
if zz[i] < z:
line.append([station[i], zz[i]])
if zz[i] <= z and zz[i+1] > z:
if zz[i] <= z and zz[i+1] >= z:
y = np.interp(
z,
[zz[i], zz[i+1]],
[station[i], station[i+1]]
)
line.append([y, z])
lines.append(geometry.LineString(line))
if len(line) > 2:
lines.append(geometry.LineString(line))
line = []
return lines