FireSTARR
Loading...
Searching...
No Matches
fs::topo::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::topo::Environment:
Collaboration diagram for fs::topo::Environment:

Public Member Functions

unique_ptr< Coordinates > findCoordinates (const Point &point, bool flipped) const
 Determine Coordinates in the grid for the Point.
 
 Environment (Environment &&rhs) noexcept=default
 Move constructor.
 
 Environment (const Environment &rhs) noexcept=default
 Copy constructor.
 
Environmentoperator= (Environment &&rhs) noexcept=default
 Move assignment.
 
Environmentoperator= (const Environment &rhs) noexcept=default
 Copy assignment.
 
constexpr const string & proj4 () const
 UTM projection that this uses.
 
constexpr Idx rows () const
 Number of rows in grid.
 
constexpr Idx columns () const
 Number of columns in grid.
 
constexpr MathSize cellSize () const
 Cell width and height (m)
 
constexpr ElevationSize elevation () const
 Elevation of the origin Point.
 
Cell cell (const Idx row, const Idx column) const
 Cell at given row and column.
 
template<class P >
constexpr Cell cell (const Position< P > &position) const
 Cell at given Location.
 
Cell offset (const sim::Event &event, const Idx row, const Idx column) const
 Cell at Location with given hash.
 
sim::ProbabilityMapmakeProbabilityMap (DurationSize time, DurationSize start_time) const
 Make a ProbabilityMap that covers this Environment.
 
template<class Other >
unique_ptr< data::GridMap< Other > > makeMap (const Other nodata) const
 Create a GridMap<Other> covering this Environment.
 
unique_ptr< sim::BurnedData > makeBurnedData () const
 Create BurnedData and set burned bits based on Perimeter.
 
void resetBurnedData (sim::BurnedData *data) const noexcept
 Reset with known non-fuel cells.
 

Static Public Member Functions

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

Protected Member Functions

shared_ptr< sim::BurnedData > initializeNotBurnable (const CellGrid &cells) const
 Creates a map of areas that are not burnable either because of fuel or the initial perimeter.
 
 Environment (const string dir_out, CellGrid *cells, const ElevationSize elevation) noexcept
 Construct from cells and elevation.
 
 Environment (const string dir_out, const FuelGrid &fuel, const ElevationGrid &elevation, const Point &point)
 Load from rasters.
 

Static Protected Member Functions

static CellGridmakeCells (const FuelGrid &fuel, const ElevationGrid &elevation)
 Combine rasters into ConstantGrid<Cell, Topo>
 

Private Attributes

string dir_out_
 
CellGridcells_
 Cells representing Environment.
 
shared_ptr< const sim::BurnedData > not_burnable_
 BurnedData of cells that are not burnable.
 
ElevationSize 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/4]

fs::topo::Environment::Environment ( Environment && rhs)
defaultnoexcept

Move constructor.

Parameters
rhsEnvironment to move from
Here is the caller graph for this function:

◆ Environment() [2/4]

fs::topo::Environment::Environment ( const Environment & rhs)
defaultnoexcept

Copy constructor.

Parameters
rhsEnvironment to copy from

◆ Environment() [3/4]

fs::topo::Environment::Environment ( const string dir_out,
CellGrid * cells,
const ElevationSize elevation )
inlineprotectednoexcept

Construct from cells and elevation.

Parameters
cellsCells representing Environment
elevationElevation at origin Point

◆ Environment() [4/4]

fs::topo::Environment::Environment ( const string dir_out,
const FuelGrid & fuel,
const ElevationGrid & elevation,
const Point & point )
inlineprotected

Load from rasters.

Parameters
fuelFuel raster
elevationElevation raster

Member Function Documentation

◆ cell() [1/2]

Cell fs::topo::Environment::cell ( const Idx row,
const Idx column ) const
inlinenodiscard

Cell at given row and column.

Parameters
rowRow
columnColumn
Returns
Cell at given row and column
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cell() [2/2]

template<class P >
Cell fs::topo::Environment::cell ( const Position< P > & position) const
inlinenodiscardconstexpr

Cell at given Location.

Parameters
locationLocation
Returns
Cell at given Location
Here is the call graph for this function:

◆ cellSize()

MathSize fs::topo::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:

◆ columns()

Idx fs::topo::Environment::columns ( ) const
inlinenodiscardconstexpr

Number of columns in grid.

Returns
Number of columns in grid
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elevation()

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

Elevation of the origin Point.

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

◆ findCoordinates()

unique_ptr< Coordinates > fs::topo::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:

◆ load()

Environment fs::topo::Environment::load ( const string dir_out,
const Point & point,
const string & in_fuel,
const string & 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::topo::Environment::loadEnvironment ( const string dir_out,
const string & path,
const Point & point,
const string & perimeter,
int year )
staticnodiscard

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

Parameters
dir_outFolder to save outputs to
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:

◆ makeBurnedData()

unique_ptr< sim::BurnedData > fs::topo::Environment::makeBurnedData ( ) const
inlinenodiscard

Create BurnedData and set burned bits based on Perimeter.

Returns
BurnedData with all initially burned locations set
Here is the caller graph for this function:

◆ makeCells()

static CellGrid * fs::topo::Environment::makeCells ( const FuelGrid & fuel,
const ElevationGrid & elevation )
inlinestaticnodiscardprotected

Combine rasters into ConstantGrid<Cell, Topo>

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

◆ makeMap()

template<class Other >
unique_ptr< data::GridMap< Other > > fs::topo::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
Here is the caller graph for this function:

◆ makeProbabilityMap()

sim::ProbabilityMap * fs::topo::Environment::makeProbabilityMap ( DurationSize time,
DurationSize start_time ) 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:

◆ offset()

Cell fs::topo::Environment::offset ( const sim::Event & event,
const Idx row,
const Idx column ) const
inlinenodiscard

Cell at Location with given hash.

Parameters
hash_sizeHash
Returns
Cell at Location with given hash

Cell at Location with offset of row and column from Location of Event

Parameters
eventEvent to use for base Location
row
column
Returns
Here is the call graph for this function:

◆ operator=() [1/2]

Environment & fs::topo::Environment::operator= ( const Environment & rhs)
defaultnoexcept

Copy assignment.

Parameters
rhsEnvironment to copy from
Returns
This, after assignment

◆ operator=() [2/2]

Environment & fs::topo::Environment::operator= ( Environment && rhs)
defaultnoexcept

Move assignment.

Parameters
rhsEnvironment to move from
Returns
This, after assignment

◆ proj4()

const string & fs::topo::Environment::proj4 ( ) const
inlinenodiscardconstexpr

UTM projection that this uses.

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

◆ resetBurnedData()

void fs::topo::Environment::resetBurnedData ( sim::BurnedData * data) const
inlinenoexcept

Reset with known non-fuel cells.

Parameters
dataBurnedData to reset

◆ rows()

Idx fs::topo::Environment::rows ( ) const
inlinenodiscardconstexpr

Number of rows in grid.

Returns
Number of rows in grid
Here is the call graph for this function:
Here is the caller graph for this function:

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