forked from s_ranjbar/city_retrofit
Add redundancy to improve wall detections
This commit is contained in:
parent
a25215adb8
commit
3ccda97830
|
@ -102,9 +102,10 @@ class GeometryHelper:
|
|||
distance = GeometryHelper.distance_between_points(coordinate, next_coordinate)
|
||||
if distance == 0:
|
||||
continue
|
||||
delta_x = (next_coordinate[0] - coordinate[0]) / (distance * factor)
|
||||
delta_y = (next_coordinate[1] - coordinate[1]) / (distance * factor)
|
||||
steps = int(distance * factor)
|
||||
steps = int(distance * factor * 2)
|
||||
delta_x = (next_coordinate[0] - coordinate[0]) / steps
|
||||
delta_y = (next_coordinate[1] - coordinate[1]) / steps
|
||||
|
||||
for k in range(0, steps):
|
||||
new_coordinate = (coordinate[0] + (delta_x * k), coordinate[1] + (delta_y * k))
|
||||
point = GeometryHelper.coordinate_to_map_point(new_coordinate, city)
|
||||
|
|
|
@ -181,10 +181,10 @@ class TestGeometryFactory(TestCase):
|
|||
"""
|
||||
Test neighbours map creation
|
||||
"""
|
||||
file_path = (self._example_path / 'Citylayers_neighbours.geojson').resolve()
|
||||
file_path = (self._example_path / 'concordia_clean.geojson').resolve()
|
||||
city = GeometryFactory('geojson',
|
||||
path=file_path,
|
||||
height_field='heightmax',
|
||||
height_field='citygml_me',
|
||||
year_of_construction_field='ANNEE_CONS',
|
||||
name_field='OBJECTID_12',
|
||||
function_field='CODE_UTILI',
|
||||
|
|
Loading…
Reference in New Issue
Block a user