用最高边线计算树高。

This commit is contained in:
n3040 2022-11-30 21:09:12 +08:00
parent 3864d128d0
commit a7e4809463
1 changed files with 3 additions and 2 deletions

5
dem.py
View File

@ -104,7 +104,7 @@ class Dem:
if self._tree_height > 0:
dm_msp.add_polyline2d(
[
(x_axis[i] / 5, (center_elevation[i] + self._tree_height) * 2)
(x_axis[i] / 5, ( np.max( (center_elevation[i],left_elevation[i],right_elevation[i])) + self._tree_height) * 2)
for i in range(len(center_elevation))
]
)
@ -130,7 +130,7 @@ class Dem:
z_file.write("0 ")
z_file.write("0 ")
z_file.write(f"{center_elevation[0]*2-50}")
# TODO:写平面文件
# 写平面文件
plate_msp.add_polyline2d(
line_coordination[:, 0:2],
dxfattribs={"color": 1},
@ -267,6 +267,7 @@ class Dem:
# + equation_c[2] * Yline
# + equation_c[3]
# )
# 已经https://blog.csdn.net/jameschen9051/article/details/109469228中的公司
point_z = (
lu_elevation[0]
* (