ras-commander 0.47.0__py3-none-any.whl → 0.48.0__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.
- ras_commander/HdfFluvialPluvial.py +10 -1
- ras_commander/HdfMesh.py +4 -5
- {ras_commander-0.47.0.dist-info → ras_commander-0.48.0.dist-info}/METADATA +2 -2
- {ras_commander-0.47.0.dist-info → ras_commander-0.48.0.dist-info}/RECORD +7 -7
- {ras_commander-0.47.0.dist-info → ras_commander-0.48.0.dist-info}/LICENSE +0 -0
- {ras_commander-0.47.0.dist-info → ras_commander-0.48.0.dist-info}/WHEEL +0 -0
- {ras_commander-0.47.0.dist-info → ras_commander-0.48.0.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,6 @@ import pandas as pd
|
|
3
3
|
import geopandas as gpd
|
4
4
|
import matplotlib.pyplot as plt
|
5
5
|
from collections import defaultdict
|
6
|
-
from rtree import index
|
7
6
|
from shapely.geometry import LineString, MultiLineString
|
8
7
|
from tqdm import tqdm
|
9
8
|
|
@@ -236,6 +235,11 @@ class HdfFluvialPluvial:
|
|
236
235
|
|
237
236
|
@staticmethod
|
238
237
|
def _process_cell_adjacencies(cell_polygons_gdf: gpd.GeoDataFrame) -> Tuple[Dict[int, List[int]], Dict[int, Dict[int, LineString]]]:
|
238
|
+
"""
|
239
|
+
Process cell adjacencies and common edges using R-tree indexing.
|
240
|
+
"""
|
241
|
+
# Install rtree using pip install rtree if not already installed
|
242
|
+
from rtree import index
|
239
243
|
cell_adjacency = defaultdict(list)
|
240
244
|
common_edges = defaultdict(dict)
|
241
245
|
idx = index.Index()
|
@@ -314,4 +318,9 @@ class HdfFluvialPluvial:
|
|
314
318
|
- GeoDataFrame with the specified projection.
|
315
319
|
"""
|
316
320
|
gdf = gpd.GeoDataFrame(df, geometry='geometry', crs=projection)
|
321
|
+
|
317
322
|
return gdf
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
ras_commander/HdfMesh.py
CHANGED
@@ -304,7 +304,6 @@ class HdfMesh:
|
|
304
304
|
logger.error(f"Error reading 2D flow area attributes from {hdf_path}: {str(e)}")
|
305
305
|
return {}
|
306
306
|
|
307
|
-
|
308
307
|
@staticmethod
|
309
308
|
@standardize_input(file_type='geom_hdf')
|
310
309
|
def get_face_property_tables(hdf_path: Path) -> Dict[str, pd.DataFrame]:
|
@@ -339,10 +338,10 @@ class HdfMesh:
|
|
339
338
|
for z, area, wetted_perimeter, mannings_n in face_values:
|
340
339
|
face_data.append({
|
341
340
|
'Face ID': face_id,
|
342
|
-
'Z': z
|
343
|
-
'Area': area
|
344
|
-
'Wetted Perimeter': wetted_perimeter
|
345
|
-
"Manning's n": mannings_n
|
341
|
+
'Z': str(z),
|
342
|
+
'Area': str(area),
|
343
|
+
'Wetted Perimeter': str(wetted_perimeter),
|
344
|
+
"Manning's n": str(mannings_n)
|
346
345
|
})
|
347
346
|
|
348
347
|
result[mesh_name] = pd.DataFrame(face_data)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ras-commander
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.48.0
|
4
4
|
Summary: A Python library for automating HEC-RAS operations
|
5
5
|
Home-page: https://github.com/billk-FM/ras-commander
|
6
6
|
Author: William M. Katzenmeyer
|
@@ -61,7 +61,7 @@ Create a virtual environment with conda or venv (ask ChatGPT if you need help)
|
|
61
61
|
|
62
62
|
In your virtual environment, install ras-commander using pip:
|
63
63
|
```
|
64
|
-
pip install h5py numpy pandas requests tqdm scipy
|
64
|
+
pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ras-commander ipython psutil shapely fiona pathlib rtree
|
65
65
|
pip install --upgrade ras-commander
|
66
66
|
```
|
67
67
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
ras_commander/Decorators.py,sha256=i5AEQbe7JeI8Y3O_dQ5OO4Ab0KO5SiZTiysFBGxqTRU,4978
|
2
2
|
ras_commander/HdfBase.py,sha256=HV5ccV9QH2lz4ZRYqK2d7_S833cTSUcostzxxSPb4O4,7129
|
3
3
|
ras_commander/HdfBndry.py,sha256=29SAcn-LGf3QiNCeRmlT7JsGI94Dwl9NMm-zHNBuXlA,20752
|
4
|
-
ras_commander/HdfFluvialPluvial.py,sha256=
|
5
|
-
ras_commander/HdfMesh.py,sha256=
|
4
|
+
ras_commander/HdfFluvialPluvial.py,sha256=5OwYYEoLRJ4gfzi4kOBPO9_LVI_OyqW-Z8Jr7POOr34,13965
|
5
|
+
ras_commander/HdfMesh.py,sha256=lNzEN7npA4KXUB9ZLyCMRk-EuL0oPD6J5MPZYamV7xU,14657
|
6
6
|
ras_commander/HdfPipe.py,sha256=StL7D5hgdknzwS8VRSd9Rg_U9VOstepDvYvquLYCLOs,34348
|
7
7
|
ras_commander/HdfPlan.py,sha256=DDnkMZ4Px4_4Netb7rLyxpDG1N-C742Yce4fDmNZAVo,6977
|
8
8
|
ras_commander/HdfPump.py,sha256=LPQPjOL6dWpJBW2F9pQVzNyqQL1XvNvUmjtf_hDygV4,10486
|
@@ -23,8 +23,8 @@ ras_commander/RasToGo.py,sha256=UiUbvpjcAxAkWdSc-9Yywy7eOkGJaTHs24p4cjiL7co,588
|
|
23
23
|
ras_commander/RasUnsteady.py,sha256=4j5Ga5hP8LepgR93uywjUjOEDhznLF7UnNtRmBS5d48,30779
|
24
24
|
ras_commander/RasUtils.py,sha256=NBMxTHWHoTH2MJzqJ0y1_00fgKSS1GnNuEikwZ3Pqzs,34153
|
25
25
|
ras_commander/__init__.py,sha256=-8mrN9qNbKiK0RfgCJasORkzuIKPHmY6RfYLzZqm2ok,1804
|
26
|
-
ras_commander-0.
|
27
|
-
ras_commander-0.
|
28
|
-
ras_commander-0.
|
29
|
-
ras_commander-0.
|
30
|
-
ras_commander-0.
|
26
|
+
ras_commander-0.48.0.dist-info/LICENSE,sha256=_pbd6qHnlsz1iQ-ozDW_49r86BZT6CRwO2iBtw0iN6M,457
|
27
|
+
ras_commander-0.48.0.dist-info/METADATA,sha256=sEeBUJL0yGQez4hOPSqMr39IWLOzqMK90hLiaVFT45k,16020
|
28
|
+
ras_commander-0.48.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
29
|
+
ras_commander-0.48.0.dist-info/top_level.txt,sha256=i76S7eKLFC8doKcXDl3aiOr9RwT06G8adI6YuKbQDaA,14
|
30
|
+
ras_commander-0.48.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|