Skip to content

Commit

Permalink
change calculation of tree diameter
Browse files Browse the repository at this point in the history
  • Loading branch information
juleshaas committed Oct 11, 2023
1 parent 77f95f6 commit b1934fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def crowndiameter(list_attr, treecrowns):
grass.run_command(
"v.to.db",
map=treecrowns,
option="perimeter",
option="area",
columns=col_diameter,
quiet=True,
)
Expand All @@ -224,7 +224,7 @@ def crowndiameter(list_attr, treecrowns):
"v.db.update",
map=treecrowns,
column=col_diameter,
query_column=f"{col_diameter}/{math.pi}",
query_column=f"2*(sqrt({col_diameter}/{math.pi}))",
)
grass.message(_("Crown diameter was calculated."))
return col_diameter
Expand Down

0 comments on commit b1934fc

Please sign in to comment.