Closed camiloramirezgo closed 2 years ago
This could be done potentially by adding a condition to the travel_time function the Layer class in layer.py: https://github.com/Open-Source-Spatial-Clean-Cooking-Tool/OnSSTOVE/blob/bb0eed312eb6fee5064e9fd81a1d9db5a7209d77/onsstove/layer.py#L66-L89
travel_time
Layer
layer.py
We could check if the self.start_points(condition=condition) do not return any points (when there are no forest) and make the distance raster values all np.nan and avoid calling the mcp.find_costs(starts=pointlist).
self.start_points(condition=condition)
np.nan
mcp.find_costs(starts=pointlist)
This could be done potentially by adding a condition to the
travel_time
function theLayer
class inlayer.py
: https://github.com/Open-Source-Spatial-Clean-Cooking-Tool/OnSSTOVE/blob/bb0eed312eb6fee5064e9fd81a1d9db5a7209d77/onsstove/layer.py#L66-L89We could check if the
self.start_points(condition=condition)
do not return any points (when there are no forest) and make the distance raster values allnp.nan
and avoid calling themcp.find_costs(starts=pointlist)
.