Skip to content

Commit

Permalink
rcat attributes and geographic raster
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgilbert authored and MattReimer committed Jun 19, 2023
1 parent 47f76b5 commit d2c82d1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/commons/rscommons/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.4"
__version__ = "1.4.5"
2 changes: 1 addition & 1 deletion lib/commons/rscommons/geographic_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __get_zfactor(dem: str):
lry = uly + (src.RasterYSize * yres)
src = None

length_km = haversine(uly, ulx, lry, ulx)
length_km = haversine(uly, ulx, lry, lrx)
length_deg = uly - lry
zfactor = (length_km * 1000) / length_deg
src = None
Expand Down
2 changes: 1 addition & 1 deletion packages/rcat/rcat/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.3"
__version__ = "3.0.4"
8 changes: 2 additions & 6 deletions packages/rcat/rcat/lib/rcat_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ def igo_attributes(database: str):
if val[1] == 0:
curs.execute(f'UPDATE IGOAttributes SET RiparianDeparture = 1, RiparianDepartureID = 0 WHERE IGOID = {igoid}')
else:
if val[0] / val[1] >= 1:
depid = 0
elif 1 > val[0] / val[1] > 0.9:
if 1 > val[0] / val[1] >= 0.9:
depid = 1
elif 0.9 >= val[0] / val[1] > 0.66:
depid = 2
Expand Down Expand Up @@ -444,9 +442,7 @@ def reach_attributes(database: str):
if val[1] == 0:
curs.execute(f'UPDATE ReachAttributes SET RiparianDeparture = 1, RiparianDepartureID = 0 WHERE ReachID = {rid}')
else:
if val[0] / val[1] >= 1:
depid = 0
elif 1 > val[0] / val[1] > 0.9:
if 1 > val[0] / val[1] >= 0.9:
depid = 1
elif 0.9 >= val[0] / val[1] > 0.66:
depid = 2
Expand Down

0 comments on commit d2c82d1

Please sign in to comment.