erased two prints, fixed a bug in geometry helper and modified name in costs archetype
This commit is contained in:
parent
c91edc8a83
commit
8eb9bad87e
@ -38,7 +38,7 @@ class Archetype:
|
|||||||
Get name
|
Get name
|
||||||
:return: string
|
:return: string
|
||||||
"""
|
"""
|
||||||
return f'{self._country}_{self._municipality}_{self._function}_{self._lod}'
|
return f'{self._country}_{self._municipality}_{self._function}_lod{self._lod}'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def lod(self):
|
def lod(self):
|
||||||
|
@ -100,9 +100,9 @@ class GeometryHelper:
|
|||||||
j = 0
|
j = 0
|
||||||
next_coordinate = ground.perimeter_polygon.coordinates[j]
|
next_coordinate = ground.perimeter_polygon.coordinates[j]
|
||||||
distance = GeometryHelper.distance_between_points(coordinate, next_coordinate)
|
distance = GeometryHelper.distance_between_points(coordinate, next_coordinate)
|
||||||
if distance == 0:
|
|
||||||
continue
|
|
||||||
steps = int(distance * factor * 2)
|
steps = int(distance * factor * 2)
|
||||||
|
if steps == 0:
|
||||||
|
continue
|
||||||
delta_x = (next_coordinate[0] - coordinate[0]) / steps
|
delta_x = (next_coordinate[0] - coordinate[0]) / steps
|
||||||
delta_y = (next_coordinate[1] - coordinate[1]) / steps
|
delta_y = (next_coordinate[1] - coordinate[1]) / steps
|
||||||
|
|
||||||
|
@ -173,8 +173,6 @@ class Geojson:
|
|||||||
GeometryHelper.distance_between_points(neighbour_line[0], neighbour_line[1]) -
|
GeometryHelper.distance_between_points(neighbour_line[0], neighbour_line[1]) -
|
||||||
GeometryHelper.distance_between_points(line[1], neighbour_line[0]) -
|
GeometryHelper.distance_between_points(line[1], neighbour_line[0]) -
|
||||||
GeometryHelper.distance_between_points(line[0], neighbour_line[1])) / 2
|
GeometryHelper.distance_between_points(line[0], neighbour_line[1])) / 2
|
||||||
print(line_shared)
|
|
||||||
print()
|
|
||||||
percentage_ground = line_shared / GeometryHelper.distance_between_points(line[0], line[1])
|
percentage_ground = line_shared / GeometryHelper.distance_between_points(line[0], line[1])
|
||||||
percentage_height = neighbour_height / building.max_height
|
percentage_height = neighbour_height / building.max_height
|
||||||
if percentage_height > 1:
|
if percentage_height > 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user