@@ -0,0 +1,1910 @@
+import logging%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0Afrom fire_rs.geodata import environment%0Aimport fire_rs.firemodel.propagation as propagation%0Aimport fire_rs.display%0Aimport fire_rs.planning.observation_path_search%0A%0A%0Adef burn(area_bounds, ignition_point, wind):%0A    %22%22%22Burn some area from an ignition point with given wind conditions%22%22%22%0A    env = propagation.Environment(area_bounds, wind_speed=wind%5B0%5D, wind_dir=wind%5B1%5D)%0A    ignition_map = propagation.propagate(env, *ignition_point)%0A    return ignition_map%0A%0A%0Adef main():%0A    area = %5B%5B530000.0, 535000.0%5D, %5B6230000.0, 6235000.0%5D%5D%0A    ignition_point = (100, 100)%0A    area_wind = (10, np.pi)%0A    ignition_times = burn(area, ignition_point, area_wind)%0A%0A    world = environment.World()%0A    some_area = world.get_elevation(area)%0A%0A    x = np.arange(some_area.data.shape%5B0%5D)%0A    x = (x * some_area.cell_width) + some_area.x_offset%0A%0A    y = np.arange(some_area.data.shape%5B1%5D)%0A    y = (y * some_area.cell_height) + some_area.y_offset%0A%0A    X, Y = np.meshgrid(x, y)%0A%0A    figure, axis = fire_rs.display.get_default_figure_and_axis()%0A    fire_rs.display.plot_firefront_contour(axis, X, Y, ignition_times.data%5B'ignition'%5D/60, nfronts=50)%0A    print(%22%22)%0A%0A    for low, high in %5B%5B60, 61%5D, %5B70, 71%5D, %5B100, 101%5D%5D:%0A        ignition_array = ignition_times.data%5B'ignition'%5D/60%0A        low_bound = ignition_array%3Elow%0A        up_bound = ignition_array%3Chigh%0A        valid_points = low_bound & up_bound%0A        selected_points = %5B%5D%0A        for hor in range(len(x)):%0A            for ver in range(len(y)):%0A                if valid_points%5Bhor, ver%5D:%0A                    selected_points.append(%5Bhor, ver%5D)%0A        selected_points = np.array(selected_points)%0A        try:%0A            fire_rs.planning.observation_path_search.process_points(selected_points, (10,10), eps=5)%0A        except ValueError:%0A            logging.exception(%22%22)%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A%0A%0A%0A

Test the regression path planning on simulated fire fronts