FireSTARR
Loading...
Searching...
No Matches
fs::Environment Class Reference

The area that a Model is run for, with Fuel, Slope, and Aspect grids. More...

#include <Environment.h>

Inheritance diagram for fs::Environment:
Collaboration diagram for fs::Environment:

Public Member Functions

std::optional< Coordinates > findCoordinates (const Point &point, bool flipped) const
 Determine Coordinates in the grid for the Point.
 
constexpr string_view proj4 () const
 UTM projection that this uses.
 
constexpr Idx height () const
 
constexpr Idx width () const
 
constexpr MathSize cellSize () const
 Cell width and height (m)
 
constexpr ElevationSize elevation () const
 Elevation of the origin Point.
 
Cell cell (const XYIdx &xy) const
 
Cell offset (const Event &event, const Idx x, const Idx y) const
 
shared_ptr< ProbabilityMap > makeProbabilityMap (DurationSize time, DurationSize start_time, int min_value, int low_max, int med_max, int max_value, const shared_ptr< Perimeter > perimeter) const
 Make a ProbabilityMap that covers this Environment.
 
template<class Other >
GridMap< Other > makeMap (const Other nodata) const
 Create a GridMap<Other> covering this Environment.
 
const BurnedData & unburnable () const
 
void saveToFile (const string_view output_directory) const
 
MathSize to_hectares (const size_t num_cells) const
 

Static Public Member Functions

static Environment loadEnvironment (const string_view path, const Point &point, const LazyPath &perimeter, YearSize year)
 Load from rasters in folder that have same projection as Perimeter.
 
static Environment load (const Point &point, const string_view in_fuel, const string_view in_elevation)
 Load from rasters.
 

Protected Member Functions

 Environment (unique_ptr< FuelGrid > fuel_grid, unique_ptr< ElevationGrid > elevation_grid, CellGrid &&cells, const ElevationSize elevation) noexcept
 Construct from cells and elevation.
 
 Environment (const FuelGrid &fuel, const ElevationGrid &elevation, const Point &point)
 Load from rasters.
 
 Environment (const FuelGrid &fuel, const ElevationGrid &elevation, const Point &point, const Settings &settings)
 

Static Protected Member Functions

static CellGrid makeCells (const FuelGrid &fuel, const ElevationGrid &elevation)
 Combine rasters into CellGrid.
 

Private Attributes

unique_ptr< FuelGrid > fuel_grid_ {}
 Fuel grid (if saving simulation area)
 
unique_ptr< ElevationGrid > elevation_grid_ {}
 Elevation grid (if saving simulation area)
 
CellGrid cells_ {}
 Cells representing Environment.
 
BurnedData not_burnable_ {}
 Cells that are not burnable.
 
ElevationSize elevation_ {INVALID_ELEVATION}
 Elevation at StartPoint.
 

Detailed Description

The area that a Model is run for, with Fuel, Slope, and Aspect grids.

Constructor & Destructor Documentation

◆ Environment() [1/2]

fs::Environment::Environment ( unique_ptr< FuelGrid > fuel_grid,
unique_ptr< ElevationGrid > elevation_grid,
CellGrid && cells,
const ElevationSize elevation )
protectednoexcept

Construct from cells and elevation.

Parameters
cellsCells representing Environment
elevationElevation at origin Point
Here is the caller graph for this function:

◆ Environment() [2/2]

fs::Environment::Environment ( const FuelGrid & fuel,
const ElevationGrid & elevation,
const Point & point )
protected

Load from rasters.

Parameters
fuelFuel raster
elevationElevation raster

Member Function Documentation

◆ cellSize()

MathSize fs::Environment::cellSize ( ) const
inlinenodiscardconstexpr

Cell width and height (m)

Returns
Cell width and height (m)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elevation()

ElevationSize fs::Environment::elevation ( ) const
inlinenodiscardconstexpr

Elevation of the origin Point.

Returns
Elevation of the origin Point
Here is the caller graph for this function:

◆ findCoordinates()

std::optional< Coordinates > fs::Environment::findCoordinates ( const Point & point,
bool flipped ) const
nodiscard

Determine Coordinates in the grid for the Point.

Parameters
pointPoint to find Coordinates for
flippedWhether the grid data is flipped across the horizontal axis
Returns
Coordinates that would be at Point within this EnvironmentInfo, or nullptr if it is not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

Environment fs::Environment::load ( const Point & point,
const string_view in_fuel,
const string_view in_elevation )
staticnodiscard

Load from rasters.

Parameters
pointOrigin point
in_fuelFuel raster
in_elevationElevation raster
Returns
Environment
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadEnvironment()

Environment fs::Environment::loadEnvironment ( const string_view path,
const Point & point,
const LazyPath & perimeter,
YearSize year )
staticnodiscard

Load from rasters in folder that have same projection as Perimeter.

Parameters
pathFolder to read rasters from
pointOrigin point
perimeterPerimeter to use projection from
yearYear to look for rasters for if available
Returns
Environment
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeCells()

CellGrid fs::Environment::makeCells ( const FuelGrid & fuel,
const ElevationGrid & elevation )
staticnodiscardprotected

Combine rasters into CellGrid.

Parameters
elevationElevation raster
Returns
Here is the call graph for this function:

◆ makeMap()

template<class Other >
GridMap< Other > fs::Environment::makeMap ( const Other nodata) const
inlinenodiscard

Create a GridMap<Other> covering this Environment.

Template Parameters
OtherType of GridMap
Parameters
nodataValue that represents no data
Returns
GridMap<Other> covering this Environment

◆ makeProbabilityMap()

shared_ptr< ProbabilityMap > fs::Environment::makeProbabilityMap ( DurationSize time,
DurationSize start_time,
int min_value,
int low_max,
int med_max,
int max_value,
const shared_ptr< Perimeter > perimeter ) const
nodiscard

Make a ProbabilityMap that covers this Environment.

Parameters
timeTime in simulation this ProbabilityMap represents
start_timeStart time of simulation
min_valueLower bound of 'low' intensity range
low_maxUpper bound of 'low' intensity range
med_maxUpper bound of 'moderate' intensity range
max_valueUpper bound of 'high' intensity range
Returns
ProbabilityMap with the same extent as this
Here is the caller graph for this function:

◆ proj4()

string_view fs::Environment::proj4 ( ) const
inlinenodiscardconstexpr

UTM projection that this uses.

Returns
UTM projection that this uses
Here is the call graph for this function:

The documentation for this class was generated from the following files: