2023-12-18 19:09:41 -05:00
|
|
|
from building_selection_tool import BuildingSelectionTool
|
2023-12-15 13:50:41 -05:00
|
|
|
|
2023-12-18 19:09:41 -05:00
|
|
|
selection_tool = BuildingSelectionTool('./data/collinear_clean.geojson')
|
|
|
|
|
|
|
|
sample_polygon_coordinates = [[-73.543833, 45.575932],
|
2023-12-15 13:50:41 -05:00
|
|
|
[-73.541834, 45.575245],
|
|
|
|
[-73.542275, 45.574652],
|
|
|
|
[-73.544235, 45.575329],
|
2023-12-18 19:09:41 -05:00
|
|
|
[-73.543833, 45.575932]]
|
2023-12-15 13:50:41 -05:00
|
|
|
|
2023-12-18 19:09:41 -05:00
|
|
|
selection_tool.select_by_polygon(sample_polygon_coordinates)
|
2023-12-15 13:50:41 -05:00
|
|
|
|
2023-12-18 19:09:41 -05:00
|
|
|
sample_address = "2155 Rue Guy, Montreal, Quebec"
|
|
|
|
selection_tool.select_by_address(sample_address)
|
2023-12-15 13:50:41 -05:00
|
|
|
|
2023-12-18 19:09:41 -05:00
|
|
|
output_file_path = "./output_files/sample_output.geojson"
|
|
|
|
selection_tool.save_selected_buildings(output_file_path)
|