mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bc514c565 | ||
|
|
1da3461dfe | ||
|
|
dd5eecb1e2 | ||
|
|
d93917b081 | ||
|
|
a31e2127e7 | ||
|
|
a29df8f904 | ||
|
|
97ebf9324a | ||
|
|
0112ad63d9 | ||
|
|
bcbb440ad4 | ||
|
|
7ef3184699 | ||
|
|
5f6c823301 | ||
|
|
bc4557e21f | ||
|
|
f6e08f203c | ||
|
|
5dcbc6b4e1 | ||
|
|
ebe906fce0 | ||
|
|
911a2bbbff | ||
|
|
706a900c8e | ||
|
|
da03f39425 | ||
|
|
7d42c164fc | ||
|
|
1b2f98494b | ||
|
|
e7b63fe270 | ||
|
|
80ae4c36ad | ||
|
|
41cffd13e0 | ||
|
|
9270dd0ff1 | ||
|
|
ba8a50e0b9 | ||
|
|
fce034419d | ||
|
|
31fe765e51 | ||
|
|
b582e133a1 | ||
|
|
7c4c772f43 | ||
|
|
5fc4e3903a | ||
|
|
c07a863018 | ||
|
|
243941db51 | ||
|
|
d6c1316178 | ||
|
|
f35048b89f | ||
|
|
24d92b2ac0 | ||
|
|
c702862bc4 | ||
|
|
400f6be9e3 | ||
|
|
5fc6951060 | ||
|
|
5ba38d5cd6 | ||
|
|
3e8132646d | ||
|
|
5aef0bbf3c | ||
|
|
bb3dadc0c7 | ||
|
|
7bb176e7c7 | ||
|
|
8c16e4ed58 | ||
|
|
e9315d9be7 | ||
|
|
46738cec6b | ||
|
|
e576bb15f1 | ||
|
|
26d18d26e9 |
No files matched your search
+7
-15
@@ -29,8 +29,8 @@ stages:
|
|||||||
#############
|
#############
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
MAGE_8_VERSION: "v8.3.6"
|
MAGE_8_VERSION: "permalink/latest"
|
||||||
ADISTS_VERSION: "v1.0.2"
|
ADISTS_VERSION: "permalink/latest"
|
||||||
|
|
||||||
dl-mage8-doc:
|
dl-mage8-doc:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
@@ -41,7 +41,7 @@ dl-mage8-doc:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p doc
|
- mkdir -p doc
|
||||||
- cd doc
|
- cd doc
|
||||||
- curl -L -o mage8.pdf https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
- curl -L -o mage8.pdf https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- doc/mage8.pdf
|
- doc/mage8.pdf
|
||||||
@@ -53,17 +53,13 @@ dl-mage8-linux:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
||||||
- mkdir -p mage8-linux
|
- mkdir -p mage8-linux
|
||||||
- cd mage8-linux
|
- cd mage8-linux
|
||||||
- tar xvf ../mage8.tgz
|
- tar xvf ../mage8.tgz
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- mage8-linux/mage
|
- mage8-linux/mage
|
||||||
- mage8-linux/mage_as7
|
|
||||||
- mage8-linux/mage_extraire
|
|
||||||
- mage8-linux/mailleurTT
|
|
||||||
- mage8-linux/libbief.so
|
|
||||||
|
|
||||||
dl-mage8-windows:
|
dl-mage8-windows:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
@@ -72,17 +68,13 @@ dl-mage8-windows:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
||||||
- mkdir -p mage8-windows
|
- mkdir -p mage8-windows
|
||||||
- cd mage8-windows
|
- cd mage8-windows
|
||||||
- tar xvf ../mage8.tgz
|
- tar xvf ../mage8.tgz
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- mage8-windows/mage.exe
|
- mage8-windows/mage.exe
|
||||||
- mage8-windows/mage_as7.exe
|
|
||||||
- mage8-windows/mage_extraire.exe
|
|
||||||
- mage8-windows/mailleurTT.exe
|
|
||||||
- mage8-windows/libbief.dll
|
|
||||||
|
|
||||||
dl-adists-linux:
|
dl-adists-linux:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
@@ -93,7 +85,7 @@ dl-adists-linux:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p adists-linux
|
- mkdir -p adists-linux
|
||||||
- cd adists-linux
|
- cd adists-linux
|
||||||
- curl -L -o adists https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists
|
- curl -L -o adists https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- adists-linux/adists
|
- adists-linux/adists
|
||||||
@@ -107,7 +99,7 @@ dl-adists-windows:
|
|||||||
script:
|
script:
|
||||||
- mkdir -p adists-windows
|
- mkdir -p adists-windows
|
||||||
- cd adists-windows
|
- cd adists-windows
|
||||||
- curl -L -o adists.exe https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists_win64.exe
|
- curl -L -o adists.exe https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists_win64.exe
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- adists-windows/adists.exe
|
- adists-windows/adists.exe
|
||||||
|
|||||||
Binary file not shown.
@@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
platformdirs>=4.2.0
|
platformdirs>=4.2.0
|
||||||
pyshp>=2.3.1
|
pyshp>=2.3.1
|
||||||
|
rasterio==1.3.11
|
||||||
|
#fortranformat==2.0.3
|
||||||
@@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
platformdirs>=4.2.0
|
platformdirs>=4.2.0
|
||||||
pyshp>=2.3.1
|
pyshp>=2.3.1
|
||||||
|
rasterio==1.3.11
|
||||||
|
#fortranformat==2.0.3
|
||||||
@@ -0,0 +1,326 @@
|
|||||||
|
# Internal.py -- Pamhyr
|
||||||
|
# Copyright (C) 2023-2025 INRAE
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from numpy import sign
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
|
from tools import logger_color_red, logger_color_reset, logger_exception
|
||||||
|
from Meshing.AMeshingTool import AMeshingTool
|
||||||
|
|
||||||
|
from Model.Geometry.ProfileXYZ import ProfileXYZ
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
|
class InternalMeshing(AMeshingTool):
|
||||||
|
def __init__(self):
|
||||||
|
super(InternalMeshing, self).__init__()
|
||||||
|
|
||||||
|
###########
|
||||||
|
# Meshing #
|
||||||
|
###########
|
||||||
|
|
||||||
|
def meshing(self, reach,
|
||||||
|
step: float = 50,
|
||||||
|
limites=[-1, -1],
|
||||||
|
linear: bool = True):
|
||||||
|
if reach is None or len(reach.profiles) == 0:
|
||||||
|
return reach
|
||||||
|
|
||||||
|
if limites[0] > limites[1]:
|
||||||
|
lim = limites[1]
|
||||||
|
limites[1] = limites[0]
|
||||||
|
limites[0] = lim
|
||||||
|
elif limites[0] == limites[1]:
|
||||||
|
return reach
|
||||||
|
|
||||||
|
self.st_to_m(reach, limites)
|
||||||
|
self.interpolate_transversal_step(reach,
|
||||||
|
limites,
|
||||||
|
step)
|
||||||
|
self.purge_aligned_points(reach)
|
||||||
|
|
||||||
|
return reach
|
||||||
|
|
||||||
|
def st_to_m(self, reach, limites):
|
||||||
|
|
||||||
|
gl = reach.compute_guidelines()
|
||||||
|
profiles = reach.profiles[limites[0]:limites[1]+1]
|
||||||
|
|
||||||
|
# we make sure that the lines are in the left-to-right order
|
||||||
|
guide_list = [
|
||||||
|
x.name
|
||||||
|
for x in profiles[0].named_points()
|
||||||
|
if x.name in gl[0]
|
||||||
|
]
|
||||||
|
|
||||||
|
guide_list = ["un"] + guide_list + ["np"]
|
||||||
|
max_values = [0] * (len(guide_list) - 1)
|
||||||
|
max_values_index = [0] * (len(guide_list) - 1)
|
||||||
|
# we work between each couple of guidelines
|
||||||
|
for j, p in enumerate(profiles):
|
||||||
|
for i in range(len(guide_list) - 1):
|
||||||
|
index1 = p.named_point_index(guide_list[i])
|
||||||
|
index2 = p.named_point_index(guide_list[i+1])
|
||||||
|
if index2 - index1 > max_values[i]:
|
||||||
|
max_values[i] = index2 - index1
|
||||||
|
max_values_index[i] = j
|
||||||
|
|
||||||
|
for i in range(len(max_values)):
|
||||||
|
for isect in range(max_values_index[i], len(profiles)-1):
|
||||||
|
self.compl_sect(profiles[isect],
|
||||||
|
profiles[isect+1],
|
||||||
|
guide_list[i],
|
||||||
|
guide_list[i+1])
|
||||||
|
|
||||||
|
for isect in reversed(range(0, max_values_index[i])):
|
||||||
|
self.compl_sect(profiles[isect+1],
|
||||||
|
profiles[isect],
|
||||||
|
guide_list[i],
|
||||||
|
guide_list[i+1])
|
||||||
|
|
||||||
|
def interpolate_transversal_step(self,
|
||||||
|
reach,
|
||||||
|
limites,
|
||||||
|
step):
|
||||||
|
# calcul number of intermediate profiles
|
||||||
|
np = []
|
||||||
|
for i in range(limites[0], limites[1]):
|
||||||
|
np.append(int((reach.profiles[i+1].rk -
|
||||||
|
reach.profiles[i].rk) / step) - 1)
|
||||||
|
if np[-1] < 0:
|
||||||
|
np[-1] = 0
|
||||||
|
|
||||||
|
d = [] # ratios
|
||||||
|
p = [] # new profiles
|
||||||
|
ptr = int(limites[0])
|
||||||
|
for i in range(limites[1] - limites[0]):
|
||||||
|
d = 1.0/float(np[i]+1)
|
||||||
|
ptr0 = ptr
|
||||||
|
for j in range(np[i]):
|
||||||
|
p = ProfileXYZ(reach=reach, status=reach._status)
|
||||||
|
# RATIO entre les deux sections initiales
|
||||||
|
dj = float(j+1)*d
|
||||||
|
ptr += 1 # next profile, original
|
||||||
|
for k in range(len(reach.profiles[ptr0].points)):
|
||||||
|
p.add()
|
||||||
|
p.points[k].x = reach.profiles[ptr0].points[k].x + \
|
||||||
|
dj*(reach.profiles[ptr].points[k].x -
|
||||||
|
reach.profiles[ptr0].points[k].x)
|
||||||
|
p.points[k].y = reach.profiles[ptr0].points[k].y + \
|
||||||
|
dj*(reach.profiles[ptr].points[k].y -
|
||||||
|
reach.profiles[ptr0].points[k].y)
|
||||||
|
p.points[k].z = reach.profiles[ptr0].points[k].z + \
|
||||||
|
dj*(reach.profiles[ptr].points[k].z -
|
||||||
|
reach.profiles[ptr0].points[k].z)
|
||||||
|
p.rk = reach.profiles[ptr0].rk + \
|
||||||
|
dj*(reach.profiles[ptr].rk -
|
||||||
|
reach.profiles[ptr0].rk)
|
||||||
|
p.name = f'interpol{p.rk}'
|
||||||
|
reach.insert_profile(ptr, p)
|
||||||
|
ptr += 1 # next profile, original
|
||||||
|
|
||||||
|
def compl_sect(self, sect1, sect2, tag1, tag2):
|
||||||
|
# sect1: reference section
|
||||||
|
# sect2: section to complete
|
||||||
|
# start1 and 2: indices of the first point of the bed to complete
|
||||||
|
# end = start + len
|
||||||
|
# len1 and 2: number of intervals
|
||||||
|
# len1: target len
|
||||||
|
|
||||||
|
if tag1 == '': # left end point
|
||||||
|
start1 = 0
|
||||||
|
start2 = 0
|
||||||
|
else:
|
||||||
|
start1 = sect1.named_point_index(tag1)
|
||||||
|
start2 = sect2.named_point_index(tag1)
|
||||||
|
|
||||||
|
if tag2 == '': # right end point
|
||||||
|
end1 = sect1.nb_points-1
|
||||||
|
end2 = sect2.nb_points-1
|
||||||
|
else:
|
||||||
|
end1 = sect1.named_point_index(tag2)
|
||||||
|
end2 = sect2.named_point_index(tag2)
|
||||||
|
|
||||||
|
len1 = end1 - start1
|
||||||
|
len2 = end2 - start2
|
||||||
|
|
||||||
|
if len1 < len2:
|
||||||
|
self.compl_sect(sect2, sect1, start2, start1,
|
||||||
|
len2, len1, tag1, tag2)
|
||||||
|
return
|
||||||
|
elif len1 == len2:
|
||||||
|
return
|
||||||
|
|
||||||
|
ltot1 = 0.0
|
||||||
|
ltot2 = 0.0
|
||||||
|
alpha = []
|
||||||
|
beta = []
|
||||||
|
# remove names
|
||||||
|
sect2.points[start2].name = ''
|
||||||
|
sect2.points[end2].name = ''
|
||||||
|
for i in range(len1):
|
||||||
|
ltot1 += sect1.point(start1+i).dist(sect1.point(start1+i+1))
|
||||||
|
alpha.append(ltot1)
|
||||||
|
alpha = list(map(lambda x: x/ltot1, alpha)) # target ratios
|
||||||
|
for i in range(len2):
|
||||||
|
ltot2 += sect2.point(start2+i).dist(sect2.point(start2+i+1))
|
||||||
|
beta.append(ltot2)
|
||||||
|
beta = list(map(lambda x: x/ltot2, beta)) # current ratios
|
||||||
|
for i in range(len1 - len2):
|
||||||
|
beta.append(1.0)
|
||||||
|
beta.append(0.0) # beta[-1]
|
||||||
|
if len2 < 1 or ltot2 < 0.0001:
|
||||||
|
# unique point (copy len1 times)
|
||||||
|
# we are at an edge of the profile
|
||||||
|
for i in range(len1-len2):
|
||||||
|
p = sect2.point(start2).copy()
|
||||||
|
sect2.insert_point(start2, p)
|
||||||
|
if tag1 == '': # left end point
|
||||||
|
sect2.point(start2).name = ''
|
||||||
|
if tag2 == '': # left end point
|
||||||
|
sect2.point(start2+1).name = ''
|
||||||
|
len2 += 1
|
||||||
|
elif ltot1 < 0.0001:
|
||||||
|
sect2.add_npoints(len1-len2)
|
||||||
|
len2 = len1
|
||||||
|
else: # regular case
|
||||||
|
# loop on the points to insert
|
||||||
|
for k in range(len1-len2):
|
||||||
|
trouve = False
|
||||||
|
for j0 in range(len2):
|
||||||
|
if trouve:
|
||||||
|
break
|
||||||
|
undeplus = True
|
||||||
|
for j1 in range(j0, len2):
|
||||||
|
if undeplus:
|
||||||
|
if beta[j1] <= alpha[j1]:
|
||||||
|
undeplus = False
|
||||||
|
break
|
||||||
|
if undeplus:
|
||||||
|
if j0 == len2:
|
||||||
|
trouve = True
|
||||||
|
else:
|
||||||
|
j1 = j0+1
|
||||||
|
if beta[j0]-alpha[j0] > alpha[j1]-beta[j0]:
|
||||||
|
trouve = True
|
||||||
|
|
||||||
|
if trouve:
|
||||||
|
len2 += 1
|
||||||
|
for i in reversed(range(j0, len2)):
|
||||||
|
beta[i+1] = beta[i]
|
||||||
|
if (beta[j0] == beta[j0-1]):
|
||||||
|
# rien
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
ratio = (alpha[j0] - beta[j0-1]) \
|
||||||
|
/ (beta[j0] - beta[j0-1])
|
||||||
|
if ratio < 0.0:
|
||||||
|
print(f"ratio négatif {ratio}")
|
||||||
|
# on double le point a gauche
|
||||||
|
p = sect2.point(start2+j0-1).copy()
|
||||||
|
sect2.insert_point(start2+j0-1, p)
|
||||||
|
sect2.point(start2+j0-1).name = ''
|
||||||
|
beta[j0] = beta[j0-1]
|
||||||
|
else:
|
||||||
|
p = sect2.point(start2+j0).copy()
|
||||||
|
sect2.insert_point(start2+j0, p)
|
||||||
|
sect2.point(start2+j0+1).name = ''
|
||||||
|
sect2.point(start2+j0+1).x = \
|
||||||
|
(1.0-ratio) * sect2.point(start2+j0).x + \
|
||||||
|
ratio * sect2.point(start2+j0+2).x
|
||||||
|
sect2.point(start2+j0+1).y = \
|
||||||
|
(1.0-ratio) * sect2.point(start2+j0).y + \
|
||||||
|
ratio * sect2.point(start2+j0+2).y
|
||||||
|
sect2.point(start2+j0+1).z = \
|
||||||
|
(1.0-ratio) * sect2.point(start2+j0).z + \
|
||||||
|
ratio * sect2.point(start2+j0+2).z
|
||||||
|
beta[j0] = (1.-ratio)*beta[j0-1] \
|
||||||
|
+ ratio*beta[j0+1]
|
||||||
|
|
||||||
|
if len1 > len2:
|
||||||
|
for i in range(len1 - len2):
|
||||||
|
p = sect2.point(start2+len2).copy()
|
||||||
|
sect2.insert_point(start2+len2, p)
|
||||||
|
sect2.point(start2+len2).name = ''
|
||||||
|
sect2.point(start2).name = tag1
|
||||||
|
sect2.point(start2+len2).name = tag2
|
||||||
|
sect2.modified()
|
||||||
|
|
||||||
|
def update_rk(self, reach,
|
||||||
|
step: float = 50,
|
||||||
|
limites=[-1, -1],
|
||||||
|
origin=0,
|
||||||
|
directrices=['un', 'np'],
|
||||||
|
lplan: bool = False,
|
||||||
|
lm: int = 3,
|
||||||
|
linear: bool = False,
|
||||||
|
origin_value=0.0,
|
||||||
|
orientation=0):
|
||||||
|
if reach is None or len(reach.profiles) == 0:
|
||||||
|
return reach
|
||||||
|
|
||||||
|
nprof = reach.number_profiles
|
||||||
|
if origin >= nprof or origin < 0:
|
||||||
|
logger.warning(
|
||||||
|
f"Origin outside reach"
|
||||||
|
)
|
||||||
|
return reach
|
||||||
|
|
||||||
|
# orientation is the orintation of the bief:
|
||||||
|
# 1: up -> downstream
|
||||||
|
# 2: down -> upstream
|
||||||
|
# else: keep current orientation
|
||||||
|
if orientation == 1:
|
||||||
|
sgn = 1.0
|
||||||
|
elif orientation == 2:
|
||||||
|
sgn = -1.0
|
||||||
|
else:
|
||||||
|
sgn = sign(reach.profiles[-1].rk - reach.profiles[0].rk)
|
||||||
|
if abs(sgn) < 0.5:
|
||||||
|
sgn = 1.0
|
||||||
|
|
||||||
|
reach.profiles[origin].rk = origin_value
|
||||||
|
|
||||||
|
if origin < nprof - 1:
|
||||||
|
for i in range(origin+1, nprof):
|
||||||
|
# 2D
|
||||||
|
d1 = reach.profiles[i-1].named_point(
|
||||||
|
directrices[0]
|
||||||
|
).dist_2d(reach.profiles[i].named_point(directrices[0]))
|
||||||
|
d2 = reach.profiles[i-1].named_point(
|
||||||
|
directrices[1]
|
||||||
|
).dist_2d(reach.profiles[i].named_point(directrices[1]))
|
||||||
|
reach.profiles[i].rk = reach.profiles[i-1].rk \
|
||||||
|
+ (sgn * (d1 + d2) / 2)
|
||||||
|
if origin > 0:
|
||||||
|
for i in reversed(range(0, origin)):
|
||||||
|
# 2D
|
||||||
|
d1 = reach.profiles[i+1].named_point(
|
||||||
|
directrices[0]
|
||||||
|
).dist_2d(reach.profiles[i].named_point(directrices[0]))
|
||||||
|
d2 = reach.profiles[i+1].named_point(
|
||||||
|
directrices[1]
|
||||||
|
).dist_2d(reach.profiles[i].named_point(directrices[1]))
|
||||||
|
reach.profiles[i].rk = reach.profiles[i+1].rk \
|
||||||
|
- (sgn * (d1 + d2) / 2)
|
||||||
|
|
||||||
|
def purge_aligned_points(self, reach):
|
||||||
|
for p in reach.profiles:
|
||||||
|
p.purge_aligned_points()
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from numpy import sign
|
||||||
|
|
||||||
from ctypes import (
|
from ctypes import (
|
||||||
cdll,
|
cdll,
|
||||||
|
|||||||
@@ -228,3 +228,25 @@ class PointXYZ(Point, SQLSubModel):
|
|||||||
c = PointXYZ.distance(p3, p1)
|
c = PointXYZ.distance(p3, p1)
|
||||||
s = (a + b + c) / 2
|
s = (a + b + c) / 2
|
||||||
return (s*(s-a) * (s-b)*(s-c)) ** 0.5
|
return (s*(s-a) * (s-b)*(s-c)) ** 0.5
|
||||||
|
|
||||||
|
def dist_from_seg(self, p1, p2):
|
||||||
|
a2 = pow(PointXYZ.distance(self, p1), 2)
|
||||||
|
b2 = pow(PointXYZ.distance(self, p2), 2)
|
||||||
|
c2 = pow(PointXYZ.distance(p1, p2), 2)
|
||||||
|
if c2 < 0.00000001:
|
||||||
|
# si les deux points sont confondus
|
||||||
|
d = 0.0
|
||||||
|
else:
|
||||||
|
d = np.sqrt(abs(a2 - pow((c2 - b2 + a2) / (2*np.sqrt(c2)), 2)))
|
||||||
|
|
||||||
|
return d
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
p = PointXYZ(self.x,
|
||||||
|
self.y,
|
||||||
|
self.z,
|
||||||
|
self.name,
|
||||||
|
self._profile,
|
||||||
|
self._status)
|
||||||
|
p.sl = self.sl
|
||||||
|
return p
|
||||||
@@ -88,6 +88,25 @@ class Profile(object):
|
|||||||
def point(self, index):
|
def point(self, index):
|
||||||
return self.points[index]
|
return self.points[index]
|
||||||
|
|
||||||
|
def named_point(self, name):
|
||||||
|
if name == "un":
|
||||||
|
return self.points[0]
|
||||||
|
elif name == "np":
|
||||||
|
return self.points[-1]
|
||||||
|
else:
|
||||||
|
return next((p for p in self.points if p.name == name), None)
|
||||||
|
|
||||||
|
def named_point_index(self, name):
|
||||||
|
if name == "un":
|
||||||
|
return 0
|
||||||
|
elif name == "np":
|
||||||
|
return len(self.points) - 1
|
||||||
|
else:
|
||||||
|
return next(
|
||||||
|
(p for p in enumerate(self.points) if p[1].name == name),
|
||||||
|
None
|
||||||
|
)[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def reach(self):
|
def reach(self):
|
||||||
return self._reach
|
return self._reach
|
||||||
@@ -206,7 +225,7 @@ class Profile(object):
|
|||||||
"""Insert point at index.
|
"""Insert point at index.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
index: The index of new profile.
|
index: The index of new point.
|
||||||
point: The point.
|
point: The point.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|||||||
@@ -882,3 +882,44 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||||||
def modified(self):
|
def modified(self):
|
||||||
self.tab_up_to_date = False
|
self.tab_up_to_date = False
|
||||||
self.station_up_to_date = False
|
self.station_up_to_date = False
|
||||||
|
|
||||||
|
def add_npoints(self, npoints):
|
||||||
|
# add npoints in a profile
|
||||||
|
for k in range(npoints):
|
||||||
|
disti = 0.0
|
||||||
|
i = 1
|
||||||
|
for j in range(len(self.points)-1):
|
||||||
|
distj = self.point(j).dist(self.point(j+1))
|
||||||
|
if distj > disti:
|
||||||
|
disti = distj
|
||||||
|
i = j
|
||||||
|
self.insert_point(i, self.point(i).copy())
|
||||||
|
self.point(i+1).name = ''
|
||||||
|
self.point(i+1).x = 0.5 * self.point(i).x + 0.5 * self.point(i+2).x
|
||||||
|
self.point(i+1).y = 0.5 * self.point(i).y + 0.5 * self.point(i+2).y
|
||||||
|
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
p = ProfileXYZ(name=self.name,
|
||||||
|
rk=self.rk,
|
||||||
|
reach=self.reach,
|
||||||
|
nb_point=0,
|
||||||
|
code1=0, code2=0,
|
||||||
|
status=self.reach._status)
|
||||||
|
for i, k in enumerate(self.points):
|
||||||
|
p.insert_point(i, k.copy())
|
||||||
|
|
||||||
|
return p
|
||||||
|
|
||||||
|
def purge_aligned_points(self):
|
||||||
|
|
||||||
|
align = True
|
||||||
|
while (align):
|
||||||
|
align = False
|
||||||
|
for i in range(1, self.number_points - 1):
|
||||||
|
d = self.point(i).dist_from_seg(self.point(i-1),
|
||||||
|
self.point(i+1))
|
||||||
|
if d < 0.00001 and self.point(i).name == "":
|
||||||
|
align = True
|
||||||
|
self.delete_i([i])
|
||||||
|
break
|
||||||
@@ -83,8 +83,8 @@ class TriangularWeir(BasicHS):
|
|||||||
self._data = [
|
self._data = [
|
||||||
BHSValue("elevation", float, 1.0, status=status),
|
BHSValue("elevation", float, 1.0, status=status),
|
||||||
BHSValue("loading_elevation", float, 9999.999, status=status),
|
BHSValue("loading_elevation", float, 9999.999, status=status),
|
||||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
BHSValue("discharge_coefficient", float, 0.31, status=status),
|
||||||
BHSValue("half-angle_tangent", float, 0.0, status=status),
|
BHSValue("half-angle_tangent", float, 1.0, status=status),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -382,6 +382,8 @@ class InitialConditions(SQLSubModel):
|
|||||||
self._data = []
|
self._data = []
|
||||||
for profile in profiles:
|
for profile in profiles:
|
||||||
width = profile.wet_width(profile.z_min() + height)
|
width = profile.wet_width(profile.z_min() + height)
|
||||||
|
area = profile.wet_area(profile.z_min() + height)
|
||||||
|
radius = profile.wet_radius(profile.z_min() + height)
|
||||||
frictions = self._reach.frictions.frictions
|
frictions = self._reach.frictions.frictions
|
||||||
strickler = None
|
strickler = None
|
||||||
if frictions is not None:
|
if frictions is not None:
|
||||||
@@ -396,9 +398,12 @@ class InitialConditions(SQLSubModel):
|
|||||||
discharge = data_discharge[profile.rk]
|
discharge = data_discharge[profile.rk]
|
||||||
else:
|
else:
|
||||||
discharge = (
|
discharge = (
|
||||||
((width * 0.8)
|
# ((width * 0.8)
|
||||||
* strickler
|
# * strickler
|
||||||
* (height ** (5/3))
|
# * (height ** (5/3))
|
||||||
|
# * (abs(incline) ** (0.5)))
|
||||||
|
(area * strickler
|
||||||
|
* (radius ** (2/3))
|
||||||
* (abs(incline) ** (0.5)))
|
* (abs(incline) ** (0.5)))
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -458,11 +463,14 @@ class InitialConditions(SQLSubModel):
|
|||||||
if not compute_height:
|
if not compute_height:
|
||||||
height = data_height[profile.rk]
|
height = data_height[profile.rk]
|
||||||
else:
|
else:
|
||||||
height = (
|
if abs(incline) <= 0:
|
||||||
discharge
|
height = 0.0
|
||||||
/
|
else:
|
||||||
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
height = (
|
||||||
) ** (0.6)
|
discharge
|
||||||
|
/
|
||||||
|
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
||||||
|
) ** (0.6)
|
||||||
|
|
||||||
elevation = max(
|
elevation = max(
|
||||||
profile.z_min() + height,
|
profile.z_min() + height,
|
||||||
|
|||||||
@@ -77,6 +77,12 @@ class Reach(object):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._profile_mask = list(
|
||||||
|
map(
|
||||||
|
lambda p: p.name[0:8] != 'interpol', self._profiles
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self._profiles)
|
return len(self._profiles)
|
||||||
|
|
||||||
@@ -92,6 +98,10 @@ class Reach(object):
|
|||||||
def profiles(self):
|
def profiles(self):
|
||||||
return self._profiles.copy()
|
return self._profiles.copy()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def profile_mask(self):
|
||||||
|
return self._profile_mask
|
||||||
|
|
||||||
def profile(self, id):
|
def profile(self, id):
|
||||||
return self._profiles[id]
|
return self._profiles[id]
|
||||||
|
|
||||||
|
|||||||
@@ -277,18 +277,19 @@ class SedimentLayer(SQLSubModel):
|
|||||||
"FROM sedimentary_layer "
|
"FROM sedimentary_layer "
|
||||||
)
|
)
|
||||||
|
|
||||||
for row in table:
|
if table is not None:
|
||||||
sl = cls(
|
for row in table:
|
||||||
id=row[0],
|
sl = cls(
|
||||||
name=row[1],
|
id=row[0],
|
||||||
comment=row[2],
|
name=row[1],
|
||||||
status=data['status']
|
comment=row[2],
|
||||||
)
|
status=data['status']
|
||||||
|
)
|
||||||
|
|
||||||
data["sl"] = sl.id
|
data["sl"] = sl.id
|
||||||
sl._layers = Layer._db_load(execute, data)
|
sl._layers = Layer._db_load(execute, data)
|
||||||
|
|
||||||
new.append(sl)
|
new.append(sl)
|
||||||
|
|
||||||
return new
|
return new
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -276,7 +276,8 @@ class Study(SQLModel):
|
|||||||
version = new.execute(
|
version = new.execute(
|
||||||
"SELECT value FROM info WHERE key='study_release'"
|
"SELECT value FROM info WHERE key='study_release'"
|
||||||
)
|
)
|
||||||
new.status.version = int(version[0])
|
if version is not None:
|
||||||
|
new.status.version = int(version[0])
|
||||||
|
|
||||||
# TODO: Load metadata
|
# TODO: Load metadata
|
||||||
new.name = new.execute("SELECT value FROM info WHERE key='name'")[0]
|
new.name = new.execute("SELECT value FROM info WHERE key='name'")[0]
|
||||||
|
|||||||
+1
-1
@@ -135,7 +135,7 @@ class Mage(CommandLineSolver):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
rep_file.write(line.line)
|
rep_file.write(line.line+"\n")
|
||||||
|
|
||||||
def _export_ST(self, study, repertory, qlog, name="0"):
|
def _export_ST(self, study, repertory, qlog, name="0"):
|
||||||
files = []
|
files = []
|
||||||
|
|||||||
+14
-13
@@ -74,10 +74,10 @@ class Rubar3(CommandLineSolver):
|
|||||||
("rubarbe_tf_5", "y"),
|
("rubarbe_tf_5", "y"),
|
||||||
("rubarbe_tf_6", "n"),
|
("rubarbe_tf_6", "n"),
|
||||||
("rubarbe_trased", "y"),
|
("rubarbe_trased", "y"),
|
||||||
("rubarbe_optfpc", "0"),
|
# ("rubarbe_optfpc", "0"),
|
||||||
("rubarbe_ros", "2650.0"),
|
# ("rubarbe_ros", "2650.0"),
|
||||||
("rubarbe_dm", "0.1"),
|
# ("rubarbe_dm", "0.1"),
|
||||||
("rubarbe_segma", "1.0"),
|
# ("rubarbe_segma", "1.0"),
|
||||||
# Sediment parameters
|
# Sediment parameters
|
||||||
("rubarbe_sediment_ros", "2650.0"),
|
("rubarbe_sediment_ros", "2650.0"),
|
||||||
("rubarbe_sediment_por", "0.4"),
|
("rubarbe_sediment_por", "0.4"),
|
||||||
@@ -167,7 +167,7 @@ class Rubar3(CommandLineSolver):
|
|||||||
it = iter(params)
|
it = iter(params)
|
||||||
|
|
||||||
line = 0
|
line = 0
|
||||||
while line < 29:
|
while line < 25:
|
||||||
param = next(it)
|
param = next(it)
|
||||||
name = param.name
|
name = param.name
|
||||||
value = param.value
|
value = param.value
|
||||||
@@ -277,19 +277,20 @@ class Rubar3(CommandLineSolver):
|
|||||||
|
|
||||||
f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n")
|
f.write(f"{ind:>4} {rk:>11.3f} {n_points:>4}\n")
|
||||||
|
|
||||||
for point in profile.points:
|
station = profile.get_station()
|
||||||
|
for i, point in enumerate(profile.points):
|
||||||
label = point.name.lower()
|
label = point.name.lower()
|
||||||
if label != "":
|
if label != "":
|
||||||
if label[0] == "r":
|
if label[0] == "r":
|
||||||
label = label[1].upper()
|
label = label[1].upper()
|
||||||
else:
|
else:
|
||||||
label = label[1].upper()
|
label = " "
|
||||||
else:
|
else:
|
||||||
label = " "
|
label = " "
|
||||||
|
|
||||||
y = point.y
|
y = station[i]
|
||||||
z = point.z
|
z = point.z
|
||||||
dcs = 0.001
|
dcs = 1.0
|
||||||
scs = 1.0
|
scs = 1.0
|
||||||
tmcs = 0.0
|
tmcs = 0.0
|
||||||
|
|
||||||
@@ -444,10 +445,10 @@ class Rubar3(CommandLineSolver):
|
|||||||
z = data[profile.rk][0]
|
z = data[profile.rk][0]
|
||||||
q = data[profile.rk][1]
|
q = data[profile.rk][1]
|
||||||
|
|
||||||
# height = z - profile.z_min()
|
height = z - profile.z_min()
|
||||||
speed = profile.speed(q, z)
|
speed = profile.speed(q, z)
|
||||||
|
|
||||||
return z, speed
|
return height, speed
|
||||||
|
|
||||||
def _export_hydro(self, study, repertory, qlog, name="0"):
|
def _export_hydro(self, study, repertory, qlog, name="0"):
|
||||||
if qlog is not None:
|
if qlog is not None:
|
||||||
@@ -470,7 +471,7 @@ class Rubar3(CommandLineSolver):
|
|||||||
for bc in bcs:
|
for bc in bcs:
|
||||||
f.write(f"{len(bc)}\n")
|
f.write(f"{len(bc)}\n")
|
||||||
for d0, d1 in bc.data:
|
for d0, d1 in bc.data:
|
||||||
f.write(f"{d0} {d1}\n")
|
f.write(f"{d1} {d0}\n")
|
||||||
|
|
||||||
def _export_condav(self, study, repertory, qlog, name="0"):
|
def _export_condav(self, study, repertory, qlog, name="0"):
|
||||||
if qlog is not None:
|
if qlog is not None:
|
||||||
@@ -493,7 +494,7 @@ class Rubar3(CommandLineSolver):
|
|||||||
for bc in bcs:
|
for bc in bcs:
|
||||||
f.write(f"{len(bc)}\n")
|
f.write(f"{len(bc)}\n")
|
||||||
for d0, d1 in bc.data:
|
for d0, d1 in bc.data:
|
||||||
f.write(f"{d0} {d1}\n")
|
f.write(f"{d1} {d0}\n")
|
||||||
|
|
||||||
|
|
||||||
class RubarBE(Rubar3):
|
class RubarBE(Rubar3):
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ solver_long_name = {
|
|||||||
# "mage_fake7": "Mage fake v7",
|
# "mage_fake7": "Mage fake v7",
|
||||||
"adistswc": "Adis-TS_WC",
|
"adistswc": "Adis-TS_WC",
|
||||||
# "rubarbe": "RubarBE",
|
# "rubarbe": "RubarBE",
|
||||||
# "rubar3": "Rubar3",
|
"rubar3": "Rubar3",
|
||||||
}
|
}
|
||||||
|
|
||||||
solver_type_list = {
|
solver_type_list = {
|
||||||
@@ -44,5 +44,5 @@ solver_type_list = {
|
|||||||
# "mage_fake7": MageFake7,
|
# "mage_fake7": MageFake7,
|
||||||
"adistswc": AdisTSwc,
|
"adistswc": AdisTSwc,
|
||||||
# "rubarbe": RubarBE,
|
# "rubarbe": RubarBE,
|
||||||
# "rubar3": Rubar3,
|
"rubar3": Rubar3,
|
||||||
}
|
}
|
||||||
@@ -211,3 +211,26 @@ class TableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
self.layoutAboutToBeChanged.emit()
|
self.layoutAboutToBeChanged.emit()
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
|
def read_from_file(self, file_name, bctype):
|
||||||
|
|
||||||
|
logger.debug(f"Import boundary conditions from {file_name}")
|
||||||
|
data0 = []
|
||||||
|
data1 = []
|
||||||
|
if bctype == "ZD":
|
||||||
|
mult = 1
|
||||||
|
else:
|
||||||
|
mult = 60
|
||||||
|
with open(file_name, encoding="utf-8") as bc_file:
|
||||||
|
for line in bc_file:
|
||||||
|
if not (line.startswith("#") or
|
||||||
|
line.startswith("*") or
|
||||||
|
line.startswith("$")):
|
||||||
|
line = line.split()
|
||||||
|
if bctype == "ZD":
|
||||||
|
data0.append(float(line[0]))
|
||||||
|
else:
|
||||||
|
data0.append(old_pamhyr_date_to_timestamp(line[0]))
|
||||||
|
data1.append(line[1])
|
||||||
|
|
||||||
|
self.replace_data(data0, data1)
|
||||||
@@ -30,10 +30,10 @@ from PyQt5.QtGui import (
|
|||||||
QKeySequence,
|
QKeySequence,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore, QtWidgets
|
||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
Qt, QVariant, QAbstractTableModel, QCoreApplication,
|
Qt, QVariant, QAbstractTableModel, QCoreApplication,
|
||||||
pyqtSlot, pyqtSignal,
|
pyqtSlot, pyqtSignal, QSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
@@ -198,6 +198,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||||
|
self.find(QAction, "action_import").triggered\
|
||||||
|
.connect(self.import_from_file)
|
||||||
self.find(QAction, "action_generate_uniform").triggered.connect(
|
self.find(QAction, "action_generate_uniform").triggered.connect(
|
||||||
self.generate_uniform
|
self.generate_uniform
|
||||||
)
|
)
|
||||||
@@ -293,6 +295,31 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
self._table.sort(False)
|
self._table.sort(False)
|
||||||
self.plot.update()
|
self.plot.update()
|
||||||
|
|
||||||
|
def import_from_file(self):
|
||||||
|
options = QFileDialog.Options()
|
||||||
|
settings = QSettings(QSettings.IniFormat,
|
||||||
|
QSettings.UserScope, 'MyOrg', )
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
if self._data.bctype == "TD":
|
||||||
|
file_types = [self._trad["file_hyd"]]
|
||||||
|
if self._data.bctype == "TZ":
|
||||||
|
file_types = [self._trad["file_lim"]]
|
||||||
|
if self._data.bctype == "ZD":
|
||||||
|
file_types = [self._trad["file_ava"]]
|
||||||
|
file_types.append(self._trad["file_all"])
|
||||||
|
|
||||||
|
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||||
|
self,
|
||||||
|
self._trad["open_file"],
|
||||||
|
"",
|
||||||
|
";; ".join(file_types),
|
||||||
|
options=options
|
||||||
|
)
|
||||||
|
|
||||||
|
if file_name != "":
|
||||||
|
self._table.read_from_file(file_name, self._data.bctype)
|
||||||
|
|
||||||
def move_up(self):
|
def move_up(self):
|
||||||
row = self.index_selected_row()
|
row = self.index_selected_row()
|
||||||
self._table.move_up(row)
|
self._table.move_up(row)
|
||||||
@@ -372,8 +399,12 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||||||
if strickler is None:
|
if strickler is None:
|
||||||
strickler = 25.0
|
strickler = 25.0
|
||||||
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
||||||
q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
# q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
||||||
* (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
# * (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
||||||
|
# for h in height]
|
||||||
|
q = [profile.wet_area(z_min + h) * strickler
|
||||||
|
* (profile.wet_radius(z_min + h) ** (2/3))
|
||||||
|
* (abs(self.slope_value) ** (0.5))
|
||||||
for h in height]
|
for h in height]
|
||||||
for i in range(len(height)):
|
for i in range(len(height)):
|
||||||
height[i] += z_min
|
height[i] += z_min
|
||||||
|
|||||||
@@ -35,6 +35,17 @@ class BCETranslate(BCTranslate):
|
|||||||
self._dict["Boundary Condition Options"] = _translate(
|
self._dict["Boundary Condition Options"] = _translate(
|
||||||
"BoundaryCondition", "Boundary Condition Options")
|
"BoundaryCondition", "Boundary Condition Options")
|
||||||
|
|
||||||
|
self._dict["open_file"] = _translate(
|
||||||
|
"BoundaryCondition", "Open a file")
|
||||||
|
self._dict["file_hyd"] = _translate(
|
||||||
|
"BoundaryCondition", "Mage hydrograph file (*.HYD)")
|
||||||
|
self._dict["file_lim"] = _translate(
|
||||||
|
"BoundaryCondition", "Mage limnigraph file (*.LIM)")
|
||||||
|
self._dict["file_ava"] = _translate(
|
||||||
|
"BoundaryCondition", "Mage rating curve file (*.AVA)")
|
||||||
|
self._dict["file_all"] = _translate(
|
||||||
|
"BoundaryCondition", "All files (*)")
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
"x": _translate("BoundaryCondition", "X"),
|
"x": _translate("BoundaryCondition", "X"),
|
||||||
"y": _translate("BoundaryCondition", "Y"),
|
"y": _translate("BoundaryCondition", "Y"),
|
||||||
|
|||||||
@@ -130,29 +130,29 @@ class D90TableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
n = self._lst[row].name
|
n = self._lst[row].name
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "d90":
|
elif self._headers[column] == "d90":
|
||||||
n = self._lst[row].d90
|
n = self._lst[row].d90
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -132,39 +132,39 @@ class DIFTableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "method":
|
if self._headers[column] == "method":
|
||||||
n = self._lst[row].method
|
n = self._lst[row].method
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "dif":
|
elif self._headers[column] == "dif":
|
||||||
n = self._lst[row].dif
|
n = self._lst[row].dif
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "b":
|
elif self._headers[column] == "b":
|
||||||
n = self._lst[row].b
|
n = self._lst[row].b
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "c":
|
elif self._headers[column] == "c":
|
||||||
n = self._lst[row].c
|
n = self._lst[row].c
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -55,22 +55,22 @@ class DIFTableDefaultModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "method":
|
if self._headers[column] == "method":
|
||||||
n = self._data[row].method
|
n = self._data[row].method
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "dif":
|
elif self._headers[column] == "dif":
|
||||||
n = self._data[row].dif
|
n = self._data[row].dif
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "b":
|
elif self._headers[column] == "b":
|
||||||
n = self._data[row].b
|
n = self._data[row].b
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "c":
|
elif self._headers[column] == "c":
|
||||||
n = self._data[row].c
|
n = self._data[row].c
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ from View.Frictions.UndoCommand import (
|
|||||||
SetNameCommand, SetBeginCommand, SetEndCommand,
|
SetNameCommand, SetBeginCommand, SetEndCommand,
|
||||||
SetBeginStricklerCommand, SetEndStricklerCommand,
|
SetBeginStricklerCommand, SetEndStricklerCommand,
|
||||||
AddCommand, DelCommand, SortCommand,
|
AddCommand, DelCommand, SortCommand,
|
||||||
MoveCommand, PasteCommand, DuplicateCommand,
|
MoveCommand, PasteCommand, DuplicateCommand, ReplaceDataCommand,
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Tools.PamhyrTable import PamhyrTableModel
|
from View.Tools.PamhyrTable import PamhyrTableModel
|
||||||
@@ -99,7 +99,7 @@ class ComboBoxDelegate(QItemDelegate):
|
|||||||
self.commitData.emit(self.sender())
|
self.commitData.emit(self.sender())
|
||||||
|
|
||||||
|
|
||||||
class TableModel(PamhyrTableModel):
|
class FrictionTableModel(PamhyrTableModel):
|
||||||
def _setup_lst(self):
|
def _setup_lst(self):
|
||||||
self._lst = self._data.frictions
|
self._lst = self._data.frictions
|
||||||
self._study = self._opt_data
|
self._study = self._opt_data
|
||||||
@@ -199,6 +199,18 @@ class TableModel(PamhyrTableModel):
|
|||||||
self.endRemoveRows()
|
self.endRemoveRows()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def replace_data(self, new_data):
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
ReplaceDataCommand(
|
||||||
|
self._lst, new_data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
def sort(self, _reverse, parent=QModelIndex()):
|
def sort(self, _reverse, parent=QModelIndex()):
|
||||||
self.layoutAboutToBeChanged.emit()
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
@@ -252,3 +264,32 @@ class TableModel(PamhyrTableModel):
|
|||||||
def redo(self):
|
def redo(self):
|
||||||
self._undo.redo()
|
self._undo.redo()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def read_from_file(self, file_name):
|
||||||
|
|
||||||
|
reach_id = self._study.river.enable_edges().index(self._data) + 1
|
||||||
|
|
||||||
|
logger.debug(f"Import frictions from {file_name}")
|
||||||
|
data = []
|
||||||
|
with open(file_name, encoding="utf-8") as rug_file:
|
||||||
|
for line in rug_file:
|
||||||
|
if line.upper().startswith("K"):
|
||||||
|
if int(line[1:4]) == reach_id:
|
||||||
|
data.append(line[4:].split())
|
||||||
|
|
||||||
|
new_data = []
|
||||||
|
for d in data:
|
||||||
|
new = None
|
||||||
|
minor = float(d[2])
|
||||||
|
medium = float(d[3])
|
||||||
|
for s in self._study.river.stricklers.stricklers:
|
||||||
|
if s.minor == minor and s.medium == medium:
|
||||||
|
new = s
|
||||||
|
break
|
||||||
|
if new is None:
|
||||||
|
new = self._study.river.stricklers.new(len(
|
||||||
|
self._study.river.stricklers))
|
||||||
|
new.minor = minor
|
||||||
|
new.medium = medium
|
||||||
|
new_data.append([self._data, float(d[0]), float(d[1]), new, new])
|
||||||
|
self.replace_data(new_data)
|
||||||
@@ -143,6 +143,42 @@ class AddCommand(QUndoCommand):
|
|||||||
self._frictions.insert(self._index, self._new)
|
self._frictions.insert(self._index, self._new)
|
||||||
|
|
||||||
|
|
||||||
|
class ReplaceDataCommand(QUndoCommand):
|
||||||
|
def __init__(self, frictions, new_data):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._frictions = frictions
|
||||||
|
self._new_data = new_data
|
||||||
|
self._old_rows = list(range(len(frictions)))
|
||||||
|
self._new_rows = list(range(len(new_data)))
|
||||||
|
self._new = []
|
||||||
|
|
||||||
|
self._old_friction = []
|
||||||
|
for row in self._old_rows:
|
||||||
|
self._old_friction.append((row, self._frictions.lst[row]))
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
self._frictions.delete_i(self._new_rows)
|
||||||
|
for row, el in self._old_friction:
|
||||||
|
self._frictions.insert(row, el)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
if len(self._new) == 0:
|
||||||
|
self._frictions.delete_i(self._old_rows)
|
||||||
|
for row in self._new_rows:
|
||||||
|
new = self._frictions.new(row)
|
||||||
|
d = self._new_data[row]
|
||||||
|
new.edge = d[0]
|
||||||
|
new.begin_rk = d[1]
|
||||||
|
new.end_rk = d[2]
|
||||||
|
new.begin_strickler = d[3]
|
||||||
|
new.end_strickler = d[4]
|
||||||
|
self._new.append((row, new))
|
||||||
|
else:
|
||||||
|
for row, el in self._new:
|
||||||
|
self._frictions.insert(row, el)
|
||||||
|
|
||||||
|
|
||||||
class DelCommand(QUndoCommand):
|
class DelCommand(QUndoCommand):
|
||||||
def __init__(self, frictions, rows):
|
def __init__(self, frictions, rows):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|||||||
@@ -26,10 +26,11 @@ from PyQt5.QtGui import (
|
|||||||
QKeySequence,
|
QKeySequence,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from PyQt5 import QtWidgets
|
||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel,
|
||||||
QCoreApplication, QModelIndex, pyqtSlot,
|
QCoreApplication, QModelIndex, pyqtSlot,
|
||||||
QRect,
|
QRect, QSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
@@ -46,7 +47,7 @@ from View.Frictions.UndoCommand import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from View.Frictions.Table import (
|
from View.Frictions.Table import (
|
||||||
TableModel, ComboBoxDelegate
|
FrictionTableModel, ComboBoxDelegate
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||||
@@ -106,7 +107,7 @@ class FrictionsWindow(PamhyrWindow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
table = self.find(QTableView, f"tableView")
|
table = self.find(QTableView, f"tableView")
|
||||||
self._table = TableModel(
|
self._table = FrictionTableModel(
|
||||||
table_view=table,
|
table_view=table,
|
||||||
table_headers=self._trad.get_dict("table_headers"),
|
table_headers=self._trad.get_dict("table_headers"),
|
||||||
editable_headers=[
|
editable_headers=[
|
||||||
@@ -157,6 +158,8 @@ class FrictionsWindow(PamhyrWindow):
|
|||||||
self.plot_2.draw()
|
self.plot_2.draw()
|
||||||
|
|
||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
|
self.find(QAction, "action_import").triggered\
|
||||||
|
.connect(self.import_from_file)
|
||||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||||
@@ -265,3 +268,22 @@ class FrictionsWindow(PamhyrWindow):
|
|||||||
parent=self
|
parent=self
|
||||||
)
|
)
|
||||||
strick.show()
|
strick.show()
|
||||||
|
|
||||||
|
def import_from_file(self):
|
||||||
|
options = QFileDialog.Options()
|
||||||
|
settings = QSettings(QSettings.IniFormat,
|
||||||
|
QSettings.UserScope, 'MyOrg', )
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
file_types = [self._trad["file_rug"], self._trad["file_all"]]
|
||||||
|
|
||||||
|
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||||
|
self,
|
||||||
|
self._trad["open_file"],
|
||||||
|
"",
|
||||||
|
";; ".join(file_types),
|
||||||
|
options=options
|
||||||
|
)
|
||||||
|
|
||||||
|
if file_name != "":
|
||||||
|
self._table.read_from_file(file_name)
|
||||||
@@ -38,6 +38,10 @@ class FrictionsTranslate(MainTranslate):
|
|||||||
self._dict["Edit frictions"] = _translate(
|
self._dict["Edit frictions"] = _translate(
|
||||||
"Frictions", "Edit frictions"
|
"Frictions", "Edit frictions"
|
||||||
)
|
)
|
||||||
|
self._dict["file_rug"] = _translate(
|
||||||
|
"Frictions", "Mage initial frictions file (*.RUG *.rug)")
|
||||||
|
self._dict["file_all"] = _translate(
|
||||||
|
"Frictions", "All files (*)")
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
# "name": self._dict["name"],
|
# "name": self._dict["name"],
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ from PyQt5.QtGui import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel, QItemSelectionModel,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QDialogButtonBox, QComboBox, QUndoStack, QShortcut,
|
QDialogButtonBox, QComboBox, QUndoStack, QShortcut,
|
||||||
QDoubleSpinBox,
|
QDoubleSpinBox, QRadioButton,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ class MeshingDialog(PamhyrDialog):
|
|||||||
self._space_step = 50.0
|
self._space_step = 50.0
|
||||||
self._lplan = False
|
self._lplan = False
|
||||||
self._lm = "3"
|
self._lm = "3"
|
||||||
self._linear = False
|
self._linear = True
|
||||||
self._begin_cs = -1
|
self._begin_cs = -1
|
||||||
self._end_cs = -1
|
self._end_cs = -1
|
||||||
self._begin_dir = "un"
|
self._begin_dir = "un"
|
||||||
@@ -71,7 +71,7 @@ class MeshingDialog(PamhyrDialog):
|
|||||||
self._origin = self._reach.profile(0)
|
self._origin = self._reach.profile(0)
|
||||||
|
|
||||||
self._init_default_values_profiles()
|
self._init_default_values_profiles()
|
||||||
self._init_default_values_guidelines()
|
# self._init_default_values_guidelines()
|
||||||
|
|
||||||
self.set_double_spin_box(
|
self.set_double_spin_box(
|
||||||
"doubleSpinBox_space_step",
|
"doubleSpinBox_space_step",
|
||||||
@@ -83,14 +83,24 @@ class MeshingDialog(PamhyrDialog):
|
|||||||
else:
|
else:
|
||||||
self.set_radio_button("radioButton_spline", True)
|
self.set_radio_button("radioButton_spline", True)
|
||||||
|
|
||||||
|
self.find(QRadioButton, "radioButton_spline").setEnabled(False)
|
||||||
|
self.find(QRadioButton, "radioButton_linear").setEnabled(False)
|
||||||
|
|
||||||
def _init_default_values_profiles(self):
|
def _init_default_values_profiles(self):
|
||||||
profiles = self.profiles
|
profiles = self.profiles
|
||||||
|
|
||||||
self.combobox_add_items("comboBox_begin_rk", profiles)
|
self.combobox_add_items("comboBox_begin_rk", profiles)
|
||||||
self.combobox_add_items("comboBox_end_rk", profiles)
|
self.combobox_add_items("comboBox_end_rk", profiles)
|
||||||
|
|
||||||
self.set_combobox_text("comboBox_begin_rk", profiles[0])
|
r = self.parent.tableView\
|
||||||
self.set_combobox_text("comboBox_end_rk", profiles[-1])
|
.selectionModel()\
|
||||||
|
.selectedRows()
|
||||||
|
if len(r) <= 1:
|
||||||
|
self.set_combobox_text("comboBox_begin_rk", profiles[0])
|
||||||
|
self.set_combobox_text("comboBox_end_rk", profiles[-1])
|
||||||
|
else:
|
||||||
|
self.set_combobox_text("comboBox_begin_rk", profiles[r[0].row()])
|
||||||
|
self.set_combobox_text("comboBox_end_rk", profiles[r[-1].row()])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def profiles(self):
|
def profiles(self):
|
||||||
@@ -167,8 +177,8 @@ class MeshingDialog(PamhyrDialog):
|
|||||||
self._begin_cs = self.profiles.index(p1)
|
self._begin_cs = self.profiles.index(p1)
|
||||||
self._end_cs = self.profiles.index(p2)
|
self._end_cs = self.profiles.index(p2)
|
||||||
|
|
||||||
self._begin_dir = self.get_combobox_text("comboBox_begin_gl")
|
# self._begin_dir = self.get_combobox_text("comboBox_begin_gl")
|
||||||
self._end_dir = self.get_combobox_text("comboBox_end_gl")
|
# self._end_dir = self.get_combobox_text("comboBox_end_gl")
|
||||||
|
|
||||||
super().accept()
|
super().accept()
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.plot_selected = None
|
self.plot_selected = None
|
||||||
self.next_plot_selected = None
|
self.next_plot_selected = None
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -163,6 +163,11 @@ class PlotRKZ(PamhyrPlot):
|
|||||||
)
|
)
|
||||||
self._table.scrollTo(self._table.model().index(ind2, 0))
|
self._table.scrollTo(self._table.model().index(ind2, 0))
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -162,6 +162,11 @@ class PlotXY(PamhyrPlot):
|
|||||||
)
|
)
|
||||||
self._table.scrollTo(self._table.model().index(ind2, 0))
|
self._table.scrollTo(self._table.model().index(ind2, 0))
|
||||||
|
|
||||||
|
@timer
|
||||||
|
def redraw(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.draw()
|
||||||
|
|
||||||
@timer
|
@timer
|
||||||
def draw(self):
|
def draw(self):
|
||||||
self.init_axes()
|
self.init_axes()
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class GeometryReachTableModel(PamhyrTableModel):
|
|||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
def move_down(self, row, parent=QModelIndex()):
|
def move_down(self, row, parent=QModelIndex()):
|
||||||
if row > self._data.number_profiles:
|
if row >= self._data.number_profiles-1:
|
||||||
return
|
return
|
||||||
|
|
||||||
target = row
|
target = row
|
||||||
@@ -276,3 +276,12 @@ class GeometryReachTableModel(PamhyrTableModel):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def change_reach(self, new_reach, parent):
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
ChangeReachCommand(
|
||||||
|
new_reach,
|
||||||
|
parent
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -22,14 +22,12 @@ from copy import deepcopy
|
|||||||
from tools import trace, timer, logger_exception
|
from tools import trace, timer, logger_exception
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QMessageBox, QUndoCommand, QUndoStack,
|
QMessageBox, QUndoCommand, QUndoStack, QTableView
|
||||||
)
|
)
|
||||||
|
|
||||||
from Model.Geometry import Reach
|
from Model.Geometry import Reach
|
||||||
from Model.Except import exception_message_box
|
from Model.Except import exception_message_box
|
||||||
|
|
||||||
from Meshing.Mage import MeshingWithMage
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
@@ -240,7 +238,7 @@ class MeshingCommand(QUndoCommand):
|
|||||||
self._mesher = mesher
|
self._mesher = mesher
|
||||||
self._command = command
|
self._command = command
|
||||||
|
|
||||||
self._profiles = reach.profiles.copy()
|
self._profiles = [p.copy() for p in reach.profiles]
|
||||||
self._profiles.reverse()
|
self._profiles.reverse()
|
||||||
|
|
||||||
self._new_profiles = None
|
self._new_profiles = None
|
||||||
@@ -264,7 +262,7 @@ class MeshingCommand(QUndoCommand):
|
|||||||
**self._data
|
**self._data
|
||||||
)
|
)
|
||||||
|
|
||||||
self._new_profiles = self._reach.profiles.copy()
|
self._new_profiles = [p.copy() for p in self._reach.profiles]
|
||||||
self._new_profiles.reverse()
|
self._new_profiles.reverse()
|
||||||
else:
|
else:
|
||||||
self._reach.purge()
|
self._reach.purge()
|
||||||
@@ -293,6 +291,35 @@ class PurgeCommand(QUndoCommand):
|
|||||||
profile.purge(self._np_purge)
|
profile.purge(self._np_purge)
|
||||||
|
|
||||||
|
|
||||||
|
class ChangeReachCommand(QUndoCommand):
|
||||||
|
def __init__(self, new_reach, parent):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._old_reach = parent._study.river.current_reach()
|
||||||
|
self._new_reach = new_reach
|
||||||
|
self._parent = parent
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
p = self._parent
|
||||||
|
p._reach = self._old_reach.reach
|
||||||
|
p._study.river.set_current_reach(self._old_reach)
|
||||||
|
p.setup_table()
|
||||||
|
p.update_redraw()
|
||||||
|
p.find(QTableView, "tableView").selectionModel()\
|
||||||
|
.selectionChanged\
|
||||||
|
.connect(p.select_current_profile)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
p = self._parent
|
||||||
|
p._reach = self._new_reach.reach
|
||||||
|
p._study.river.set_current_reach(self._new_reach)
|
||||||
|
p.setup_table()
|
||||||
|
p.update_redraw()
|
||||||
|
p.find(QTableView, "tableView").selectionModel()\
|
||||||
|
.selectionChanged\
|
||||||
|
.connect(p.select_current_profile)
|
||||||
|
|
||||||
|
|
||||||
class ShiftCommand(QUndoCommand):
|
class ShiftCommand(QUndoCommand):
|
||||||
def __init__(self, reach, rows, dx, dy, dz):
|
def __init__(self, reach, rows, dx, dy, dz):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|||||||
+50
-19
@@ -32,6 +32,7 @@ from PyQt5.QtGui import (
|
|||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
QModelIndex, Qt, QSettings, pyqtSlot,
|
QModelIndex, Qt, QSettings, pyqtSlot,
|
||||||
QItemSelectionModel, QCoreApplication, QSize,
|
QItemSelectionModel, QCoreApplication, QSize,
|
||||||
|
QItemSelection, QItemSelectionRange,
|
||||||
)
|
)
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QApplication, QMainWindow, QFileDialog, QCheckBox,
|
QApplication, QMainWindow, QFileDialog, QCheckBox,
|
||||||
@@ -47,9 +48,9 @@ from View.Tools.PamhyrWindow import PamhyrWindow
|
|||||||
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
||||||
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||||
|
|
||||||
from Meshing.Mage import (
|
from View.SelectReach.Window import SelectReachWindow
|
||||||
MeshingWithMage, MeshingWithMageMailleurTT
|
|
||||||
)
|
from Meshing.Internal import InternalMeshing
|
||||||
|
|
||||||
from View.Geometry.Table import GeometryReachTableModel
|
from View.Geometry.Table import GeometryReachTableModel
|
||||||
from View.Geometry.PlotXY import PlotXY
|
from View.Geometry.PlotXY import PlotXY
|
||||||
@@ -196,6 +197,7 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
"action_update_rk": self.update_rk,
|
"action_update_rk": self.update_rk,
|
||||||
"action_purge": self.purge,
|
"action_purge": self.purge,
|
||||||
"action_shift": self.shift,
|
"action_shift": self.shift,
|
||||||
|
"action_select_reach": self.select_reach,
|
||||||
}
|
}
|
||||||
|
|
||||||
for action in actions:
|
for action in actions:
|
||||||
@@ -217,9 +219,9 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _update(self, redraw=False, propagate=True):
|
def _update(self, redraw=False, propagate=True):
|
||||||
if redraw:
|
if redraw:
|
||||||
self._plot_xy.draw()
|
self._plot_xy.redraw(data=self._reach)
|
||||||
self._plot_rkc.draw()
|
self._plot_rkc.redraw(data=self._reach)
|
||||||
self._plot_ac.draw()
|
self._plot_ac.redraw(data=self._reach)
|
||||||
|
|
||||||
self.select_current_profile()
|
self.select_current_profile()
|
||||||
|
|
||||||
@@ -285,6 +287,13 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
self.tableView.model().blockSignals(False)
|
self.tableView.model().blockSignals(False)
|
||||||
|
|
||||||
def edit_meshing(self):
|
def edit_meshing(self):
|
||||||
|
|
||||||
|
rows = list(
|
||||||
|
set(
|
||||||
|
(i.row() for i in self.tableView.selectedIndexes())
|
||||||
|
)
|
||||||
|
)
|
||||||
|
selected_rk = [self._reach.profile(r).rk for r in rows]
|
||||||
try:
|
try:
|
||||||
dlg = MeshingDialog(
|
dlg = MeshingDialog(
|
||||||
reach=self._reach,
|
reach=self._reach,
|
||||||
@@ -295,8 +304,6 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
data = {
|
data = {
|
||||||
"step": dlg.space_step,
|
"step": dlg.space_step,
|
||||||
"limites": [dlg.begin_cs, dlg.end_cs],
|
"limites": [dlg.begin_cs, dlg.end_cs],
|
||||||
"directrices": [dlg.begin_dir, dlg.end_dir],
|
|
||||||
"lplan": dlg.lplan,
|
|
||||||
"linear": dlg.linear,
|
"linear": dlg.linear,
|
||||||
}
|
}
|
||||||
self._edit_meshing(data)
|
self._edit_meshing(data)
|
||||||
@@ -304,18 +311,31 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
ind = []
|
||||||
|
for i in range(self._reach.number_profiles):
|
||||||
|
if self._reach.profile(i).rk in selected_rk:
|
||||||
|
ind.append(i)
|
||||||
|
self.tableView.setFocus()
|
||||||
|
selection = self.tableView.selectionModel()
|
||||||
|
index = QItemSelection()
|
||||||
|
if len(ind) > 0:
|
||||||
|
for i in ind:
|
||||||
|
index.append(QItemSelectionRange(
|
||||||
|
self.tableView.model().index(i, 0))
|
||||||
|
)
|
||||||
|
selection.select(
|
||||||
|
index,
|
||||||
|
QItemSelectionModel.Rows |
|
||||||
|
QItemSelectionModel.ClearAndSelect |
|
||||||
|
QItemSelectionModel.Select
|
||||||
|
)
|
||||||
|
|
||||||
def _edit_meshing(self, data):
|
def _edit_meshing(self, data):
|
||||||
try:
|
try:
|
||||||
mesher = MeshingWithMageMailleurTT()
|
mesher = InternalMeshing()
|
||||||
self._table.meshing(mesher, data)
|
self._table.meshing(mesher, data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
raise ExternFileMissingError(
|
|
||||||
module="mage",
|
|
||||||
filename="MailleurTT",
|
|
||||||
path=MeshingWithMageMailleurTT._path(),
|
|
||||||
src_except=e
|
|
||||||
)
|
|
||||||
|
|
||||||
def update_rk(self):
|
def update_rk(self):
|
||||||
try:
|
try:
|
||||||
@@ -338,14 +358,11 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _update_rk(self, data):
|
def _update_rk(self, data):
|
||||||
try:
|
try:
|
||||||
mesher = MeshingWithMageMailleurTT()
|
mesher = InternalMeshing()
|
||||||
self._table.update_rk(mesher, data)
|
self._table.update_rk(mesher, data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
raise ExternFileMissingError(
|
raise ExternFileMissingError(
|
||||||
module="mage",
|
|
||||||
filename="MailleurTT",
|
|
||||||
path=MeshingWithMageMailleurTT._path(),
|
|
||||||
src_except=e
|
src_except=e
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -535,6 +552,20 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
logger_exception(e)
|
logger_exception(e)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def select_reach(self):
|
||||||
|
try:
|
||||||
|
dlg = SelectReachWindow(
|
||||||
|
study=self._study,
|
||||||
|
trad=self._trad,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
|
if dlg.exec():
|
||||||
|
self._table.change_reach(dlg.reach, self)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger_exception(e)
|
||||||
|
return
|
||||||
|
|
||||||
def duplicate(self):
|
def duplicate(self):
|
||||||
rows = [
|
rows = [
|
||||||
row.row() for row in
|
row.row() for row in
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||||||
self.layoutAboutToBeChanged.emit()
|
self.layoutAboutToBeChanged.emit()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
def import_from_results(self, index, results):
|
def import_from_results(self, results):
|
||||||
if results is None:
|
if results is None:
|
||||||
logger.error("No results data")
|
logger.error("No results data")
|
||||||
return
|
return
|
||||||
@@ -281,6 +281,51 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||||||
self.layoutAboutToBeChanged.emit()
|
self.layoutAboutToBeChanged.emit()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def read_from_ini(self, file_name):
|
||||||
|
|
||||||
|
reach_id = self._data.river.enable_edges().index(self._reach) + 1
|
||||||
|
|
||||||
|
logger.debug(f"Import initial conditions from {file_name}")
|
||||||
|
data = []
|
||||||
|
with open(file_name, encoding="utf-8") as ini_file:
|
||||||
|
for line in ini_file:
|
||||||
|
if not (line.startswith("#") or
|
||||||
|
line.startswith("*") or
|
||||||
|
line.startswith("$")):
|
||||||
|
line_split = line.split()
|
||||||
|
formated = False
|
||||||
|
if len(line_split[0]) > 3:
|
||||||
|
formated = True
|
||||||
|
elif len(line_split[2]) > 10:
|
||||||
|
formated = True
|
||||||
|
elif len(line_split[3]) > 11:
|
||||||
|
formated = True
|
||||||
|
elif len(line_split[4]) > 9:
|
||||||
|
formated = True
|
||||||
|
|
||||||
|
if formated: # old PamHyr format
|
||||||
|
if int(line[1:4]) == reach_id:
|
||||||
|
data.append([line[31:40],
|
||||||
|
line[10:20],
|
||||||
|
line[20:31]])
|
||||||
|
else:
|
||||||
|
if int(line_split[0]) == reach_id:
|
||||||
|
data.append([line_split[4],
|
||||||
|
line_split[2],
|
||||||
|
line_split[3]])
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
ReplaceDataCommand(
|
||||||
|
self._lst,
|
||||||
|
list(
|
||||||
|
map(
|
||||||
|
lambda d: self._lst.new_from_data(*d),
|
||||||
|
data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._undo.undo()
|
self._undo.undo()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|||||||
@@ -220,6 +220,8 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||||||
def _update_plot(self):
|
def _update_plot(self):
|
||||||
self.plot_1.draw()
|
self.plot_1.draw()
|
||||||
self.plot_2.draw()
|
self.plot_2.draw()
|
||||||
|
self.plot_1.idle()
|
||||||
|
self.plot_2.idle()
|
||||||
|
|
||||||
def _propagated_update(self, key=Modules(0)):
|
def _propagated_update(self, key=Modules(0)):
|
||||||
if Modules.GEOMETRY not in key:
|
if Modules.GEOMETRY not in key:
|
||||||
@@ -265,20 +267,29 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||||||
settings = QSettings(QSettings.IniFormat,
|
settings = QSettings(QSettings.IniFormat,
|
||||||
QSettings.UserScope, 'MyOrg', )
|
QSettings.UserScope, 'MyOrg', )
|
||||||
options |= QFileDialog.DontUseNativeDialog
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
|
|
||||||
|
file_types = [
|
||||||
|
self._trad["file_bin"],
|
||||||
|
self._trad["file_ini"],
|
||||||
|
self._trad["file_all"],
|
||||||
|
]
|
||||||
|
file_name, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||||
self,
|
self,
|
||||||
self._trad["open_file"],
|
self._trad["open_file"],
|
||||||
"",
|
"",
|
||||||
";; ".join(["Mage (*.BIN)"]),
|
";; ".join(file_types),
|
||||||
options=options
|
options=options
|
||||||
)
|
)
|
||||||
|
|
||||||
if filename != "":
|
if file_name != "":
|
||||||
size = os.stat(filename).st_size
|
size = os.stat(file_name).st_size
|
||||||
# self._table.import_geometry(0, filename)
|
# self._table.import_geometry(0, file_name)
|
||||||
self._import_from_file(filename)
|
if file_name[-4:] == ".BIN":
|
||||||
|
self._import_from_bin_file(file_name)
|
||||||
|
elif file_name[-4:].upper() == ".INI":
|
||||||
|
self._import_from_ini_file(file_name)
|
||||||
|
|
||||||
def _import_from_file(self, file_name):
|
def _import_from_bin_file(self, file_name):
|
||||||
solver = Mage8("dummy")
|
solver = Mage8("dummy")
|
||||||
name = os.path.basename(file_name)\
|
name = os.path.basename(file_name)\
|
||||||
.replace(".BIN", "")
|
.replace(".BIN", "")
|
||||||
@@ -305,9 +316,13 @@ class InitialConditionsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _import_from_results(self, results):
|
def _import_from_results(self, results):
|
||||||
logger.debug(f"import from results: {results}")
|
logger.debug(f"import from results: {results}")
|
||||||
row = self.index_selected_row()
|
self._table.import_from_results(results)
|
||||||
|
self._update()
|
||||||
|
|
||||||
self._table.import_from_results(row, results)
|
def _import_from_ini_file(self, file_name):
|
||||||
|
logger.debug(f"import from INI file: {file_name}")
|
||||||
|
self._table.read_from_ini(file_name)
|
||||||
|
self._update()
|
||||||
|
|
||||||
def move_up(self):
|
def move_up(self):
|
||||||
row = self.index_selected_row()
|
row = self.index_selected_row()
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ class ICTranslate(MainTranslate):
|
|||||||
self._dict["discharge"] = self._dict["unit_discharge"]
|
self._dict["discharge"] = self._dict["unit_discharge"]
|
||||||
self._dict["rk"] = self._dict["unit_rk"]
|
self._dict["rk"] = self._dict["unit_rk"]
|
||||||
|
|
||||||
|
self._dict["open_file"] = _translate(
|
||||||
|
"InitialCondition", "Open a file")
|
||||||
|
self._dict["file_bin"] = _translate(
|
||||||
|
"InitialCondition", "Mage results file (*.BIN)")
|
||||||
|
self._dict["file_ini"] = _translate(
|
||||||
|
"InitialCondition", "Mage initial conditions file (*.INI *.ini)")
|
||||||
|
self._dict["file_all"] = _translate(
|
||||||
|
"InitialCondition", "All files (*)")
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
# "name": _translate("InitialCondition", "Name"),
|
# "name": _translate("InitialCondition", "Name"),
|
||||||
"rk": self._dict["unit_rk"],
|
"rk": self._dict["unit_rk"],
|
||||||
|
|||||||
@@ -129,49 +129,49 @@ class InitialConditionTableModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
n = self._lst[row].name
|
n = self._lst[row].name
|
||||||
if n is None or n == "":
|
if n is None or n == "":
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "reach":
|
elif self._headers[column] == "reach":
|
||||||
n = self._lst[row].reach
|
n = self._lst[row].reach
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return next(filter(
|
return next(filter(
|
||||||
lambda edge: edge.id == n, self._river.edges()
|
lambda edge: edge.id == n, self._river.edges()
|
||||||
)).name
|
)).name
|
||||||
elif self._headers[column] is "start_rk":
|
elif self._headers[column] == "start_rk":
|
||||||
n = self._lst[row].start_rk
|
n = self._lst[row].start_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "end_rk":
|
elif self._headers[column] == "end_rk":
|
||||||
n = self._lst[row].end_rk
|
n = self._lst[row].end_rk
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "concentration":
|
elif self._headers[column] == "concentration":
|
||||||
n = self._lst[row].concentration
|
n = self._lst[row].concentration
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "eg":
|
elif self._headers[column] == "eg":
|
||||||
n = self._lst[row].eg
|
n = self._lst[row].eg
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "em":
|
elif self._headers[column] == "em":
|
||||||
n = self._lst[row].em
|
n = self._lst[row].em
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "ed":
|
elif self._headers[column] == "ed":
|
||||||
n = self._lst[row].ed
|
n = self._lst[row].ed
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "rate":
|
elif self._headers[column] == "rate":
|
||||||
n = self._lst[row].rate
|
n = self._lst[row].rate
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -55,24 +55,24 @@ class InitialConditionTableDefaultModel(PamhyrTableModel):
|
|||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
||||||
if self._headers[column] is "name":
|
if self._headers[column] == "name":
|
||||||
return self._data[row].name
|
return self._data[row].name
|
||||||
elif self._headers[column] is "concentration":
|
elif self._headers[column] == "concentration":
|
||||||
n = self._data[row].concentration
|
n = self._data[row].concentration
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "eg":
|
elif self._headers[column] == "eg":
|
||||||
n = self._data[row].eg
|
n = self._data[row].eg
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "em":
|
elif self._headers[column] == "em":
|
||||||
n = self._data[row].em
|
n = self._data[row].em
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
return n
|
return n
|
||||||
elif self._headers[column] is "ed":
|
elif self._headers[column] == "ed":
|
||||||
n = self._data[row].ed
|
n = self._data[row].ed
|
||||||
if n is None:
|
if n is None:
|
||||||
return self._trad['not_associated']
|
return self._trad['not_associated']
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from tools import trace, timer
|
from tools import trace, timer, old_pamhyr_date_to_timestamp
|
||||||
|
|
||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel,
|
||||||
@@ -38,7 +38,7 @@ from View.LateralContribution.UndoCommand import (
|
|||||||
SetNameCommand, SetEdgeCommand, SetTypeCommand,
|
SetNameCommand, SetEdgeCommand, SetTypeCommand,
|
||||||
SetBeginCommand, SetEndCommand,
|
SetBeginCommand, SetEndCommand,
|
||||||
AddCommand, DelCommand, SortCommand,
|
AddCommand, DelCommand, SortCommand,
|
||||||
MoveCommand, PasteCommand, DuplicateCommand,
|
MoveCommand, PasteCommand, DuplicateCommand, ImportCommand,
|
||||||
)
|
)
|
||||||
|
|
||||||
from Model.LateralContribution.LateralContributionTypes import (
|
from Model.LateralContribution.LateralContributionTypes import (
|
||||||
@@ -116,17 +116,20 @@ class ComboBoxDelegate(QItemDelegate):
|
|||||||
def setModelData(self, editor, model, index):
|
def setModelData(self, editor, model, index):
|
||||||
text = str(editor.currentText())
|
text = str(editor.currentText())
|
||||||
|
|
||||||
if self._mode == "rk":
|
if self._data is None:
|
||||||
profiles = list(
|
|
||||||
filter(
|
|
||||||
lambda p: p.display_name() == text,
|
|
||||||
self._data.reach.profiles
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
value = profiles[0].rk if len(profiles) > 0 else None
|
|
||||||
else:
|
|
||||||
value = text
|
value = text
|
||||||
|
else:
|
||||||
|
if self._mode == "rk" and self._data.reach is not None:
|
||||||
|
profiles = list(
|
||||||
|
filter(
|
||||||
|
lambda p: p.display_name() == text,
|
||||||
|
self._data.reach.profiles
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
value = profiles[0].rk if len(profiles) > 0 else None
|
||||||
|
else:
|
||||||
|
value = text
|
||||||
|
|
||||||
model.setData(index, value)
|
model.setData(index, value)
|
||||||
editor.close()
|
editor.close()
|
||||||
@@ -293,3 +296,44 @@ class TableModel(PamhyrTableModel):
|
|||||||
|
|
||||||
self.endMoveRows()
|
self.endMoveRows()
|
||||||
self.layoutChanged.emit()
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def read_from_lat(self, file_name):
|
||||||
|
logger.debug(f"Import lateral contributions from {file_name}")
|
||||||
|
data = []
|
||||||
|
current_reach = -1
|
||||||
|
with open(file_name, encoding="utf-8") as lat_file:
|
||||||
|
for line in lat_file:
|
||||||
|
if not (line.startswith("#") or
|
||||||
|
line.startswith("*") or
|
||||||
|
len(line) < 1):
|
||||||
|
line = line.split()
|
||||||
|
if line[0] == "$":
|
||||||
|
current_reach = int(line[1]) - 1
|
||||||
|
if (current_reach <= len(self._data.enable_edges()) and
|
||||||
|
current_reach >= 0):
|
||||||
|
data.append(
|
||||||
|
[self._data.enable_edges()[current_reach],
|
||||||
|
float(line[2]),
|
||||||
|
float(line[3])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
if (current_reach <= len(self._data.enable_edges()) and
|
||||||
|
current_reach >= 0):
|
||||||
|
data[-1].append(
|
||||||
|
[
|
||||||
|
old_pamhyr_date_to_timestamp(line[0]),
|
||||||
|
float(line[1])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
|
||||||
|
self._undo.push(
|
||||||
|
ImportCommand(
|
||||||
|
self._lst, self._tab, data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
self.layoutChanged.emit()
|
||||||
@@ -28,6 +28,10 @@ from Model.LateralContribution.LateralContributionList import (
|
|||||||
LateralContributionList
|
LateralContributionList
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from Model.LateralContribution.LateralContributionTypes import (
|
||||||
|
NotDefined, LateralContrib,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SetNameCommand(QUndoCommand):
|
class SetNameCommand(QUndoCommand):
|
||||||
def __init__(self, lcs, tab, index, new_value):
|
def __init__(self, lcs, tab, index, new_value):
|
||||||
@@ -143,13 +147,13 @@ class DelCommand(QUndoCommand):
|
|||||||
self._tab = tab
|
self._tab = tab
|
||||||
self._rows = rows
|
self._rows = rows
|
||||||
|
|
||||||
self._bc = []
|
self._lc = []
|
||||||
for row in rows:
|
for row in rows:
|
||||||
self._bc.append((row, self._lcs.get(self._tab, row)))
|
self._lc.append((row, self._lcs.get(self._tab, row)))
|
||||||
self._bc.sort()
|
self._lc.sort()
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
for row, el in self._bc:
|
for row, el in self._lc:
|
||||||
self._lcs.insert(self._tab, row, el)
|
self._lcs.insert(self._tab, row, el)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
@@ -213,36 +217,73 @@ class MoveCommand(QUndoCommand):
|
|||||||
|
|
||||||
|
|
||||||
class PasteCommand(QUndoCommand):
|
class PasteCommand(QUndoCommand):
|
||||||
def __init__(self, lcs, tab, row, bc):
|
def __init__(self, lcs, tab, row, lc):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
self._lcs = lcs
|
self._lcs = lcs
|
||||||
self._tab = tab
|
self._tab = tab
|
||||||
self._row = row
|
self._row = row
|
||||||
self._bc = deepcopy(bc)
|
self._lc = deepcopy(lc)
|
||||||
self._bc.reverse()
|
self._lc.reverse()
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._lcs.delete(self._tab, self._bc)
|
self._lcs.delete(self._tab, self._lc)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
for bc in self._bc:
|
for lc in self._lc:
|
||||||
self._lcs.insert(self._tab, self._row, bc)
|
self._lcs.insert(self._tab, self._row, lc)
|
||||||
|
|
||||||
|
|
||||||
|
class ImportCommand(QUndoCommand):
|
||||||
|
def __init__(self, lcs, tab, data):
|
||||||
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
|
self._tab = tab
|
||||||
|
self._lcs = lcs
|
||||||
|
self._data = data
|
||||||
|
self._old_rows = list(range(len(self._lcs.get_tab(self._tab))))
|
||||||
|
self._new_rows = list(range(len(self._data)))
|
||||||
|
|
||||||
|
self._new_lc = None
|
||||||
|
self._old_lc = []
|
||||||
|
for row in self._old_rows:
|
||||||
|
self._old_lc.append((row, self._lcs.get(self._tab, row)))
|
||||||
|
|
||||||
|
def undo(self):
|
||||||
|
self._lcs.delete_i(self._tab, self._new_rows)
|
||||||
|
for row, el in self._old_lc:
|
||||||
|
self._lcs.insert(self._tab, row, el)
|
||||||
|
|
||||||
|
def redo(self):
|
||||||
|
self._lcs.delete_i(self._tab, self._old_rows)
|
||||||
|
if self._new_lc is None:
|
||||||
|
self._new_lc = []
|
||||||
|
for row, data in enumerate(self._data):
|
||||||
|
new = LateralContrib(status=self._lcs._status)
|
||||||
|
new.edge = data[0]
|
||||||
|
new.begin_rk = data[1]
|
||||||
|
new.end_rk = data[2]
|
||||||
|
for i, val in enumerate(data[3:]):
|
||||||
|
new.insert(i, val)
|
||||||
|
self._new_lc.append(new)
|
||||||
|
|
||||||
|
for row, el in enumerate(self._new_lc):
|
||||||
|
self._lcs.insert(self._tab, row, el)
|
||||||
|
|
||||||
|
|
||||||
class DuplicateCommand(QUndoCommand):
|
class DuplicateCommand(QUndoCommand):
|
||||||
def __init__(self, lcs, tab, rows, bc):
|
def __init__(self, lcs, tab, rows, lc):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
||||||
self._lcs = lcs
|
self._lcs = lcs
|
||||||
self._tab = tab
|
self._tab = tab
|
||||||
self._rows = rows
|
self._rows = rows
|
||||||
self._bc = deepcopy(bc)
|
self._lc = deepcopy(lc)
|
||||||
self._bc.reverse()
|
self._lc.reverse()
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._lcs.delete(self._tab, self._bc)
|
self._lcs.delete(self._tab, self._lc)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
for bc in self._lcs:
|
for lc in self._lcs:
|
||||||
self._lcs.insert(self._tab, self._rows[0], bc)
|
self._lcs.insert(self._tab, self._rows[0], lc)
|
||||||
@@ -22,6 +22,7 @@ from tools import trace, timer
|
|||||||
|
|
||||||
from View.Tools.PamhyrWindow import PamhyrWindow
|
from View.Tools.PamhyrWindow import PamhyrWindow
|
||||||
|
|
||||||
|
from PyQt5 import QtWidgets
|
||||||
from PyQt5.QtGui import (
|
from PyQt5.QtGui import (
|
||||||
QKeySequence,
|
QKeySequence,
|
||||||
)
|
)
|
||||||
@@ -29,7 +30,7 @@ from PyQt5.QtGui import (
|
|||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel,
|
||||||
QCoreApplication, QModelIndex, pyqtSlot,
|
QCoreApplication, QModelIndex, pyqtSlot,
|
||||||
QRect,
|
QRect, QSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
@@ -153,6 +154,8 @@ class LateralContributionWindow(PamhyrWindow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
|
self.find(QAction, "action_import").triggered.connect(
|
||||||
|
self.import_from_file)
|
||||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||||
self.find(QAction, "action_edit").triggered.connect(self.edit)
|
self.find(QAction, "action_edit").triggered.connect(self.edit)
|
||||||
@@ -297,3 +300,26 @@ class LateralContributionWindow(PamhyrWindow):
|
|||||||
parent=self
|
parent=self
|
||||||
)
|
)
|
||||||
win.show()
|
win.show()
|
||||||
|
|
||||||
|
def import_from_file(self):
|
||||||
|
options = QFileDialog.Options()
|
||||||
|
settings = QSettings(QSettings.IniFormat,
|
||||||
|
QSettings.UserScope, 'MyOrg', )
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
file_types = [
|
||||||
|
self._trad["file_lat"],
|
||||||
|
self._trad["file_all"],
|
||||||
|
]
|
||||||
|
|
||||||
|
filename, _ = QtWidgets.QFileDialog.getOpenFileName(
|
||||||
|
self,
|
||||||
|
self._trad["open_file"],
|
||||||
|
"",
|
||||||
|
";; ".join(file_types),
|
||||||
|
options=options
|
||||||
|
)
|
||||||
|
|
||||||
|
if filename != "":
|
||||||
|
tab = self.current_tab()
|
||||||
|
self._table[tab].read_from_lat(filename)
|
||||||
@@ -52,6 +52,10 @@ class LCTranslate(MainTranslate):
|
|||||||
self._dict["x"] = _translate("Geometry", "X (m)")
|
self._dict["x"] = _translate("Geometry", "X (m)")
|
||||||
self._dict["y"] = _translate("Geometry", "Y (m)")
|
self._dict["y"] = _translate("Geometry", "Y (m)")
|
||||||
self._dict["z"] = _translate("Geometry", "Z (m)")
|
self._dict["z"] = _translate("Geometry", "Z (m)")
|
||||||
|
self._dict["file_lat"] = _translate(
|
||||||
|
"LateralContribution", "Shapefile (*.LAT *.lat)")
|
||||||
|
self._dict["file_all"] = _translate(
|
||||||
|
"LateralContribution", "All files (*)")
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
"name": self._dict["name"],
|
"name": self._dict["name"],
|
||||||
|
|||||||
@@ -1650,8 +1650,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
result3.set("nb_profile", result1.get("nb_profile"))
|
result3.set("nb_profile", result1.get("nb_profile"))
|
||||||
result4.set("nb_profile", result1.get("nb_profile"))
|
result4.set("nb_profile", result1.get("nb_profile"))
|
||||||
result5.set("nb_profile", result1.get("nb_profile"))
|
result5.set("nb_profile", result1.get("nb_profile"))
|
||||||
ts = list(result1.get("timestamps").intersection(
|
ts = sorted(list(result1.get("timestamps").intersection(
|
||||||
result2.get("timestamps")))
|
result2.get("timestamps"))))
|
||||||
result3.set("timestamps", ts)
|
result3.set("timestamps", ts)
|
||||||
result4.set("timestamps", ts)
|
result4.set("timestamps", ts)
|
||||||
result5.set("timestamps", ts)
|
result5.set("timestamps", ts)
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ class GraphWidget(QGraphicsView):
|
|||||||
def setup_scene(self, min_size, max_size, size):
|
def setup_scene(self, min_size, max_size, size):
|
||||||
scene = QGraphicsScene(self)
|
scene = QGraphicsScene(self)
|
||||||
scene.setItemIndexMethod(QGraphicsScene.NoIndex)
|
scene.setItemIndexMethod(QGraphicsScene.NoIndex)
|
||||||
scene.setSceneRect(0, 0, 2000, 2000)
|
scene.setSceneRect(0, 0, 6000, 6000)
|
||||||
|
|
||||||
self.setScene(scene)
|
self.setScene(scene)
|
||||||
self.setCacheMode(QGraphicsView.CacheBackground)
|
self.setCacheMode(QGraphicsView.CacheBackground)
|
||||||
@@ -486,6 +486,7 @@ class GraphWidget(QGraphicsView):
|
|||||||
|
|
||||||
self.scale(1, 1)
|
self.scale(1, 1)
|
||||||
self.previousScale = 1
|
self.previousScale = 1
|
||||||
|
self.centerOn(1000.0, 1000.0)
|
||||||
|
|
||||||
if min_size:
|
if min_size:
|
||||||
self.setMinimumSize(*min_size)
|
self.setMinimumSize(*min_size)
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# ShiftDialog.py -- Pamhyr
|
||||||
|
# Copyright (C) 2023-2024 INRAE
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
from PyQt5.QtWidgets import QDoubleSpinBox, QPushButton
|
||||||
|
|
||||||
|
|
||||||
|
class CoordinatesDialog(PamhyrDialog):
|
||||||
|
_pamhyr_ui = "GeotiffCoordinates"
|
||||||
|
_pamhyr_name = "ImageCoordinates"
|
||||||
|
|
||||||
|
def __init__(self, x, y, trad=None, parent=None):
|
||||||
|
super(CoordinatesDialog, self).__init__(
|
||||||
|
title=trad[self._pamhyr_name],
|
||||||
|
trad=trad,
|
||||||
|
options=[],
|
||||||
|
parent=parent
|
||||||
|
)
|
||||||
|
|
||||||
|
self.spinbox = {}
|
||||||
|
self._init_default_values(x, y)
|
||||||
|
self.setup_connections()
|
||||||
|
|
||||||
|
def _init_default_values(self, x, y):
|
||||||
|
self._x = x
|
||||||
|
self._y = y
|
||||||
|
self._values = {"bottom": x[0],
|
||||||
|
"top": x[1],
|
||||||
|
"left": y[0],
|
||||||
|
"right": y[1]}
|
||||||
|
self.spinbox = {}
|
||||||
|
for t in self._values:
|
||||||
|
self.spinbox[t] = self.find(QDoubleSpinBox, f"doubleSpinBox_{t}")
|
||||||
|
self.reset(t)
|
||||||
|
|
||||||
|
def setup_connections(self):
|
||||||
|
for t in self._values:
|
||||||
|
self.find(QPushButton,
|
||||||
|
f"pushButton_{t}").clicked.connect(
|
||||||
|
lambda state, x=t: self.reset(x))
|
||||||
|
|
||||||
|
def reset(self, t):
|
||||||
|
self.spinbox[t].setValue(self._values[t])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def x(self):
|
||||||
|
return [self._values["bottom"], self._values["top"]]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def y(self):
|
||||||
|
return [self._values["left"], self._values["right"]]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def values(self):
|
||||||
|
return [self._values[t] for t in self._values]
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
for t in self._values:
|
||||||
|
self._values[t] = self.get_double_spin_box(f"doubleSpinBox_{t}")
|
||||||
|
super().accept()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.close()
|
||||||
@@ -1388,7 +1388,7 @@ class CustomPlot(PamhyrPlot):
|
|||||||
self._reach = reach_id
|
self._reach = reach_id
|
||||||
self._profile = 0
|
self._profile = 0
|
||||||
|
|
||||||
self.update()
|
self.draw()
|
||||||
|
|
||||||
def set_profile(self, profile_id):
|
def set_profile(self, profile_id):
|
||||||
self._profile = profile_id
|
self._profile = profile_id
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ _translate = QCoreApplication.translate
|
|||||||
|
|
||||||
class PlotAC(PamhyrPlot):
|
class PlotAC(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, trad=None, toolbar=None,
|
def __init__(self, canvas=None, trad=None, toolbar=None,
|
||||||
results=None, reach_id=0, profile_id=0, res_id=0,
|
results=None, reach_id=0, profile_id=[0], res_id=[0],
|
||||||
parent=None):
|
parent=None):
|
||||||
super(PlotAC, self).__init__(
|
super(PlotAC, self).__init__(
|
||||||
canvas=canvas,
|
canvas=canvas,
|
||||||
@@ -83,6 +83,7 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.draw_profile(reach, profile)
|
self.draw_profile(reach, profile)
|
||||||
self.draw_water_elevation(reach, profile)
|
self.draw_water_elevation(reach, profile)
|
||||||
self.draw_water_elevation_max(reach, profile)
|
self.draw_water_elevation_max(reach, profile)
|
||||||
|
self.draw_gl()
|
||||||
|
|
||||||
self.enable_legend()
|
self.enable_legend()
|
||||||
|
|
||||||
@@ -134,6 +135,63 @@ class PlotAC(PamhyrPlot):
|
|||||||
lw=1., color=self.color_plot_river_water,
|
lw=1., color=self.color_plot_river_water,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def draw_gl(self):
|
||||||
|
|
||||||
|
results = self.results[self._current_res_id]
|
||||||
|
reach = results.river.reach(self._current_reach_id)
|
||||||
|
profile = reach.profile(self._current_profile_id)
|
||||||
|
if profile is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
station = profile.geometry.get_station()
|
||||||
|
elevation = profile.geometry.z()
|
||||||
|
gl = profile.geometry.names()
|
||||||
|
|
||||||
|
self.annotation = []
|
||||||
|
self.cgl, self.igl = reach.geometry.compute_guidelines()
|
||||||
|
|
||||||
|
lcomplete = list(self.cgl)
|
||||||
|
lincomplete = list(self.igl)
|
||||||
|
|
||||||
|
self.color_complete_gl = self.colors
|
||||||
|
self.color_incomplete_gl = 2 * ["grey"]
|
||||||
|
|
||||||
|
x_gl_complete = []
|
||||||
|
y_gl_complete = []
|
||||||
|
x_gl_incomplete = []
|
||||||
|
y_gl_incomplete = []
|
||||||
|
|
||||||
|
for i, txt in enumerate(gl):
|
||||||
|
if txt == "":
|
||||||
|
continue
|
||||||
|
|
||||||
|
if txt.strip() in self.cgl:
|
||||||
|
color = self.color_complete_gl[
|
||||||
|
lcomplete.index(txt) % len(self.color_complete_gl)
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
color = self.color_incomplete_gl[
|
||||||
|
lincomplete.index(txt)
|
||||||
|
]
|
||||||
|
|
||||||
|
annotation = self.canvas.axes.annotate(
|
||||||
|
txt, (station[i], elevation[i]),
|
||||||
|
horizontalalignment='left',
|
||||||
|
verticalalignment='top',
|
||||||
|
annotation_clip=True,
|
||||||
|
fontsize=11, color=color
|
||||||
|
)
|
||||||
|
|
||||||
|
annotation.set_position((station[i] + 0., elevation[i] + 0.))
|
||||||
|
self.annotation.append(annotation)
|
||||||
|
|
||||||
|
if txt.strip() in self.cgl:
|
||||||
|
x_gl_complete.append(station[i])
|
||||||
|
y_gl_complete.append(elevation[i])
|
||||||
|
else:
|
||||||
|
x_gl_incomplete.append(station[i])
|
||||||
|
y_gl_incomplete.append(elevation[i])
|
||||||
|
|
||||||
def set_reach(self, reach_id):
|
def set_reach(self, reach_id):
|
||||||
self._current_reach_id = reach_id
|
self._current_reach_id = reach_id
|
||||||
self._current_profile_id = 0
|
self._current_profile_id = 0
|
||||||
@@ -172,9 +230,17 @@ class PlotAC(PamhyrPlot):
|
|||||||
self.update_river_bottom(reach, profile, x, z)
|
self.update_river_bottom(reach, profile, x, z)
|
||||||
self.update_water(reach, profile, x, z)
|
self.update_water(reach, profile, x, z)
|
||||||
self.update_water_max(reach, profile, x, z)
|
self.update_water_max(reach, profile, x, z)
|
||||||
|
self.update_gl()
|
||||||
|
|
||||||
self.update_idle()
|
self.update_idle()
|
||||||
|
|
||||||
|
def update_gl(self):
|
||||||
|
for a in self.annotation:
|
||||||
|
a.remove()
|
||||||
|
|
||||||
|
self.annotation[:] = []
|
||||||
|
self.draw_gl()
|
||||||
|
|
||||||
def update_river_bottom(self, reach, profile, x, z):
|
def update_river_bottom(self, reach, profile, x, z):
|
||||||
self.line_rk.set_data(x, z)
|
self.line_rk.set_data(x, z)
|
||||||
|
|
||||||
|
|||||||
+23
-21
@@ -35,7 +35,7 @@ logger = logging.getLogger()
|
|||||||
|
|
||||||
class PlotH(PamhyrPlot):
|
class PlotH(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, trad=None, toolbar=None,
|
def __init__(self, canvas=None, trad=None, toolbar=None,
|
||||||
results=None, reach_id=0, profile_id=0, res_id=[0],
|
results=None, reach_id=0, profile_id=[0], res_id=[0],
|
||||||
parent=None):
|
parent=None):
|
||||||
super(PlotH, self).__init__(
|
super(PlotH, self).__init__(
|
||||||
canvas=canvas,
|
canvas=canvas,
|
||||||
@@ -127,27 +127,29 @@ class PlotH(PamhyrPlot):
|
|||||||
|
|
||||||
results = self.results[res_id]
|
results = self.results[res_id]
|
||||||
reach = results.river.reach(self._current_reach_id)
|
reach = results.river.reach(self._current_reach_id)
|
||||||
profile = reach.profile(self._current_profile_id)
|
for i, p in enumerate(self._current_profile_id):
|
||||||
|
profile = reach.profile(p)
|
||||||
|
|
||||||
x = self._timestamps
|
x = self._timestamps
|
||||||
y = profile.get_key("Q")
|
y = profile.get_key("Q")
|
||||||
|
|
||||||
if res_id == 2:
|
if res_id == 2:
|
||||||
label = "Δ " + self.label_discharge
|
label = "Δ " + self.label_discharge + f" {profile.name}"
|
||||||
else:
|
else:
|
||||||
label = self.label_discharge
|
label = self.label_discharge + f" {profile.name}"
|
||||||
|
|
||||||
if len(self._current_res_id) > 1:
|
if len(self._current_res_id) > 1:
|
||||||
if res_id != 2:
|
if res_id != 2:
|
||||||
label += f" ({results._solver.name})"
|
label += f" ({results._solver.name})"
|
||||||
|
|
||||||
line, = self.canvas.axes.plot(
|
line, = self.canvas.axes.plot(
|
||||||
x, y,
|
x, y,
|
||||||
label=label,
|
label=label,
|
||||||
color=self.colors[res_id + 1],
|
color=self.colors[res_id + 1],
|
||||||
**self.plot_default_kargs
|
linestyle=self.linestyle[i % len(self.linestyle)],
|
||||||
)
|
**self.plot_default_kargs
|
||||||
self._line.append(line)
|
)
|
||||||
|
self._line.append(line)
|
||||||
|
|
||||||
def draw_current(self):
|
def draw_current(self):
|
||||||
self._current, = self.canvas.axes.plot(
|
self._current, = self.canvas.axes.plot(
|
||||||
@@ -162,7 +164,6 @@ class PlotH(PamhyrPlot):
|
|||||||
def draw_max(self, res_id):
|
def draw_max(self, res_id):
|
||||||
results = self.results[res_id]
|
results = self.results[res_id]
|
||||||
reach = results.river.reach(self._current_reach_id)
|
reach = results.river.reach(self._current_reach_id)
|
||||||
profile = reach.profile(self._current_profile_id)
|
|
||||||
|
|
||||||
if reach.geometry.number_profiles == 0:
|
if reach.geometry.number_profiles == 0:
|
||||||
self._init = False
|
self._init = False
|
||||||
@@ -194,12 +195,13 @@ class PlotH(PamhyrPlot):
|
|||||||
|
|
||||||
def set_reach(self, reach_id):
|
def set_reach(self, reach_id):
|
||||||
self._current_reach_id = reach_id
|
self._current_reach_id = reach_id
|
||||||
self._current_profile_id = 0
|
self._current_profile_id = [0]
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
def set_profile(self, profile_id):
|
def set_profile(self, profile_id):
|
||||||
self._current_profile_id = profile_id
|
self._current_profile_id = profile_id
|
||||||
self.update()
|
# self.update()
|
||||||
|
self.draw()
|
||||||
|
|
||||||
def set_result(self, res_id):
|
def set_result(self, res_id):
|
||||||
self._current_res_id = res_id
|
self._current_res_id = res_id
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ from numpy import sqrt
|
|||||||
|
|
||||||
from tools import timer, trace
|
from tools import timer, trace
|
||||||
|
|
||||||
|
from itertools import compress
|
||||||
|
|
||||||
from PyQt5.QtGui import (
|
from PyQt5.QtGui import (
|
||||||
QKeySequence, QColor
|
QKeySequence, QColor
|
||||||
)
|
)
|
||||||
@@ -51,8 +53,12 @@ class TableModel(PamhyrTableModel):
|
|||||||
self._lst = _river.reachs
|
self._lst = _river.reachs
|
||||||
elif self._opt_data == "profile":
|
elif self._opt_data == "profile":
|
||||||
self._lst = _river.reach(0).profiles
|
self._lst = _river.reach(0).profiles
|
||||||
|
# self._lst = list(filter(lambda x: x.name[0:8] != 'interpol',
|
||||||
|
# _river.reach(0).profiles))
|
||||||
elif self._opt_data == "raw_data":
|
elif self._opt_data == "raw_data":
|
||||||
self._lst = _river.reach(0).profiles
|
self._lst = _river.reach(0).profiles
|
||||||
|
# self._lst = list(filter(lambda x: x.name[0:8] != 'interpol',
|
||||||
|
# _river.reach(0).profiles))
|
||||||
elif self._opt_data == "solver":
|
elif self._opt_data == "solver":
|
||||||
self._lst = self._parent._solvers
|
self._lst = self._parent._solvers
|
||||||
|
|
||||||
|
|||||||
+43
-11
@@ -19,6 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
import csv
|
import csv
|
||||||
import logging
|
import logging
|
||||||
|
# import rasterio
|
||||||
|
|
||||||
from numpy import sqrt
|
from numpy import sqrt
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ from PyQt5.QtCore import (
|
|||||||
Qt, QVariant, QAbstractTableModel,
|
Qt, QVariant, QAbstractTableModel,
|
||||||
QCoreApplication, QModelIndex, pyqtSlot,
|
QCoreApplication, QModelIndex, pyqtSlot,
|
||||||
QItemSelectionModel, QTimer,
|
QItemSelectionModel, QTimer,
|
||||||
|
QSettings
|
||||||
)
|
)
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
@@ -66,7 +68,7 @@ from View.Results.translate import (
|
|||||||
ResultsTranslate,
|
ResultsTranslate,
|
||||||
CompareResultsTranslate
|
CompareResultsTranslate
|
||||||
)
|
)
|
||||||
from View.Stricklers.Window import StricklersWindow
|
from View.Results.CoordinatesDialog import CoordinatesDialog
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
@@ -126,7 +128,7 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.update(reach_id=0,
|
self.update(reach_id=0,
|
||||||
profile_id=0)
|
profile_id=[0])
|
||||||
|
|
||||||
self.update_table_selection_solver(0)
|
self.update_table_selection_solver(0)
|
||||||
|
|
||||||
@@ -269,7 +271,7 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
canvas=self.canvas_4,
|
canvas=self.canvas_4,
|
||||||
results=self._results,
|
results=self._results,
|
||||||
reach_id=0,
|
reach_id=0,
|
||||||
profile_id=0,
|
profile_id=[0],
|
||||||
res_id=self._current_results,
|
res_id=self._current_results,
|
||||||
trad=self._trad,
|
trad=self._trad,
|
||||||
toolbar=self.toolbar_4,
|
toolbar=self.toolbar_4,
|
||||||
@@ -334,7 +336,10 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
"action_add": self._add_custom_plot,
|
"action_add": self._add_custom_plot,
|
||||||
"action_export": self._export,
|
"action_export": self._export,
|
||||||
# "action_export": self.export_current,
|
# "action_export": self.export_current,
|
||||||
|
"action_Geo_tiff": self.import_geotiff
|
||||||
}
|
}
|
||||||
|
self.find(QAction, "action_Geo_tiff").setEnabled(False)
|
||||||
|
self.find(QAction, "action_Geo_tiff").setVisible(False)
|
||||||
|
|
||||||
if len(self._results) > 1:
|
if len(self._results) > 1:
|
||||||
self.find(QAction, "action_reload").setEnabled(False)
|
self.find(QAction, "action_reload").setEnabled(False)
|
||||||
@@ -370,6 +375,10 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._button_last.clicked.connect(self._last)
|
self._button_last.clicked.connect(self._last)
|
||||||
self._timer.timeout.connect(self._update_slider)
|
self._timer.timeout.connect(self._update_slider)
|
||||||
|
|
||||||
|
# tabs
|
||||||
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
tab_widget.currentChanged.connect(self.tab_changed)
|
||||||
|
|
||||||
def update_table_selection_reach(self, ind):
|
def update_table_selection_reach(self, ind):
|
||||||
table = self.find(QTableView, f"tableView_reach")
|
table = self.find(QTableView, f"tableView_reach")
|
||||||
selectionModel = table.selectionModel()
|
selectionModel = table.selectionModel()
|
||||||
@@ -432,15 +441,17 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self.update_table_selection_profile(0)
|
self.update_table_selection_profile(0)
|
||||||
|
|
||||||
if profile_id is not None:
|
if profile_id is not None:
|
||||||
self.plot_xy.set_profile(profile_id)
|
self.plot_xy.set_profile(profile_id[0])
|
||||||
self.plot_ac.set_profile(profile_id)
|
self.plot_ac.set_profile(profile_id[0])
|
||||||
self.plot_rkc.set_profile(profile_id)
|
self.plot_rkc.set_profile(profile_id[0])
|
||||||
self.plot_h.set_profile(profile_id)
|
self.plot_h.set_profile(profile_id)
|
||||||
|
|
||||||
for plot in self._additional_plot:
|
for plot in self._additional_plot:
|
||||||
self._additional_plot[plot].set_profile(profile_id)
|
self._additional_plot[plot].set_profile(profile_id[0])
|
||||||
|
|
||||||
self.update_table_selection_profile(profile_id)
|
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
if tab_widget.currentIndex() != 2:
|
||||||
|
self.update_table_selection_profile(profile_id[0])
|
||||||
|
|
||||||
if solver_id is not None:
|
if solver_id is not None:
|
||||||
self._current_results = solver_id
|
self._current_results = solver_id
|
||||||
@@ -481,6 +492,14 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
return indexes[0].row()
|
return indexes[0].row()
|
||||||
|
|
||||||
|
def _get_current_profiles_list(self):
|
||||||
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
|
indexes = table.selectedIndexes()
|
||||||
|
if len(indexes) == 0:
|
||||||
|
return []
|
||||||
|
|
||||||
|
return [i.row() for i in indexes]
|
||||||
|
|
||||||
def _get_current_timestamp(self):
|
def _get_current_timestamp(self):
|
||||||
return self._timestamps[
|
return self._timestamps[
|
||||||
self._slider_time.value()
|
self._slider_time.value()
|
||||||
@@ -496,12 +515,11 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def _set_current_profile(self):
|
def _set_current_profile(self):
|
||||||
table = self.find(QTableView, f"tableView_profile")
|
table = self.find(QTableView, f"tableView_profile")
|
||||||
indexes = table.selectedIndexes()
|
indexes = table.selectionModel().selectedRows()
|
||||||
if len(indexes) == 0:
|
if len(indexes) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
ind = indexes[0].row()
|
self.update(profile_id=[i.row() for i in indexes])
|
||||||
self.update(profile_id=ind)
|
|
||||||
|
|
||||||
def _set_current_profile_raw_data(self):
|
def _set_current_profile_raw_data(self):
|
||||||
return
|
return
|
||||||
@@ -545,6 +563,8 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._reload_slider()
|
self._reload_slider()
|
||||||
|
|
||||||
def _add_custom_plot(self):
|
def _add_custom_plot(self):
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
dlg = CustomPlotValuesSelectionDialog(parent=self)
|
||||||
if dlg.exec():
|
if dlg.exec():
|
||||||
x, y, envelop = dlg.value
|
x, y, envelop = dlg.value
|
||||||
@@ -665,6 +685,8 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
self._button_play.setIcon(self._icon_start)
|
self._button_play.setIcon(self._icon_start)
|
||||||
|
|
||||||
def _export(self):
|
def _export(self):
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
dlg = CustomExportDialog(parent=self)
|
dlg = CustomExportDialog(parent=self)
|
||||||
if dlg.exec():
|
if dlg.exec():
|
||||||
@@ -1137,3 +1159,13 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
|
|
||||||
def get_timestamps(self):
|
def get_timestamps(self):
|
||||||
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
self._timestamps = sorted(list(self._results[0].get("timestamps")))
|
||||||
|
|
||||||
|
def tab_changed(self, i):
|
||||||
|
if i != 2:
|
||||||
|
if len(self._get_current_profiles_list()) > 1:
|
||||||
|
# unselect all profiles but the first one
|
||||||
|
profile_id = self._get_current_profile()
|
||||||
|
self.update_table_selection_profile(profile_id)
|
||||||
|
|
||||||
|
def import_geotiff(self):
|
||||||
|
return
|
||||||
@@ -53,6 +53,12 @@ class ResultsTranslate(MainTranslate):
|
|||||||
"Results",
|
"Results",
|
||||||
"Max water elevation"
|
"Max water elevation"
|
||||||
)
|
)
|
||||||
|
self._dict["file_all"] = _translate("Results", "All files (*)")
|
||||||
|
self._dict["file_geotiff"] = _translate(
|
||||||
|
"Results", "GeoTIFF file (*.tiff *.tif)")
|
||||||
|
self._dict["ImageCoordinates"] = _translate(
|
||||||
|
"Results", "Image coordinates"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers_reach"] = {
|
self._sub_dict["table_headers_reach"] = {
|
||||||
"name": _translate("Results", "Reach name"),
|
"name": _translate("Results", "Reach name"),
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# Window.py -- Pamhyr
|
||||||
|
# Copyright (C) 2023-2025 INRAE
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from View.Tools.PamhyrWindow import PamhyrDialog
|
||||||
|
|
||||||
|
|
||||||
|
class SelectReachWindow(PamhyrDialog):
|
||||||
|
_pamhyr_ui = "SelectReach"
|
||||||
|
_pamhyr_name = "Select reach"
|
||||||
|
|
||||||
|
def __init__(self, study=None, config=None, trad=None, parent=None):
|
||||||
|
|
||||||
|
super(SelectReachWindow, self).__init__(
|
||||||
|
title=trad[self._pamhyr_name],
|
||||||
|
study=study,
|
||||||
|
config=config,
|
||||||
|
options=[],
|
||||||
|
parent=parent
|
||||||
|
)
|
||||||
|
|
||||||
|
self.setup_combobox()
|
||||||
|
self.select_current_reach()
|
||||||
|
|
||||||
|
def setup_combobox(self):
|
||||||
|
reaches = list(self._study.river.enable_edges())
|
||||||
|
reaches_name = [r.name for r in reaches]
|
||||||
|
|
||||||
|
self.combobox_add_items("comboBox", reaches_name)
|
||||||
|
|
||||||
|
def select_current_reach(self):
|
||||||
|
if self._study.river.has_current_reach():
|
||||||
|
reach = self._study.river.current_reach()
|
||||||
|
self.set_combobox_text(
|
||||||
|
"comboBox",
|
||||||
|
reach.name
|
||||||
|
)
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
reach_name = self.get_combobox_text("comboBox")
|
||||||
|
|
||||||
|
reach = next(
|
||||||
|
filter(
|
||||||
|
lambda s: s.name == reach_name,
|
||||||
|
self._study.river.enable_edges()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.reach = reach
|
||||||
|
|
||||||
|
super().accept()
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
self.close()
|
||||||
@@ -39,6 +39,7 @@ class CommonWordTranslate(PamhyrTranslate):
|
|||||||
|
|
||||||
self._dict["reach"] = _translate("CommonWord", "Reach")
|
self._dict["reach"] = _translate("CommonWord", "Reach")
|
||||||
self._dict["reaches"] = _translate("CommonWord", "Reaches")
|
self._dict["reaches"] = _translate("CommonWord", "Reaches")
|
||||||
|
self._dict["Select reach"] = _translate("CommonWord", "Select reach")
|
||||||
self._dict["cross_section"] = _translate("CommonWord", "Cross-section")
|
self._dict["cross_section"] = _translate("CommonWord", "Cross-section")
|
||||||
self._dict["main_channel"] = _translate("CommonWord", "Main channel")
|
self._dict["main_channel"] = _translate("CommonWord", "Main channel")
|
||||||
self._dict["floodway"] = _translate("CommonWord", "Floodway")
|
self._dict["floodway"] = _translate("CommonWord", "Floodway")
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<addaction name="action_import"/>
|
||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_del"/>
|
<addaction name="action_del"/>
|
||||||
<addaction name="action_sort"/>
|
<addaction name="action_sort"/>
|
||||||
@@ -149,6 +150,18 @@
|
|||||||
<string>Remove points to make the curve increasing</string>
|
<string>Remove points to make the curve increasing</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_import">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Import</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import from file</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -112,6 +112,18 @@
|
|||||||
<string>Sort points</string>
|
<string>Sort points</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_import">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Import</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import from file</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<addaction name="action_import"/>
|
||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_del"/>
|
<addaction name="action_del"/>
|
||||||
<addaction name="action_sort"/>
|
<addaction name="action_sort"/>
|
||||||
@@ -107,6 +108,18 @@
|
|||||||
<string>Ctrl+E</string>
|
<string>Ctrl+E</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_import">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Import</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import from file</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
<addaction name="action_update_rk"/>
|
<addaction name="action_update_rk"/>
|
||||||
<addaction name="action_purge"/>
|
<addaction name="action_purge"/>
|
||||||
<addaction name="action_shift"/>
|
<addaction name="action_shift"/>
|
||||||
|
<addaction name="action_select_reach"/>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_import">
|
<action name="action_import">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@@ -235,6 +236,14 @@
|
|||||||
<string>Shift selected sections coordinates</string>
|
<string>Shift selected sections coordinates</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_select_reach">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select reach</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Change current reach</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>451</width>
|
||||||
|
<height>206</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_bottom">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_right">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_bottom">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_left">
|
||||||
|
<property name="text">
|
||||||
|
<string>Left coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_left">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_top">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>99999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_top">
|
||||||
|
<property name="text">
|
||||||
|
<string>Top coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_right">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right coordinate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_bottom">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_top">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_left">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_right">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
@@ -97,6 +97,7 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<addaction name="action_import"/>
|
||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_del"/>
|
<addaction name="action_del"/>
|
||||||
<addaction name="action_edit"/>
|
<addaction name="action_edit"/>
|
||||||
@@ -162,6 +163,18 @@
|
|||||||
<string>Sort by names</string>
|
<string>Sort by names</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_import">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/import.png</normaloff>ressources/import.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Import</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import from file</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -7,24 +7,14 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>520</width>
|
<width>520</width>
|
||||||
<height>341</height>
|
<height>245</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="3" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Parameters</string>
|
<string>Parameters</string>
|
||||||
@@ -79,7 +69,7 @@
|
|||||||
<string>Spline</string>
|
<string>Spline</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -88,6 +78,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Linear</string>
|
<string>Linear</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -108,47 +101,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="title">
|
<property name="orientation">
|
||||||
<string>Guideline used for distance computation</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Second guideline</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>First guideline</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_end_gl">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_begin_gl">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
|||||||
@@ -238,6 +238,7 @@
|
|||||||
<addaction name="action_add"/>
|
<addaction name="action_add"/>
|
||||||
<addaction name="action_export"/>
|
<addaction name="action_export"/>
|
||||||
<addaction name="action_reload"/>
|
<addaction name="action_reload"/>
|
||||||
|
<addaction name="action_Geo_tiff"/>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_add">
|
<action name="action_add">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@@ -275,6 +276,18 @@
|
|||||||
<string>Ctrl+E</string>
|
<string>Ctrl+E</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_Geo_tiff">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>ressources/picture.png</normaloff>ressources/picture.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Geo tiff</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Import background image</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>76</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QComboBox" name="comboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
+244
-116
@@ -192,17 +192,17 @@
|
|||||||
<translation>Éditer les conditions aux limites</translation>
|
<translation>Éditer les conditions aux limites</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="39"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="50"/>
|
||||||
<source>X</source>
|
<source>X</source>
|
||||||
<translation>X</translation>
|
<translation>X</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="40"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
|
||||||
<source>Y</source>
|
<source>Y</source>
|
||||||
<translation>Y</translation>
|
<translation>Y</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="45"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="56"/>
|
||||||
<source>Solid (kg/s)</source>
|
<source>Solid (kg/s)</source>
|
||||||
<translation>Solide (kg/s)</translation>
|
<translation>Solide (kg/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -242,19 +242,19 @@
|
|||||||
<translation>Options des conditions limites</translation>
|
<translation>Options des conditions limites</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="48"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="59"/>
|
||||||
<source>No geometry</source>
|
<source>No geometry</source>
|
||||||
<translation>Pas de géométrie</translation>
|
<translation>Pas de géométrie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="62"/>
|
||||||
<source>No geometry found for this reach.
|
<source>No geometry found for this reach.
|
||||||
This feature requires a reach with a geometry.</source>
|
This feature requires a reach with a geometry.</source>
|
||||||
<translation>Aucune géométrie n'a été trouvée sur ce bief.
|
<translation>Aucune géométrie n'a été trouvée sur ce bief.
|
||||||
Cette fonctionnalité nécessite un bief muni d'une géométrie.</translation>
|
Cette fonctionnalité nécessite un bief muni d'une géométrie.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/BoundaryCondition/Edit/translate.py" line="56"/>
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="67"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation>Avertissement</translation>
|
<translation>Avertissement</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -263,6 +263,31 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>Pollutant</source>
|
<source>Pollutant</source>
|
||||||
<translation>Polluant</translation>
|
<translation>Polluant</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="38"/>
|
||||||
|
<source>Open a file</source>
|
||||||
|
<translation>Ouvrir un fichier</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="40"/>
|
||||||
|
<source>Mage hydrograph file (*.HYD)</source>
|
||||||
|
<translation>Hydrogramme Mage (*.HYD)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="42"/>
|
||||||
|
<source>Mage limnigraph file (*.LIM)</source>
|
||||||
|
<translation>Limnigramme Mage (*.LIM)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="44"/>
|
||||||
|
<source>Mage rating curve file (*.AVA)</source>
|
||||||
|
<translation>Courbe de tarage Mage (*.AVA)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/BoundaryCondition/Edit/translate.py" line="46"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>BoundaryConditions</name>
|
<name>BoundaryConditions</name>
|
||||||
@@ -447,27 +472,27 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Biefs</translation>
|
<translation>Biefs</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="43"/>
|
<location filename="../View/Translate.py" line="44"/>
|
||||||
<source>Main channel</source>
|
<source>Main channel</source>
|
||||||
<translation>Lit mineur</translation>
|
<translation>Lit mineur</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="44"/>
|
<location filename="../View/Translate.py" line="45"/>
|
||||||
<source>Floodway</source>
|
<source>Floodway</source>
|
||||||
<translation>Lit moyen</translation>
|
<translation>Lit moyen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="46"/>
|
<location filename="../View/Translate.py" line="47"/>
|
||||||
<source>Not defined</source>
|
<source>Not defined</source>
|
||||||
<translation>Non défini</translation>
|
<translation>Non défini</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="47"/>
|
<location filename="../View/Translate.py" line="48"/>
|
||||||
<source>Not associated</source>
|
<source>Not associated</source>
|
||||||
<translation>Non associé</translation>
|
<translation>Non associé</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="42"/>
|
<location filename="../View/Translate.py" line="43"/>
|
||||||
<source>Cross-section</source>
|
<source>Cross-section</source>
|
||||||
<translation>Section en travers</translation>
|
<translation>Section en travers</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -477,10 +502,15 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Titre</translation>
|
<translation>Titre</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="51"/>
|
<location filename="../View/Translate.py" line="52"/>
|
||||||
<source>Method</source>
|
<source>Method</source>
|
||||||
<translation>Méthode</translation>
|
<translation>Méthode</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Translate.py" line="42"/>
|
||||||
|
<source>Select reach</source>
|
||||||
|
<translation>Sélectionner un bief</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Configure</name>
|
<name>Configure</name>
|
||||||
@@ -944,6 +974,36 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>OK</source>
|
<source>OK</source>
|
||||||
<translation>Ok</translation>
|
<translation>Ok</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="54"/>
|
||||||
|
<source>Bottom coordinate</source>
|
||||||
|
<translation>Coordonnée bas</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="61"/>
|
||||||
|
<source>Left coordinate</source>
|
||||||
|
<translation>Coordonnée gauche</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="97"/>
|
||||||
|
<source>Top coordinate</source>
|
||||||
|
<translation>Coordonnée haut</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="107"/>
|
||||||
|
<source>Right coordinate</source>
|
||||||
|
<translation>Coordonnée droite</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="135"/>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation>Rétablir</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeotiffCoordinates.ui" line="154"/>
|
||||||
|
<source>Image coordinates</source>
|
||||||
|
<translation type="obsolete">Coordonnées de l'image</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Documentation</name>
|
<name>Documentation</name>
|
||||||
@@ -1278,6 +1338,14 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Coefficient</translation>
|
<translation>Coefficient</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>GeoTIFF</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="56"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation type="obsolete">Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Geometry</name>
|
<name>Geometry</name>
|
||||||
<message>
|
<message>
|
||||||
@@ -1451,6 +1519,26 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>Initial conditions</source>
|
<source>Initial conditions</source>
|
||||||
<translation>Conditions initiales</translation>
|
<translation>Conditions initiales</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/InitialConditions/translate.py" line="37"/>
|
||||||
|
<source>Open a file</source>
|
||||||
|
<translation>Ouvrir un fichier</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/InitialConditions/translate.py" line="39"/>
|
||||||
|
<source>Mage results file (*.BIN)</source>
|
||||||
|
<translation>Fichier de résultats Mage (*.BIN)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/InitialConditions/translate.py" line="41"/>
|
||||||
|
<source>Mage initial conditions file (*.INI *.ini)</source>
|
||||||
|
<translation>Fichiers de conditions initiales Mage (*.INI *.ini)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/InitialConditions/translate.py" line="43"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>InitialConditionAdisTS</name>
|
<name>InitialConditionAdisTS</name>
|
||||||
@@ -1539,17 +1627,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="160"/>
|
<location filename="../View/Translate.py" line="162"/>
|
||||||
<source>Open debug window</source>
|
<source>Open debug window</source>
|
||||||
<translation>Ouvrir la fenêtre de débogage</translation>
|
<translation>Ouvrir la fenêtre de débogage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="163"/>
|
<location filename="../View/Translate.py" line="165"/>
|
||||||
<source>Open SQLite debuging tool ('sqlitebrowser')</source>
|
<source>Open SQLite debuging tool ('sqlitebrowser')</source>
|
||||||
<translation>Ouvrir l'outil de débogage SQLite ('sqlitebrowser')</translation>
|
<translation>Ouvrir l'outil de débogage SQLite ('sqlitebrowser')</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="166"/>
|
<location filename="../View/Translate.py" line="168"/>
|
||||||
<source>Enable this window</source>
|
<source>Enable this window</source>
|
||||||
<translation>Activer cette fenêtre</translation>
|
<translation>Activer cette fenêtre</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -1614,7 +1702,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Éditer la couche sédimentaire</translation>
|
<translation>Éditer la couche sédimentaire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="275"/>
|
<location filename="../View/ui/Results.ui" line="276"/>
|
||||||
<source>Ctrl+E</source>
|
<source>Ctrl+E</source>
|
||||||
<translation>Ctrl+E</translation>
|
<translation>Ctrl+E</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -1769,12 +1857,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Éditer la géométrie</translation>
|
<translation>Éditer la géométrie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="106"/>
|
<location filename="../View/ui/GeometryReach.ui" line="107"/>
|
||||||
<source>Import geometry</source>
|
<source>Import geometry</source>
|
||||||
<translation>Importer une géométrie</translation>
|
<translation>Importer une géométrie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="118"/>
|
<location filename="../View/ui/GeometryReach.ui" line="119"/>
|
||||||
<source>Export geometry</source>
|
<source>Export geometry</source>
|
||||||
<translation>Exporter la géométrie</translation>
|
<translation>Exporter la géométrie</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2104,17 +2192,17 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Hydrogramme</translation>
|
<translation>Hydrogramme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="251"/>
|
<location filename="../View/ui/Results.ui" line="252"/>
|
||||||
<source>Add customized visualization</source>
|
<source>Add customized visualization</source>
|
||||||
<translation>Ajouter une visualisation personnalisée</translation>
|
<translation>Ajouter une visualisation personnalisée</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="260"/>
|
<location filename="../View/ui/Results.ui" line="261"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation>Recharger</translation>
|
<translation>Recharger</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="269"/>
|
<location filename="../View/ui/Results.ui" line="270"/>
|
||||||
<source>Export</source>
|
<source>Export</source>
|
||||||
<translation>Exporter</translation>
|
<translation>Exporter</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2354,52 +2442,52 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Importer</translation>
|
<translation>Importer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="130"/>
|
<location filename="../View/ui/GeometryReach.ui" line="131"/>
|
||||||
<source>Add a cross-section</source>
|
<source>Add a cross-section</source>
|
||||||
<translation>Ajouter une section en travers</translation>
|
<translation>Ajouter une section en travers</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="142"/>
|
<location filename="../View/ui/GeometryReach.ui" line="143"/>
|
||||||
<source>Delete selected cross-section(s)</source>
|
<source>Delete selected cross-section(s)</source>
|
||||||
<translation>Supprimer les sections en travers sélectionnées</translation>
|
<translation>Supprimer les sections en travers sélectionnées</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="154"/>
|
<location filename="../View/ui/GeometryReach.ui" line="155"/>
|
||||||
<source>Edit selected cross section(s)</source>
|
<source>Edit selected cross section(s)</source>
|
||||||
<translation>Éditer les sections en travers sélectionnées</translation>
|
<translation>Éditer les sections en travers sélectionnées</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="166"/>
|
<location filename="../View/ui/GeometryReach.ui" line="167"/>
|
||||||
<source>Sort cross-sections by ascending position</source>
|
<source>Sort cross-sections by ascending position</source>
|
||||||
<translation>Trier les sections en travers par PK croissant</translation>
|
<translation>Trier les sections en travers par PK croissant</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="178"/>
|
<location filename="../View/ui/GeometryReach.ui" line="179"/>
|
||||||
<source>Sort cross-sections by descending position</source>
|
<source>Sort cross-sections by descending position</source>
|
||||||
<translation>Trier les sections en travers par PK décroissant</translation>
|
<translation>Trier les sections en travers par PK décroissant</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="190"/>
|
<location filename="../View/ui/GeometryReach.ui" line="191"/>
|
||||||
<source>Move up selected cross-section(s)</source>
|
<source>Move up selected cross-section(s)</source>
|
||||||
<translation>Déplacer les sections en travers vers le haut</translation>
|
<translation>Déplacer les sections en travers vers le haut</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="202"/>
|
<location filename="../View/ui/GeometryReach.ui" line="203"/>
|
||||||
<source>Move down selected cross-section(s)</source>
|
<source>Move down selected cross-section(s)</source>
|
||||||
<translation>Déplacer les sections en travers vers le bas</translation>
|
<translation>Déplacer les sections en travers vers le bas</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="211"/>
|
<location filename="../View/ui/GeometryReach.ui" line="212"/>
|
||||||
<source>Meshing</source>
|
<source>Meshing</source>
|
||||||
<translation>Maillage</translation>
|
<translation>Maillage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="153"/>
|
<location filename="../View/Translate.py" line="155"/>
|
||||||
<source>Summary</source>
|
<source>Summary</source>
|
||||||
<translation>Résumé</translation>
|
<translation>Résumé</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="156"/>
|
<location filename="../View/Translate.py" line="158"/>
|
||||||
<source>Checks</source>
|
<source>Checks</source>
|
||||||
<translation>Vérifications</translation>
|
<translation>Vérifications</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2534,67 +2622,67 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Importer depuis un fichier</translation>
|
<translation>Importer depuis un fichier</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="216"/>
|
<location filename="../View/ui/GeometryReach.ui" line="217"/>
|
||||||
<source>Update RK</source>
|
<source>Update RK</source>
|
||||||
<translation>Mise à jour des PK</translation>
|
<translation>Mise à jour des PK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="219"/>
|
<location filename="../View/ui/GeometryReach.ui" line="220"/>
|
||||||
<source>Recompute RK</source>
|
<source>Recompute RK</source>
|
||||||
<translation>Recalcule des PK</translation>
|
<translation>Recalcule des PK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="227"/>
|
<location filename="../View/ui/GeometryReach.ui" line="228"/>
|
||||||
<source>Purge cross-sections to keep a given number of points</source>
|
<source>Purge cross-sections to keep a given number of points</source>
|
||||||
<translation>Purger les profiles pour garder un nombre fixer de points</translation>
|
<translation>Purger les profiles pour garder un nombre fixer de points</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditLateralContribution.ui" line="112"/>
|
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="119"/>
|
||||||
<source>Sort points</source>
|
<source>Sort points</source>
|
||||||
<translation>Trier les points</translation>
|
<translation>Trier les points</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/Results.ui" line="272"/>
|
<location filename="../View/ui/Results.ui" line="273"/>
|
||||||
<source>Export data as CSV</source>
|
<source>Export data as CSV</source>
|
||||||
<translation>Exporter les données au format CSV</translation>
|
<translation>Exporter les données au format CSV</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="130"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="131"/>
|
||||||
<source>Generate uniform</source>
|
<source>Generate uniform</source>
|
||||||
<translation>Générer un regime uniforme</translation>
|
<translation>Générer un regime uniforme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="133"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="134"/>
|
||||||
<source>Generate rating curve from Manning law</source>
|
<source>Generate rating curve from Manning law</source>
|
||||||
<translation>Générer une courbe de tarage (loi de Maning)</translation>
|
<translation>Générer une courbe de tarage (loi de Maning)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="138"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="139"/>
|
||||||
<source>Generate critical</source>
|
<source>Generate critical</source>
|
||||||
<translation>Générer régime critique</translation>
|
<translation>Générer régime critique</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="141"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="142"/>
|
||||||
<source>Generate rating curve as Q(z) = Sqrt(g*S(z)^3/L(z))</source>
|
<source>Generate rating curve as Q(z) = Sqrt(g*S(z)^3/L(z))</source>
|
||||||
<translation>Générer une courbe de tarage (Q(z) = Sqrt(g*S(z)^3/L(z)))</translation>
|
<translation>Générer une courbe de tarage (Q(z) = Sqrt(g*S(z)^3/L(z)))</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="146"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="147"/>
|
||||||
<source>Make increasing</source>
|
<source>Make increasing</source>
|
||||||
<translation>Augmenter</translation>
|
<translation>Augmenter</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditions.ui" line="149"/>
|
<location filename="../View/ui/EditBoundaryConditions.ui" line="150"/>
|
||||||
<source>Remove points to make the curve increasing</source>
|
<source>Remove points to make the curve increasing</source>
|
||||||
<translation>Supprimer des points pour rendre la courbe croissante</translation>
|
<translation>Supprimer des points pour rendre la courbe croissante</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="232"/>
|
<location filename="../View/ui/GeometryReach.ui" line="233"/>
|
||||||
<source>Shift</source>
|
<source>Shift</source>
|
||||||
<translation>Translater</translation>
|
<translation>Translater</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/GeometryReach.ui" line="235"/>
|
<location filename="../View/ui/GeometryReach.ui" line="236"/>
|
||||||
<source>Shift selected sections coordinates</source>
|
<source>Shift selected sections coordinates</source>
|
||||||
<translation>Translater les coordonnées des sections sélectionnées</translation>
|
<translation>Translater les coordonnées des sections sélectionnées</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2619,47 +2707,47 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Données</translation>
|
<translation>Données</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="174"/>
|
<location filename="../View/Translate.py" line="176"/>
|
||||||
<source>Please select a reach</source>
|
<source>Please select a reach</source>
|
||||||
<translation>Veuillez sélectionner un bief</translation>
|
<translation>Veuillez sélectionner un bief</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="183"/>
|
<location filename="../View/Translate.py" line="185"/>
|
||||||
<source>Last open study</source>
|
<source>Last open study</source>
|
||||||
<translation>Dernière étude ouverte</translation>
|
<translation>Dernière étude ouverte</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="186"/>
|
<location filename="../View/Translate.py" line="188"/>
|
||||||
<source>Do you want to open again the last open study?</source>
|
<source>Do you want to open again the last open study?</source>
|
||||||
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
|
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="177"/>
|
<location filename="../View/Translate.py" line="179"/>
|
||||||
<source>This edition window need a reach selected into the river network to work on it</source>
|
<source>This edition window need a reach selected into the river network to work on it</source>
|
||||||
<translation>Cette fenêtre d'édition a besoin d'un bief sélectionné dans le réseau pour travailler dessus</translation>
|
<translation>Cette fenêtre d'édition a besoin d'un bief sélectionné dans le réseau pour travailler dessus</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="191"/>
|
<location filename="../View/Translate.py" line="193"/>
|
||||||
<source>Close without saving study</source>
|
<source>Close without saving study</source>
|
||||||
<translation>Fermer sans sauvegarder l'étude</translation>
|
<translation>Fermer sans sauvegarder l'étude</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="194"/>
|
<location filename="../View/Translate.py" line="196"/>
|
||||||
<source>Do you want to save current study before closing it?</source>
|
<source>Do you want to save current study before closing it?</source>
|
||||||
<translation>Souhaitez-vous sauvegarder l'étude en cours avant de la fermer ?</translation>
|
<translation>Souhaitez-vous sauvegarder l'étude en cours avant de la fermer ?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="171"/>
|
<location filename="../View/Translate.py" line="173"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation>Avertissement</translation>
|
<translation>Avertissement</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="198"/>
|
<location filename="../View/Translate.py" line="200"/>
|
||||||
<source>X (m)</source>
|
<source>X (m)</source>
|
||||||
<translation>X (m)</translation>
|
<translation>X (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="199"/>
|
<location filename="../View/Translate.py" line="201"/>
|
||||||
<source>Y (m)</source>
|
<source>Y (m)</source>
|
||||||
<translation>Y (m)</translation>
|
<translation>Y (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2729,7 +2817,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Activer / Désactiver la sortie AdisTS</translation>
|
<translation>Activer / Désactiver la sortie AdisTS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="88"/>
|
<location filename="../View/ui/EditBoundaryConditionsAdisTS.ui" line="89"/>
|
||||||
<source>Add a new point in boundary condition or punctual contribution</source>
|
<source>Add a new point in boundary condition or punctual contribution</source>
|
||||||
<translation>Ajouter un nouveau point dans la condition limite</translation>
|
<translation>Ajouter un nouveau point dans la condition limite</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2834,12 +2922,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Export données brutes</translation>
|
<translation>Export données brutes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="200"/>
|
<location filename="../View/Translate.py" line="202"/>
|
||||||
<source>Yes</source>
|
<source>Yes</source>
|
||||||
<translation>Oui</translation>
|
<translation>Oui</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="201"/>
|
<location filename="../View/Translate.py" line="203"/>
|
||||||
<source>No</source>
|
<source>No</source>
|
||||||
<translation>Non</translation>
|
<translation>Non</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2848,6 +2936,26 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<source>Compare results</source>
|
<source>Compare results</source>
|
||||||
<translation>Comparaison de résultats</translation>
|
<translation>Comparaison de résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/Results.ui" line="285"/>
|
||||||
|
<source>Geo tiff</source>
|
||||||
|
<translation>Geo tiff</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/Results.ui" line="288"/>
|
||||||
|
<source>Import background image</source>
|
||||||
|
<translation>Importer une image de fond</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeometryReach.ui" line="241"/>
|
||||||
|
<source>Select reach</source>
|
||||||
|
<translation>Sélectionner un bief</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/ui/GeometryReach.ui" line="244"/>
|
||||||
|
<source>Change current reach</source>
|
||||||
|
<translation>Changer le bief courrant</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow_reach</name>
|
<name>MainWindow_reach</name>
|
||||||
@@ -3033,7 +3141,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>jour</translation>
|
<translation>jour</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="47"/>
|
<location filename="../View/Results/translate.py" line="48"/>
|
||||||
<source>X (m)</source>
|
<source>X (m)</source>
|
||||||
<translation>X (m)</translation>
|
<translation>X (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3068,27 +3176,27 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Lecture des résultats</translation>
|
<translation>Lecture des résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="147"/>
|
<location filename="../View/Results/translate.py" line="154"/>
|
||||||
<source>Water elevation</source>
|
<source>Water elevation</source>
|
||||||
<translation>Cote de l'eau</translation>
|
<translation>Cote de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="51"/>
|
<location filename="../View/Results/translate.py" line="52"/>
|
||||||
<source>Max water elevation</source>
|
<source>Max water elevation</source>
|
||||||
<translation>Cote maximum de l'eau</translation>
|
<translation>Cote maximum de l'eau</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="57"/>
|
<location filename="../View/Results/translate.py" line="64"/>
|
||||||
<source>Reach name</source>
|
<source>Reach name</source>
|
||||||
<translation>Nom du bief</translation>
|
<translation>Nom du bief</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="153"/>
|
<location filename="../View/Results/translate.py" line="160"/>
|
||||||
<source>Profile</source>
|
<source>Profile</source>
|
||||||
<translation>Profil</translation>
|
<translation>Profil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="49"/>
|
<location filename="../View/Results/translate.py" line="50"/>
|
||||||
<source>Bottom</source>
|
<source>Bottom</source>
|
||||||
<translation>Fond</translation>
|
<translation>Fond</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3138,30 +3246,50 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<translation>Masse min</translation>
|
<translation>Masse min</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="61"/>
|
<location filename="../View/Results/translate.py" line="68"/>
|
||||||
<source>Variables names</source>
|
<source>Variables names</source>
|
||||||
<translation>Noms des variables</translation>
|
<translation>Noms des variables</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="74"/>
|
<location filename="../View/Results/translate.py" line="81"/>
|
||||||
<source>Pollutant name</source>
|
<source>Pollutant name</source>
|
||||||
<translation>Nom des polluants</translation>
|
<translation>Nom des polluants</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="45"/>
|
<location filename="../View/Results/translate.py" line="45"/>
|
||||||
<source>envelop</source>
|
<source>envelop</source>
|
||||||
<translation>enveloppe</translation>
|
<translation type="obsolete">enveloppe</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="65"/>
|
<location filename="../View/Results/translate.py" line="72"/>
|
||||||
<source>Profile name</source>
|
<source>Profile name</source>
|
||||||
<translation>Nom du profil</translation>
|
<translation>Nom du profil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Results/translate.py" line="70"/>
|
<location filename="../View/Results/translate.py" line="46"/>
|
||||||
<source>Solver</source>
|
<source>Solver</source>
|
||||||
<translation>Solveur</translation>
|
<translation>Solveur</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="45"/>
|
||||||
|
<source>Envelop</source>
|
||||||
|
<translation>Enveloppe</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="57"/>
|
||||||
|
<source>GeoTIFF file (*.tiff *.tif)</source>
|
||||||
|
<translation>Fichiers GeoTIFF (*.tiff *.tif)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="59"/>
|
||||||
|
<source>Image coordinates</source>
|
||||||
|
<translation>Coordonnées de l'image</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../View/Results/translate.py" line="56"/>
|
||||||
|
<source>All files (*)</source>
|
||||||
|
<translation>Tous les fichiers (*)</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SedimentLayers</name>
|
<name>SedimentLayers</name>
|
||||||
@@ -3554,87 +3682,87 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||||||
<context>
|
<context>
|
||||||
<name>Unit</name>
|
<name>Unit</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="59"/>
|
<location filename="../View/Translate.py" line="60"/>
|
||||||
<source>Width (m)</source>
|
<source>Width (m)</source>
|
||||||
<translation>Largeur (m)</translation>
|
<translation>Largeur (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="65"/>
|
<location filename="../View/Translate.py" line="66"/>
|
||||||
<source>Depth (m)</source>
|
<source>Depth (m)</source>
|
||||||
<translation>Profondeur (m)</translation>
|
<translation>Profondeur (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="72"/>
|
<location filename="../View/Translate.py" line="73"/>
|
||||||
<source>Diameter (m)</source>
|
<source>Diameter (m)</source>
|
||||||
<translation>Diamètre (m)</translation>
|
<translation>Diamètre (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="73"/>
|
<location filename="../View/Translate.py" line="74"/>
|
||||||
<source>Thickness (m)</source>
|
<source>Thickness (m)</source>
|
||||||
<translation>Épaisseur (m)</translation>
|
<translation>Épaisseur (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="74"/>
|
<location filename="../View/Translate.py" line="75"/>
|
||||||
<source>Elevation (m)</source>
|
<source>Elevation (m)</source>
|
||||||
<translation>Cote (m)</translation>
|
<translation>Cote (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="116"/>
|
<location filename="../View/Translate.py" line="118"/>
|
||||||
<source>Area (hectare)</source>
|
<source>Area (hectare)</source>
|
||||||
<translation>Aire (hectare)</translation>
|
<translation>Aire (hectare)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="118"/>
|
<location filename="../View/Translate.py" line="120"/>
|
||||||
<source>Time (sec)</source>
|
<source>Time (sec)</source>
|
||||||
<translation>Temps (s)</translation>
|
<translation>Temps (s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="119"/>
|
<location filename="../View/Translate.py" line="121"/>
|
||||||
<source>Time (JJJ:HH:MM:SS)</source>
|
<source>Time (JJJ:HH:MM:SS)</source>
|
||||||
<translation>Temps (JJJ:HH:MM:SS)</translation>
|
<translation>Temps (JJJ:HH:MM:SS)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="121"/>
|
<location filename="../View/Translate.py" line="123"/>
|
||||||
<source>Date (sec)</source>
|
<source>Date (sec)</source>
|
||||||
<translation>Date (s)</translation>
|
<translation>Date (s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="122"/>
|
<location filename="../View/Translate.py" line="124"/>
|
||||||
<source>Date (ISO format)</source>
|
<source>Date (ISO format)</source>
|
||||||
<translation>Date (format ISO)</translation>
|
<translation>Date (format ISO)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="58"/>
|
<location filename="../View/Translate.py" line="59"/>
|
||||||
<source>River Kilometer (m)</source>
|
<source>River Kilometer (m)</source>
|
||||||
<translation>Point Kilométrique (m)</translation>
|
<translation>Point Kilométrique (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="66"/>
|
<location filename="../View/Translate.py" line="67"/>
|
||||||
<source>Max Depth (m)</source>
|
<source>Max Depth (m)</source>
|
||||||
<translation>Profondeur max (m)</translation>
|
<translation>Profondeur max (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="71"/>
|
<location filename="../View/Translate.py" line="72"/>
|
||||||
<source>Mean Depth (m)</source>
|
<source>Mean Depth (m)</source>
|
||||||
<translation>Profondeur moyenne (m)</translation>
|
<translation>Profondeur moyenne (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="99"/>
|
<location filename="../View/Translate.py" line="100"/>
|
||||||
<source>Velocity (m/s)</source>
|
<source>Velocity (m/s)</source>
|
||||||
<translation>Vitesse (m/s)</translation>
|
<translation>Vitesse (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="137"/>
|
<location filename="../View/Translate.py" line="139"/>
|
||||||
<source>Wet Perimeter (m)</source>
|
<source>Wet Perimeter (m)</source>
|
||||||
<translation>Périmètre mouillé (m)</translation>
|
<translation>Périmètre mouillé (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="140"/>
|
<location filename="../View/Translate.py" line="142"/>
|
||||||
<source>Hydraulic Radius (m)</source>
|
<source>Hydraulic Radius (m)</source>
|
||||||
<translation>Rayon hydraulique (m)</translation>
|
<translation>Rayon hydraulique (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="143"/>
|
<location filename="../View/Translate.py" line="145"/>
|
||||||
<source>Froude number</source>
|
<source>Froude number</source>
|
||||||
<translation>Nombre de Froude</translation>
|
<translation>Nombre de Froude</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3677,132 +3805,132 @@ moyen droit (m)</translation>
|
|||||||
<translation>D90</translation>
|
<translation>D90</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="60"/>
|
<location filename="../View/Translate.py" line="61"/>
|
||||||
<source>Width Envelop (m)</source>
|
<source>Width Envelop (m)</source>
|
||||||
<translation>Enveloppe de la argeur (m)</translation>
|
<translation>Enveloppe de la argeur (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="63"/>
|
<location filename="../View/Translate.py" line="64"/>
|
||||||
<source>Max Width (m)</source>
|
<source>Max Width (m)</source>
|
||||||
<translation>Largeur max (m)</translation>
|
<translation>Largeur max (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="64"/>
|
<location filename="../View/Translate.py" line="65"/>
|
||||||
<source>Min Width (m)</source>
|
<source>Min Width (m)</source>
|
||||||
<translation>Largeur min (m)</translation>
|
<translation>Largeur min (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="67"/>
|
<location filename="../View/Translate.py" line="68"/>
|
||||||
<source>Min Depth (m)</source>
|
<source>Min Depth (m)</source>
|
||||||
<translation>Profondeur min (m)</translation>
|
<translation>Profondeur min (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="68"/>
|
<location filename="../View/Translate.py" line="69"/>
|
||||||
<source>Depth Envelop (m)</source>
|
<source>Depth Envelop (m)</source>
|
||||||
<translation>Enveloppe de la profondeur (m)</translation>
|
<translation>Enveloppe de la profondeur (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="75"/>
|
<location filename="../View/Translate.py" line="76"/>
|
||||||
<source>Bed Elevation (m)</source>
|
<source>Bed Elevation (m)</source>
|
||||||
<translation>Cote du fond (m)</translation>
|
<translation>Cote du fond (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="78"/>
|
<location filename="../View/Translate.py" line="79"/>
|
||||||
<source>Bed Elevation Envelop (m)</source>
|
<source>Bed Elevation Envelop (m)</source>
|
||||||
<translation>Enveloppe de la cote du fond (m)</translation>
|
<translation>Enveloppe de la cote du fond (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="81"/>
|
<location filename="../View/Translate.py" line="82"/>
|
||||||
<source>Max Bed Elevation (m)</source>
|
<source>Max Bed Elevation (m)</source>
|
||||||
<translation>Cote du fond max (m)</translation>
|
<translation>Cote du fond max (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="84"/>
|
<location filename="../View/Translate.py" line="85"/>
|
||||||
<source>Min Bed Elevation (m)</source>
|
<source>Min Bed Elevation (m)</source>
|
||||||
<translation>Cote du fond min (m)</translation>
|
<translation>Cote du fond min (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="87"/>
|
<location filename="../View/Translate.py" line="88"/>
|
||||||
<source>Water Elevation (m)</source>
|
<source>Water Elevation (m)</source>
|
||||||
<translation>Cote de l'eau (m)</translation>
|
<translation>Cote de l'eau (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="90"/>
|
<location filename="../View/Translate.py" line="91"/>
|
||||||
<source>Water Elevation Envelop (m)</source>
|
<source>Water Elevation Envelop (m)</source>
|
||||||
<translation>Enveloppe de la cote de l'eau (m)</translation>
|
<translation>Enveloppe de la cote de l'eau (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="93"/>
|
<location filename="../View/Translate.py" line="94"/>
|
||||||
<source>Max Water Elevation (m)</source>
|
<source>Max Water Elevation (m)</source>
|
||||||
<translation>Cote de l'eau max (m)</translation>
|
<translation>Cote de l'eau max (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="96"/>
|
<location filename="../View/Translate.py" line="97"/>
|
||||||
<source>Min Water Elevation (m)</source>
|
<source>Min Water Elevation (m)</source>
|
||||||
<translation>Cote de l'eau min (m)</translation>
|
<translation>Cote de l'eau min (m)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="100"/>
|
<location filename="../View/Translate.py" line="101"/>
|
||||||
<source>Velocity Envelop (m/s)</source>
|
<source>Velocity Envelop (m/s)</source>
|
||||||
<translation>Enveloppe de la vitesse (m/s)</translation>
|
<translation>Enveloppe de la vitesse (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="103"/>
|
<location filename="../View/Translate.py" line="104"/>
|
||||||
<source>Max Velocity (m/s)</source>
|
<source>Max Velocity (m/s)</source>
|
||||||
<translation>Vitesse max (m/s)</translation>
|
<translation>Vitesse max (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="106"/>
|
<location filename="../View/Translate.py" line="107"/>
|
||||||
<source>Min Velocity (m/s)</source>
|
<source>Min Velocity (m/s)</source>
|
||||||
<translation>Vitesse min (m/s)</translation>
|
<translation>Vitesse min (m/s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="124"/>
|
<location filename="../View/Translate.py" line="126"/>
|
||||||
<source>Area</source>
|
<source>Area</source>
|
||||||
<translation>Aire</translation>
|
<translation>Aire</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="125"/>
|
<location filename="../View/Translate.py" line="127"/>
|
||||||
<source>Rho</source>
|
<source>Rho</source>
|
||||||
<translation>Rho</translation>
|
<translation>Rho</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="126"/>
|
<location filename="../View/Translate.py" line="128"/>
|
||||||
<source>Porosity</source>
|
<source>Porosity</source>
|
||||||
<translation>Porosité</translation>
|
<translation>Porosité</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="127"/>
|
<location filename="../View/Translate.py" line="129"/>
|
||||||
<source>CDC_RIV</source>
|
<source>CDC_RIV</source>
|
||||||
<translation>CDC_RIV</translation>
|
<translation>CDC_RIV</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="128"/>
|
<location filename="../View/Translate.py" line="130"/>
|
||||||
<source>CDC_CAS</source>
|
<source>CDC_CAS</source>
|
||||||
<translation>CDC_CAS</translation>
|
<translation>CDC_CAS</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="129"/>
|
<location filename="../View/Translate.py" line="131"/>
|
||||||
<source>APD</source>
|
<source>APD</source>
|
||||||
<translation>APD</translation>
|
<translation>APD</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="130"/>
|
<location filename="../View/Translate.py" line="132"/>
|
||||||
<source>AC</source>
|
<source>AC</source>
|
||||||
<translation>AC</translation>
|
<translation>AC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="131"/>
|
<location filename="../View/Translate.py" line="133"/>
|
||||||
<source>BC</source>
|
<source>BC</source>
|
||||||
<translation>BC</translation>
|
<translation>BC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="133"/>
|
<location filename="../View/Translate.py" line="135"/>
|
||||||
<source>Concentration (g/l)</source>
|
<source>Concentration (g/l)</source>
|
||||||
<translation>Concentration (g/l)</translation>
|
<translation>Concentration (g/l)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="144"/>
|
<location filename="../View/Translate.py" line="146"/>
|
||||||
<source>Mass (kg)</source>
|
<source>Mass (kg)</source>
|
||||||
<translation>Masse</translation>
|
<translation>Masse</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -3822,32 +3950,32 @@ moyen droit (m)</translation>
|
|||||||
<translation>Coeff c</translation>
|
<translation>Coeff c</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="109"/>
|
<location filename="../View/Translate.py" line="110"/>
|
||||||
<source>Discharge</source>
|
<source>Discharge</source>
|
||||||
<translation>Débit</translation>
|
<translation>Débit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="110"/>
|
<location filename="../View/Translate.py" line="112"/>
|
||||||
<source>Discharge Envelop</source>
|
<source>Discharge Envelop</source>
|
||||||
<translation>Enveloppe du débit</translation>
|
<translation>Enveloppe du débit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="112"/>
|
<location filename="../View/Translate.py" line="114"/>
|
||||||
<source>Max Discharge</source>
|
<source>Max Discharge</source>
|
||||||
<translation>Débit max</translation>
|
<translation>Débit max</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="114"/>
|
<location filename="../View/Translate.py" line="116"/>
|
||||||
<source>Min Discharge</source>
|
<source>Min Discharge</source>
|
||||||
<translation>Débit min</translation>
|
<translation>Débit min</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="145"/>
|
<location filename="../View/Translate.py" line="147"/>
|
||||||
<source>Concentration</source>
|
<source>Concentration</source>
|
||||||
<translation>Concentration</translation>
|
<translation>Concentration</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../View/Translate.py" line="136"/>
|
<location filename="../View/Translate.py" line="138"/>
|
||||||
<source>Wet Area</source>
|
<source>Wet Area</source>
|
||||||
<translation>Aire mouillée</translation>
|
<translation>Aire mouillée</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
+4
-1
@@ -260,7 +260,10 @@ def date_dmy_to_timestamp(date: str):
|
|||||||
def old_pamhyr_date_to_timestamp(date: str):
|
def old_pamhyr_date_to_timestamp(date: str):
|
||||||
v = date.split(":")
|
v = date.split(":")
|
||||||
if len(v) != 4:
|
if len(v) != 4:
|
||||||
return 0
|
if len(v) == 1: # minutes
|
||||||
|
return int(float(v[0]) * 60) # Minute to sec
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
|
||||||
m = [
|
m = [
|
||||||
(24 * 60 * 60), # Day to sec
|
(24 * 60 * 60), # Day to sec
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user