wolfhece 2.2.43__py3-none-any.whl → 2.2.45__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wolfhece/ChatwWOLF.py +200 -0
- wolfhece/Model1D.py +1785 -11
- wolfhece/PyCrosssections.py +1539 -702
- wolfhece/PyDraw.py +61 -8
- wolfhece/PyVertexvectors.py +64 -22
- wolfhece/RatingCurve_xml.py +15 -1
- wolfhece/analyze_poly.py +198 -4
- wolfhece/apps/version.py +1 -1
- wolfhece/dike.py +267 -19
- wolfhece/eikonal.py +1 -0
- wolfhece/wolf_array.py +251 -33
- {wolfhece-2.2.43.dist-info → wolfhece-2.2.45.dist-info}/METADATA +2 -2
- {wolfhece-2.2.43.dist-info → wolfhece-2.2.45.dist-info}/RECORD +16 -15
- {wolfhece-2.2.43.dist-info → wolfhece-2.2.45.dist-info}/WHEEL +0 -0
- {wolfhece-2.2.43.dist-info → wolfhece-2.2.45.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.2.43.dist-info → wolfhece-2.2.45.dist-info}/top_level.txt +0 -0
wolfhece/wolf_array.py
CHANGED
@@ -515,6 +515,15 @@ class header_wolf():
|
|
515
515
|
return ([self.origx, self.origx + float(self.nbx) * self.dx],
|
516
516
|
[self.origy, self.origy + float(self.nby) * self.dy])
|
517
517
|
|
518
|
+
def get_scale_yoverx(self):
|
519
|
+
"""
|
520
|
+
Return the scale of the array (height over width)
|
521
|
+
"""
|
522
|
+
if self.dx == 0 or self.dy == 0 or self.nbx == 0 or self.nby == 0:
|
523
|
+
return 1.
|
524
|
+
|
525
|
+
return float((self.nby * self.dy) / (self.nbx * self.dx))
|
526
|
+
|
518
527
|
def get_bounds_ij(self, abs=False):
|
519
528
|
"""
|
520
529
|
Return bounds in indices
|
@@ -596,6 +605,9 @@ class header_wolf():
|
|
596
605
|
else:
|
597
606
|
locij = np.zeros(locxy.shape, dtype=np.int32)
|
598
607
|
|
608
|
+
if locxy.size == 0:
|
609
|
+
return locij
|
610
|
+
|
599
611
|
locxy[:,0] -= self.origx
|
600
612
|
locxy[:,1] -= self.origy
|
601
613
|
|
@@ -6485,10 +6497,15 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
6485
6497
|
if hasattr(self, 'shaded'):
|
6486
6498
|
del self.shaded
|
6487
6499
|
|
6488
|
-
|
6489
|
-
|
6490
|
-
|
6491
|
-
|
6500
|
+
try:
|
6501
|
+
if sys.meta_path is not None:
|
6502
|
+
# Perform garbage collection if gc is available
|
6503
|
+
import gc
|
6504
|
+
gc.collect()
|
6505
|
+
except Exception:
|
6506
|
+
# Try/except to avoid issues during interpreter shutdown
|
6507
|
+
pass
|
6508
|
+
|
6492
6509
|
except Exception as e:
|
6493
6510
|
print(f"Exception in WolfArray destructor: {e} -- Please report this issue")
|
6494
6511
|
|
@@ -7693,6 +7710,10 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7693
7710
|
depuis les vertices 3D du polygone
|
7694
7711
|
"""
|
7695
7712
|
|
7713
|
+
if vector.area == 0.:
|
7714
|
+
logging.error(_('The polygon has no area'))
|
7715
|
+
return
|
7716
|
+
|
7696
7717
|
if keep not in ['all', 'below', 'above']:
|
7697
7718
|
logging.error(_('keep must be "all", "below" or "above"'))
|
7698
7719
|
raise ValueError
|
@@ -7702,7 +7723,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7702
7723
|
raise ValueError
|
7703
7724
|
|
7704
7725
|
if self.mngselection is None:
|
7705
|
-
destxy = self.get_xy_inside_polygon(working_vector)
|
7726
|
+
destxy = self.get_xy_inside_polygon(working_vector, method = 'shapely_strict')
|
7706
7727
|
if len(destxy)==0:
|
7707
7728
|
logging.debug(_('No points to interpolate'))
|
7708
7729
|
return
|
@@ -7720,16 +7741,16 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7720
7741
|
destxy = self.ij2xy_np(destij)
|
7721
7742
|
else:
|
7722
7743
|
if self.SelectionData.nb == 0:
|
7723
|
-
destxy = self.get_xy_inside_polygon(working_vector)
|
7744
|
+
destxy = self.get_xy_inside_polygon(working_vector, method= 'shapely_strict')
|
7745
|
+
if destxy.shape[0] == 0:
|
7746
|
+
logging.debug(_('No points to interpolate'))
|
7747
|
+
return
|
7724
7748
|
else:
|
7725
7749
|
destxy = self.SelectionData.myselection
|
7726
7750
|
|
7727
|
-
|
7728
|
-
|
7729
|
-
|
7730
|
-
if len(destxy)==0:
|
7731
|
-
logging.debug(_('No points to interpolate'))
|
7732
|
-
return
|
7751
|
+
if len(destxy)==0:
|
7752
|
+
logging.debug(_('No points to interpolate'))
|
7753
|
+
return
|
7733
7754
|
|
7734
7755
|
destij = self.xy2ij_np(destxy)
|
7735
7756
|
|
@@ -7813,6 +7834,56 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7813
7834
|
for curvec in working_zone.myvectors:
|
7814
7835
|
self.interpolate_on_polygon(curvec, method, keep)
|
7815
7836
|
|
7837
|
+
def interpolate_strictly_on_polyline(self, working_vector:vector, usemask=True, keep:Literal['all', 'below', 'above'] = 'all'):
|
7838
|
+
"""
|
7839
|
+
Interpolation des mailles strictement sous une polyligne.
|
7840
|
+
|
7841
|
+
On utilise ensuite "interpolate" de shapely pour interpoler les altitudes des mailles
|
7842
|
+
depuis les vertices 3D de la polyligne
|
7843
|
+
"""
|
7844
|
+
|
7845
|
+
vecls = working_vector.linestring
|
7846
|
+
xy = self.get_xy_strictly_on_borders(working_vector, usemask=usemask)
|
7847
|
+
if xy.shape[0] == 0:
|
7848
|
+
logging.debug(_('No points to interpolate'))
|
7849
|
+
return
|
7850
|
+
ij = np.asarray([self.get_ij_from_xy(x, y) for x, y in xy])
|
7851
|
+
newz = np.asarray([vecls.interpolate(vecls.project(Point(x, y))).z for x, y in xy])
|
7852
|
+
|
7853
|
+
if keep == 'all':
|
7854
|
+
self.array.data[ij[:, 0], ij[:, 1]] = newz
|
7855
|
+
elif keep == 'below':
|
7856
|
+
locmask = np.where((newz != -99999.) & (newz < self.array.data[ij[:, 0], ij[:, 1]]))
|
7857
|
+
self.array.data[ij[locmask][:, 0], ij[locmask][:, 1]] = newz[locmask]
|
7858
|
+
elif keep == 'above':
|
7859
|
+
locmask = np.where((newz != -99999.) & (newz > self.array.data[ij[:, 0], ij[:, 1]]))
|
7860
|
+
self.array.data[ij[locmask][:, 0], ij[locmask][:, 1]] = newz[locmask]
|
7861
|
+
|
7862
|
+
def interpolate_strictly_on_vertices(self, working_vector:vector, usemask=True, keep:Literal['all', 'below', 'above'] = 'all'):
|
7863
|
+
"""
|
7864
|
+
Interpolation des mailles strictement sous une polyligne.
|
7865
|
+
|
7866
|
+
On utilise ensuite "interpolate" de shapely pour interpoler les altitudes des mailles
|
7867
|
+
depuis les vertices 3D de la polyligne
|
7868
|
+
"""
|
7869
|
+
|
7870
|
+
vecls = working_vector.linestring
|
7871
|
+
xy = self.get_xy_strictly_on_vertices(working_vector, usemask=usemask)
|
7872
|
+
if xy.shape[0] == 0:
|
7873
|
+
logging.debug(_('No points to interpolate'))
|
7874
|
+
return
|
7875
|
+
ij = np.asarray([self.get_ij_from_xy(x, y) for x, y in xy])
|
7876
|
+
newz = np.asarray([vecls.interpolate(vecls.project(Point(x, y))).z for x, y in xy])
|
7877
|
+
|
7878
|
+
if keep == 'all':
|
7879
|
+
self.array.data[ij[:, 0], ij[:, 1]] = newz
|
7880
|
+
elif keep == 'below':
|
7881
|
+
locmask = np.where((newz != -99999.) & (newz < self.array.data[ij[:, 0], ij[:, 1]]))
|
7882
|
+
self.array.data[ij[locmask][:, 0], ij[locmask][:, 1]] = newz[locmask]
|
7883
|
+
elif keep == 'above':
|
7884
|
+
locmask = np.where((newz != -99999.) & (newz > self.array.data[ij[:, 0], ij[:, 1]]))
|
7885
|
+
self.array.data[ij[locmask][:, 0], ij[locmask][:, 1]] = newz[locmask]
|
7886
|
+
|
7816
7887
|
def interpolate_on_polyline(self, working_vector:vector, usemask=True):
|
7817
7888
|
"""
|
7818
7889
|
Interpolation sous une polyligne
|
@@ -7889,8 +7960,9 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7889
7960
|
def interpolate_on_triangulation(self, coords, triangles,
|
7890
7961
|
grid_x=None, grid_y = None,
|
7891
7962
|
mask_tri=None,
|
7892
|
-
interp_method:Literal['matplotlib','scipy'] = '
|
7893
|
-
keep:Literal['all', 'below', 'above'] = 'all'
|
7963
|
+
interp_method:Literal['matplotlib','scipy'] = 'scipy',
|
7964
|
+
keep:Literal['all', 'below', 'above'] = 'all',
|
7965
|
+
points_along_edges:bool = True):
|
7894
7966
|
"""
|
7895
7967
|
Interpolation sur une triangulation.
|
7896
7968
|
|
@@ -7898,7 +7970,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
7898
7970
|
- uniquement dans les mailles sélectionnées si elles existent
|
7899
7971
|
- dans les mailles contenues dans la triangulation sinon
|
7900
7972
|
|
7901
|
-
|
7973
|
+
Scipy(griddata) is used by default (more robust), but Matplotlib can be used as well (more strict). If Matplotlib crashes, try with Scipy.
|
7902
7974
|
|
7903
7975
|
**Matplotlib is more strict on the quality of the triangulation.**
|
7904
7976
|
|
@@ -8205,6 +8277,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
8205
8277
|
#on force les valeurs masquées à nullvalue afin que l'interpolation n'applique pas ses effets dans cette zone
|
8206
8278
|
self.array.data[self.array.mask]= self.nullvalue
|
8207
8279
|
except:
|
8280
|
+
logging.error(_('Bad triangulation - We will try with Scipy'))
|
8208
8281
|
use_scipy=True
|
8209
8282
|
|
8210
8283
|
if interp_method != 'matplotlib' or use_scipy:
|
@@ -8216,8 +8289,15 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
8216
8289
|
curvec.add_vertex(wolfvertex(coords[curpt,0], coords[curpt,1], coords[curpt,2]))
|
8217
8290
|
curvec.close_force()
|
8218
8291
|
|
8292
|
+
# if bool(np.isnan(curvec.x).any() or np.isnan(curvec.y).any()):
|
8293
|
+
# continue
|
8219
8294
|
self.interpolate_on_polygon(curvec, "linear", keep)
|
8220
8295
|
|
8296
|
+
if points_along_edges:
|
8297
|
+
# Test points along edges
|
8298
|
+
self.interpolate_strictly_on_polyline(curvec, usemask=True, keep=keep)
|
8299
|
+
# self.interpolate_strictly_on_vertices(curvec, usemask=True, keep=keep)
|
8300
|
+
|
8221
8301
|
self.reset_plot()
|
8222
8302
|
return
|
8223
8303
|
|
@@ -9003,7 +9083,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9003
9083
|
self.mask_reset()
|
9004
9084
|
|
9005
9085
|
def interpolation2D(self, key:str='1'):
|
9006
|
-
""" Interpolation 2D
|
9086
|
+
""" Interpolation 2D based on selected points in key 1 """
|
9007
9087
|
|
9008
9088
|
#FIXME : auhtorize interpolation on other keys
|
9009
9089
|
|
@@ -9576,6 +9656,113 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9576
9656
|
elif method == 'rasterio':
|
9577
9657
|
return self.get_xy_inside_polygon_rasterio(myvect, usemask)
|
9578
9658
|
|
9659
|
+
def get_xy_strictly_on_borders(self, myvect: vector | Polygon | LineString, usemask:bool=True,
|
9660
|
+
method:Literal['shapely']='shapely'):
|
9661
|
+
"""
|
9662
|
+
Return the coordinates strictly on the borders of a polygon.
|
9663
|
+
|
9664
|
+
ATTENTION : Tests are performed numerically, so the results may not be exact
|
9665
|
+
in the sense of pure geometry.
|
9666
|
+
|
9667
|
+
Do not confuse with "get_xy_under_polyline" which
|
9668
|
+
"rasterize" the polyline to find useful coordinates.
|
9669
|
+
|
9670
|
+
:param myvect: target vector
|
9671
|
+
:param usemask: limit potential nodes to unmaksed nodes
|
9672
|
+
:param method: method to use ('shapely' for now)
|
9673
|
+
"""
|
9674
|
+
|
9675
|
+
# As we will use Shapely(contains) to test if points are on the border,
|
9676
|
+
# we need to use a Linestring or a Polygon.boundary.
|
9677
|
+
if isinstance(myvect, vector):
|
9678
|
+
myvect.find_minmax()
|
9679
|
+
boundary = myvect.linestring
|
9680
|
+
elif isinstance(myvect, Polygon):
|
9681
|
+
boundary = myvect.boundary
|
9682
|
+
elif isinstance(myvect, LineString):
|
9683
|
+
boundary = myvect
|
9684
|
+
|
9685
|
+
if not is_prepared(boundary):
|
9686
|
+
prepare(boundary) # Prepare the polygon for **faster** contains check -- VERY IMPORTANT
|
9687
|
+
to_destroy = True
|
9688
|
+
else:
|
9689
|
+
to_destroy = False
|
9690
|
+
mypointsxy, mypointsij = self.get_xy_infootprint_vect(myvect)
|
9691
|
+
|
9692
|
+
points= np.array([Point(x,y) for x,y in mypointsxy])
|
9693
|
+
on_border = list(map(lambda point: boundary.contains(point), points))
|
9694
|
+
|
9695
|
+
if to_destroy:
|
9696
|
+
destroy_prepared(boundary) # Destroy the prepared polygon
|
9697
|
+
|
9698
|
+
to_keep = np.where(on_border)
|
9699
|
+
mypointsxy = mypointsxy[to_keep]
|
9700
|
+
|
9701
|
+
if mypointsxy.shape[0] == 0:
|
9702
|
+
return mypointsxy
|
9703
|
+
|
9704
|
+
if usemask:
|
9705
|
+
mypointsij = mypointsij[to_keep]
|
9706
|
+
mymask = np.logical_not(self.array.mask[mypointsij[:, 0], mypointsij[:, 1]])
|
9707
|
+
mypointsxy = mypointsxy[np.where(mymask)]
|
9708
|
+
|
9709
|
+
return mypointsxy
|
9710
|
+
|
9711
|
+
def get_xy_strictly_on_vertices(self, myvect: vector | Polygon | LineString, usemask:bool=True,
|
9712
|
+
method:Literal['shapely']='shapely', eps:float = 1.e-4):
|
9713
|
+
"""
|
9714
|
+
Return the coordinates strictly on the vertices of a polygon, Linestring or vector.
|
9715
|
+
|
9716
|
+
ATTENTION : Tests are performed numerically, so the results may not be exact
|
9717
|
+
in the sense of pure geometry.
|
9718
|
+
|
9719
|
+
:param myvect: target vector
|
9720
|
+
:param usemask: limit potential nodes to unmaksed nodes
|
9721
|
+
:param method: method to use ('shapely' for now)
|
9722
|
+
"""
|
9723
|
+
|
9724
|
+
# As we will use Shapely(contains) to test if points are on the border,
|
9725
|
+
# we need to use a Linestring or a Polygon.boundary.
|
9726
|
+
if isinstance(myvect, vector):
|
9727
|
+
myvect.find_minmax()
|
9728
|
+
boundary = myvect.linestring
|
9729
|
+
elif isinstance(myvect, Polygon):
|
9730
|
+
boundary = myvect.boundary
|
9731
|
+
elif isinstance(myvect, LineString):
|
9732
|
+
boundary = myvect
|
9733
|
+
|
9734
|
+
if not is_prepared(boundary):
|
9735
|
+
prepare(boundary) # Prepare the polygon for **faster** contains check -- VERY IMPORTANT
|
9736
|
+
to_destroy = True
|
9737
|
+
else:
|
9738
|
+
to_destroy = False
|
9739
|
+
|
9740
|
+
mypointsxy, mypointsij = self.get_xy_infootprint_vect(myvect)
|
9741
|
+
|
9742
|
+
# Calculate distances to the vertices
|
9743
|
+
# We use the vertices of the polygon or linestring to check if points are on the
|
9744
|
+
# vertices.
|
9745
|
+
|
9746
|
+
points = np.array([Point(x,y) for x,y in mypointsxy])
|
9747
|
+
vertices = [Point(pt[0], pt[1], pt[2]) for pt in boundary.coords]
|
9748
|
+
on_vertices = list(map(lambda point: any(vert.distance(point) < eps for vert in vertices), points))
|
9749
|
+
|
9750
|
+
if to_destroy:
|
9751
|
+
destroy_prepared(boundary) # Destroy the prepared polygon
|
9752
|
+
|
9753
|
+
to_keep = np.where(on_vertices)
|
9754
|
+
mypointsxy = mypointsxy[to_keep]
|
9755
|
+
|
9756
|
+
if mypointsxy.shape[0] == 0:
|
9757
|
+
return mypointsxy
|
9758
|
+
|
9759
|
+
if usemask:
|
9760
|
+
mypointsij = mypointsij[to_keep]
|
9761
|
+
mymask = np.logical_not(self.array.mask[mypointsij[:, 0], mypointsij[:, 1]])
|
9762
|
+
mypointsxy = mypointsxy[np.where(mymask)]
|
9763
|
+
|
9764
|
+
return mypointsxy
|
9765
|
+
|
9579
9766
|
def get_xy_inside_polygon_mpl(self, myvect: vector | Polygon, usemask:bool=True):
|
9580
9767
|
"""
|
9581
9768
|
Return the coordinates inside a polygon
|
@@ -9641,10 +9828,14 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9641
9828
|
if to_destroy:
|
9642
9829
|
destroy_prepared(polygon) # Destroy the prepared polygon
|
9643
9830
|
|
9644
|
-
|
9831
|
+
to_keep = np.where(inside)
|
9832
|
+
mypointsxy = mypointsxy[to_keep]
|
9833
|
+
|
9834
|
+
if mypointsxy.shape[0] == 0:
|
9835
|
+
return mypointsxy
|
9645
9836
|
|
9646
9837
|
if usemask:
|
9647
|
-
mypointsij = mypointsij[
|
9838
|
+
mypointsij = mypointsij[to_keep]
|
9648
9839
|
mymask = np.logical_not(self.array.mask[mypointsij[:, 0], mypointsij[:, 1]])
|
9649
9840
|
mypointsxy = mypointsxy[np.where(mymask)]
|
9650
9841
|
|
@@ -9710,6 +9901,33 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
9710
9901
|
elif method == 'rasterio':
|
9711
9902
|
return self._get_ij_inside_polygon_rasterio(myvect, usemask, eps)
|
9712
9903
|
|
9904
|
+
|
9905
|
+
def get_ij_inside_listofpolygons(self, myvects: list[vector | Polygon],
|
9906
|
+
usemask:bool=True, eps:float = 0.,
|
9907
|
+
method:Literal['mpl', 'shapely_strict', 'shapely_wboundary', 'rasterio']='shapely_strict'):
|
9908
|
+
"""
|
9909
|
+
Return the indices inside a list of polygons
|
9910
|
+
:param myvects: target vector
|
9911
|
+
:param usemask: limit potential nodes to unmaksed nodes
|
9912
|
+
:param eps: epsilon for the intersection
|
9913
|
+
"""
|
9914
|
+
if isinstance(myvects, zone):
|
9915
|
+
myvects = myvects.myvectors
|
9916
|
+
|
9917
|
+
alls = list(map(lambda vec: self.get_ij_inside_polygon(vec, usemask, method=method), myvects))
|
9918
|
+
#remove empty arrays
|
9919
|
+
alls = [cur for cur in alls if cur.shape[0] > 0]
|
9920
|
+
if len(alls) == 0:
|
9921
|
+
return np.empty((0, 2), dtype=int)
|
9922
|
+
# Concatenate all arrays
|
9923
|
+
mypointsij = np.concatenate(alls, axis=0)
|
9924
|
+
# Remove duplicates
|
9925
|
+
mypointsij = np.unique(mypointsij, axis=0)
|
9926
|
+
if mypointsij.shape[0] == 0:
|
9927
|
+
return np.empty((0, 2), dtype=int)
|
9928
|
+
return mypointsij
|
9929
|
+
|
9930
|
+
|
9713
9931
|
def get_ij_inside_polygon_mpl(self, myvect: vector | Polygon, usemask:bool=True, eps:float = 0.):
|
9714
9932
|
"""
|
9715
9933
|
Return the indices inside a polygon
|
@@ -11683,16 +11901,16 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
11683
11901
|
try:
|
11684
11902
|
bounds = self.get_bounds()
|
11685
11903
|
|
11686
|
-
|
11904
|
+
scale_covery = (bounds[0][1] - bounds[0][0]) / (bounds[1][1] - bounds[1][0])
|
11687
11905
|
|
11688
|
-
if
|
11906
|
+
if scale_covery > 1.:
|
11689
11907
|
# x is larger than y
|
11690
11908
|
w = 2000
|
11691
|
-
h = int(2000 /
|
11909
|
+
h = int(2000 / scale_covery)
|
11692
11910
|
else:
|
11693
11911
|
# y is larger than x
|
11694
11912
|
h = 2000
|
11695
|
-
w = int(2000 *
|
11913
|
+
w = int(2000 * scale_covery)
|
11696
11914
|
|
11697
11915
|
IO_image = getWalonmap(cat, bounds[0][0], bounds[1][0],
|
11698
11916
|
bounds[0][1], bounds[1][1],
|
@@ -11716,15 +11934,15 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
11716
11934
|
else:
|
11717
11935
|
try:
|
11718
11936
|
bounds = self.get_bounds()
|
11719
|
-
|
11720
|
-
if
|
11937
|
+
scale_covery = (bounds[0][1] - bounds[0][0]) / (bounds[1][1] - bounds[1][0])
|
11938
|
+
if scale_covery > 1.:
|
11721
11939
|
# x is larger than y
|
11722
11940
|
w = 2000
|
11723
|
-
h = int(2000 /
|
11941
|
+
h = int(2000 / scale_covery)
|
11724
11942
|
else:
|
11725
11943
|
# y is larger than x
|
11726
11944
|
h = 2000
|
11727
|
-
w = int(2000 *
|
11945
|
+
w = int(2000 * scale_covery)
|
11728
11946
|
IO_image = getNGI(cat, bounds[0][0], bounds[1][0],
|
11729
11947
|
bounds[0][1], bounds[1][1],
|
11730
11948
|
w=w, h=h, tofile=False) # w=self.nbx, h=self.nby
|
@@ -11744,15 +11962,15 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
11744
11962
|
else:
|
11745
11963
|
try:
|
11746
11964
|
bounds = self.get_bounds()
|
11747
|
-
|
11748
|
-
if
|
11965
|
+
scale_covery = (bounds[0][1] - bounds[0][0]) / (bounds[1][1] - bounds[1][0])
|
11966
|
+
if scale_covery > 1.:
|
11749
11967
|
# x is larger than y
|
11750
11968
|
w = 2000
|
11751
|
-
h = int(2000 /
|
11969
|
+
h = int(2000 / scale_covery)
|
11752
11970
|
else:
|
11753
11971
|
# y is larger than x
|
11754
11972
|
h = 2000
|
11755
|
-
w = int(2000 *
|
11973
|
+
w = int(2000 * scale_covery)
|
11756
11974
|
IO_image = getCartoweb(cat, bounds[0][0], bounds[1][0],
|
11757
11975
|
bounds[0][1], bounds[1][1],
|
11758
11976
|
w=w, h=h, tofile=False) # w=self.nbx, h=self.nby
|
@@ -11779,8 +11997,8 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
11779
11997
|
self.origx + self.dx * self.nbx,
|
11780
11998
|
self.origy,
|
11781
11999
|
self.origy + self.dy * self.nby),
|
11782
|
-
|
11783
|
-
[np.zeros(self.shape).T, np.ones(self.shape).T]))
|
12000
|
+
alpha=np.select([self.array.mask.T, ~self.array.mask.T],
|
12001
|
+
[np.zeros(self.shape).T, np.ones(self.shape).T * self.alpha]))
|
11784
12002
|
|
11785
12003
|
if with_legend:
|
11786
12004
|
# add a legend in a new axis
|
@@ -11809,7 +12027,7 @@ class WolfArray(Element_To_Draw, header_wolf):
|
|
11809
12027
|
self.origy + self.dy * self.nby),
|
11810
12028
|
vmin=vmin, vmax=vmax,
|
11811
12029
|
alpha=np.select([self.array.mask.T, ~self.array.mask.T],
|
11812
|
-
[np.zeros(self.shape).T, np.ones(self.shape).T])
|
12030
|
+
[np.zeros(self.shape).T, np.ones(self.shape).T * self.alpha]))
|
11813
12031
|
|
11814
12032
|
|
11815
12033
|
if with_legend:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wolfhece
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.45
|
4
4
|
Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
|
5
5
|
Project-URL: Homepage, https://uee.uliege.be/hece
|
6
6
|
Project-URL: Issues, https://uee.uliege.be/hece
|
@@ -73,7 +73,7 @@ Requires-Dist: tabulate
|
|
73
73
|
Requires-Dist: ipympl
|
74
74
|
Requires-Dist: contextily
|
75
75
|
Requires-Dist: pefile
|
76
|
-
Requires-Dist: wolfpydike
|
76
|
+
Requires-Dist: wolfpydike==0.1.3
|
77
77
|
Requires-Dist: PyMuPDF
|
78
78
|
Requires-Dist: eccodes
|
79
79
|
Requires-Dist: dataframe_image
|
@@ -1,15 +1,16 @@
|
|
1
|
+
wolfhece/ChatwWOLF.py,sha256=B7MkwZiLYjR3OUNBcTIxDnYZzOBFDe52k880KTLUotc,10135
|
1
2
|
wolfhece/Coordinates_operations.py,sha256=DSkzJ1Rm4y89I9tuyyAA9mp-EHp9vl5w2qGpNJ-e9qs,8215
|
2
3
|
wolfhece/CpGrid.py,sha256=_piG1u-ua7NzWh_PHJYTmxuPJ43ZfeYKNEQgZIJwDJ8,10660
|
3
4
|
wolfhece/GraphNotebook.py,sha256=_VZfakR5eXBZE-4Ztv2n12ZDO8zESoeDfCz_9k__T20,31509
|
4
5
|
wolfhece/GraphProfile.py,sha256=PhdgRIt7jHWEM_msnVysk18-JpS1f55tnfJzq7fDTfM,69676
|
5
6
|
wolfhece/Lidar2002.py,sha256=bX-nIzdpjD7rOfEgJpTeaW6rIdAXwDp_z4YTM9CgANY,6068
|
6
7
|
wolfhece/ManageParams.py,sha256=EeuUI5Vvh9ixCvYf8YShMC1s1Yacc7OxOCN7q81gqiQ,517
|
7
|
-
wolfhece/Model1D.py,sha256
|
8
|
+
wolfhece/Model1D.py,sha256=-2ibQLscVUsXlcnJWixCIScrBPqJ9BTirmwtGXEKI-4,571155
|
8
9
|
wolfhece/MulticriteriAnalysis.py,sha256=vGmkzYagZohNe0XjwGJ6VUXcDPjOt80lNFthXpzxCF0,59572
|
9
10
|
wolfhece/PandasGrid.py,sha256=etfVhIHzja4Z1EUY6BcDOKX-w7V-Xou1yaf0NMqmclo,4599
|
10
11
|
wolfhece/PyConfig.py,sha256=13DDWjJdohYHwn1uRVHB0s8Jcwq_b9pwcwbAr8NlZyc,19667
|
11
|
-
wolfhece/PyCrosssections.py,sha256=
|
12
|
-
wolfhece/PyDraw.py,sha256=
|
12
|
+
wolfhece/PyCrosssections.py,sha256=tVAlYJjCjmaVzP2YFSmWX_0aJ3v9O2sh2O6NBgmUaww,176430
|
13
|
+
wolfhece/PyDraw.py,sha256=a94Y827cyvjfDX76-k6qnITHVUVGqJ65jHD3z6qetm0,744062
|
13
14
|
wolfhece/PyGui.py,sha256=GpVRxNpR8WNDFyHnDvhtHFFsq_cZZlyVgSkFiS-ARYI,185342
|
14
15
|
wolfhece/PyGuiHydrology.py,sha256=dmBlRO8AljsvCPH6eVt0l9ZLx7g5j7Ubl9Srk7ECwyA,34693
|
15
16
|
wolfhece/PyHydrographs.py,sha256=1P5XAURNqCvtSsMQXhOn1ihjTpr725sRsZdlCEhhk6M,3730
|
@@ -18,23 +19,23 @@ wolfhece/PyParams.py,sha256=900BIaS7hzFwddsrpowWshf5kjQJKYVhnFykMVTlRSM,102063
|
|
18
19
|
wolfhece/PyPictures.py,sha256=qcKwyCmZA0V7Kcr1FiLmcMlVhX0BgIZsJawAIKt8qt4,18932
|
19
20
|
wolfhece/PyTranslate.py,sha256=4appkmNeHHZLFmUtaA_k5_5QL-5ymxnbVN4R2OblmtE,622
|
20
21
|
wolfhece/PyVertex.py,sha256=0KUzHc4ozuiZKuej6Xx4lyzE7vFOKeBO5dGk-K5LtHo,51893
|
21
|
-
wolfhece/PyVertexvectors.py,sha256=
|
22
|
+
wolfhece/PyVertexvectors.py,sha256=vDY_ZBCM70n_PT7C5nXpoN0sAkY2soazPFiFOWKABS8,379402
|
22
23
|
wolfhece/PyWMS.py,sha256=MOOikPo-jZv1oPUruGv6XR_Pn_W3h-eNBeRgi_pRNOc,32031
|
23
24
|
wolfhece/RatingCurve.py,sha256=bUjIrQjvIjkD4V-z8bZmA6pe1ILtYNM0-3fT6YUY1RU,22498
|
24
25
|
wolfhece/RatingCurveData.py,sha256=5UvnIm89BwqjnEbLCcY3CA8WoFd_xHJbooNy62fX5iY,57660
|
25
|
-
wolfhece/RatingCurve_xml.py,sha256=
|
26
|
+
wolfhece/RatingCurve_xml.py,sha256=XOzkCozGFVq5X7m_1lBJnv7Qwd307BFTyi_nCQ9PYx8,34395
|
26
27
|
wolfhece/ReadDataDCENN.py,sha256=vm-I4YMryvRldjXTvRYEUCxZsjb_tM7U9yj6OaPyD0k,1538
|
27
28
|
wolfhece/Results2DGPU.py,sha256=ljMEKHGMbmIAZE6UmMmYDMFqFAwjzxxVUmZdHHb6aME,32106
|
28
29
|
wolfhece/__init__.py,sha256=bh5zzt90fGJcc97d0DiuZsV9VxwBEy9HUBfexHmQDJk,1978
|
29
30
|
wolfhece/_add_path.py,sha256=mAyu85CQHk0KgUI6ZizweeQiw1Gdyea9OEjGLC6lLA4,916
|
30
|
-
wolfhece/analyze_poly.py,sha256=
|
31
|
+
wolfhece/analyze_poly.py,sha256=pgZnAo_wBA5AcTgEueEoHF8kFE8X-2iqEmWuPXNNUTg,69307
|
31
32
|
wolfhece/analyze_vect.py,sha256=3lkMwaQ4KRddBVRvlP9PcM66wZwwC0eCmypP91AW-os,6015
|
32
33
|
wolfhece/cli.py,sha256=h1tSMHALiftktreyugKcjbASXfpJUm9UYMeVxR-MtG4,6424
|
33
34
|
wolfhece/color_constants.py,sha256=Snc5RX11Ydi756EkBp_83C7DiAQ_Z1aHD9jFIBsosAU,37121
|
34
35
|
wolfhece/compare_series.py,sha256=M8Xce8vexq3KyVoN-de7pcgCVW0A16vrvlYZegfbwBM,17674
|
35
|
-
wolfhece/dike.py,sha256=
|
36
|
+
wolfhece/dike.py,sha256=virm26hYnamBOWtFPSBrO2n1z6TmjN5aTTC9te24Pc8,42364
|
36
37
|
wolfhece/drawing_obj.py,sha256=O_K9xlsiPn305YS_2oWTlv3-rBuGiCkwWEcYAwlJRGs,4514
|
37
|
-
wolfhece/eikonal.py,sha256=
|
38
|
+
wolfhece/eikonal.py,sha256=mxFHJIVJq4pLCI5q1_NaX7Y56ZYk7BN5aqx4xtVsxvc,23291
|
38
39
|
wolfhece/flow_SPWMI.py,sha256=XDAelwAY-3rYOR0WKW3fgYJ_r8DU4IP6Y5xULW421tk,20956
|
39
40
|
wolfhece/friction_law.py,sha256=_VrcFm2E--RfOvGjsazL5Zve_p5fIhzsT62AElI5E04,5501
|
40
41
|
wolfhece/gpuview.py,sha256=Jql8pLZ0PpvZ_ScT-U4jsXANZ9j4-m_RWhsLA2HISuQ,24544
|
@@ -67,7 +68,7 @@ wolfhece/textpillow.py,sha256=7hgfsLYAaE_rNKD-g8xsON8sdWvoV8vbqnGGxIayShE,14137
|
|
67
68
|
wolfhece/tools2d_dll.py,sha256=TfvvmyZUqEZIH0uHwUCJf0bdmCks_AiidDt23Unsp5w,13550
|
68
69
|
wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
|
69
70
|
wolfhece/toolshydrology_dll.py,sha256=cIGyhxV8H5f7GXhDqAamM7uC0W0hQTou3eTkqZdnqBE,5656
|
70
|
-
wolfhece/wolf_array.py,sha256=
|
71
|
+
wolfhece/wolf_array.py,sha256=Vd_9Sp6wjTF9diu9NUOeVymjZNfTnuymYWx280Nx210,588231
|
71
72
|
wolfhece/wolf_hist.py,sha256=fTEb60Q4TEwobdZsRU4CFXAId1eOKdWAqF8lnF1xEWc,3590
|
72
73
|
wolfhece/wolf_texture.py,sha256=Pt1j_lX74p70Fj3y3qYxYMuN8gghVd8_ih1vFhTIdkA,23884
|
73
74
|
wolfhece/wolf_tiles.py,sha256=v-HohqaWuMYdn75XLnA22dlloAG90iwnIqrgnB0ASQ4,10488
|
@@ -95,7 +96,7 @@ wolfhece/apps/curvedigitizer.py,sha256=lEJJwgAfulrrWQc-U6ij6sj59hWN3SZl4Yu1kQxVz
|
|
95
96
|
wolfhece/apps/hydrometry.py,sha256=lhhJsFeb4zGL4bNQTs0co85OQ_6ssL1Oy0OUJCzhfYE,656
|
96
97
|
wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
|
97
98
|
wolfhece/apps/splashscreen.py,sha256=EdGDN9NhudIiP7c3gVqj7dp4MWFB8ySizM_tpMnsgpE,3091
|
98
|
-
wolfhece/apps/version.py,sha256=
|
99
|
+
wolfhece/apps/version.py,sha256=VmZdb3DGqah-YZlqUibhAku2wmsYYuTt_7l5Hcf0xf0,388
|
99
100
|
wolfhece/apps/wolf.py,sha256=mRnjYsUu4KIsRuamdQWAINFMuwN4eJgMo9erG-hkZ70,729
|
100
101
|
wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
|
101
102
|
wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
|
@@ -320,8 +321,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=u4C7CXe_bUyGKx7c_Bi0x9
|
|
320
321
|
wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
|
321
322
|
wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
322
323
|
wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
|
323
|
-
wolfhece-2.2.
|
324
|
-
wolfhece-2.2.
|
325
|
-
wolfhece-2.2.
|
326
|
-
wolfhece-2.2.
|
327
|
-
wolfhece-2.2.
|
324
|
+
wolfhece-2.2.45.dist-info/METADATA,sha256=eV92Icaf_qIZmocjxaECy1zeighi9PKM0imSWbAUXDM,2792
|
325
|
+
wolfhece-2.2.45.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
326
|
+
wolfhece-2.2.45.dist-info/entry_points.txt,sha256=Jr187pyvA3EeJiQLjZK9yo6mJX7IAn6ygZU9T8qF_gQ,658
|
327
|
+
wolfhece-2.2.45.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
|
328
|
+
wolfhece-2.2.45.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|