ras-commander 0.47.0__tar.gz → 0.48.0__tar.gz

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.
Files changed (35) hide show
  1. {ras_commander-0.47.0/ras_commander.egg-info → ras_commander-0.48.0}/PKG-INFO +2 -2
  2. {ras_commander-0.47.0 → ras_commander-0.48.0}/README.md +1 -1
  3. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfFluvialPluvial.py +10 -1
  4. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfMesh.py +4 -5
  5. {ras_commander-0.47.0 → ras_commander-0.48.0/ras_commander.egg-info}/PKG-INFO +2 -2
  6. {ras_commander-0.47.0 → ras_commander-0.48.0}/setup.py +1 -1
  7. {ras_commander-0.47.0 → ras_commander-0.48.0}/LICENSE +0 -0
  8. {ras_commander-0.47.0 → ras_commander-0.48.0}/pyproject.toml +0 -0
  9. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/Decorators.py +0 -0
  10. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfBase.py +0 -0
  11. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfBndry.py +0 -0
  12. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfPipe.py +0 -0
  13. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfPlan.py +0 -0
  14. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfPump.py +0 -0
  15. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfResultsMesh.py +0 -0
  16. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfResultsPlan.py +0 -0
  17. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfResultsXsec.py +0 -0
  18. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfStruc.py +0 -0
  19. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfUtils.py +0 -0
  20. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/HdfXsec.py +0 -0
  21. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/LoggingConfig.py +0 -0
  22. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasCmdr.py +0 -0
  23. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasExamples.py +0 -0
  24. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasGeo.py +0 -0
  25. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasGpt.py +0 -0
  26. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasPlan.py +0 -0
  27. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasPrj.py +0 -0
  28. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasToGo.py +0 -0
  29. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasUnsteady.py +0 -0
  30. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/RasUtils.py +0 -0
  31. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander/__init__.py +0 -0
  32. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander.egg-info/SOURCES.txt +0 -0
  33. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander.egg-info/dependency_links.txt +0 -0
  34. {ras_commander-0.47.0 → ras_commander-0.48.0}/ras_commander.egg-info/top_level.txt +0 -0
  35. {ras_commander-0.47.0 → ras_commander-0.48.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ras-commander
3
- Version: 0.47.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 rtree pyproj shapely xarray rasterio
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
 
@@ -50,7 +50,7 @@ Create a virtual environment with conda or venv (ask ChatGPT if you need help)
50
50
 
51
51
  In your virtual environment, install ras-commander using pip:
52
52
  ```
53
- pip install h5py numpy pandas requests tqdm scipy rtree pyproj shapely xarray rasterio
53
+ pip install h5py numpy pandas requests tqdm scipy xarray geopandas matplotlib ras-commander ipython psutil shapely fiona pathlib rtree
54
54
  pip install --upgrade ras-commander
55
55
  ```
56
56
 
@@ -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
+
@@ -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.decode('utf-8'), # Decode as UTF-8
343
- 'Area': area.decode('utf-8'), # Decode as UTF-8
344
- 'Wetted Perimeter': wetted_perimeter.decode('utf-8'), # Decode as UTF-8
345
- "Manning's n": mannings_n.decode('utf-8') # Decode as UTF-8
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.47.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 rtree pyproj shapely xarray rasterio
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
 
@@ -14,7 +14,7 @@ class CustomBuildPy(build_py):
14
14
 
15
15
  setup(
16
16
  name="ras-commander",
17
- version="0.47.0",
17
+ version="0.48.0",
18
18
  packages=["ras_commander"],
19
19
  include_package_data=True,
20
20
  python_requires='>=3.10',
File without changes
File without changes