FireSTARR
Loading...
Searching...
No Matches
fs::data::GridBase Class Reference

The base class with information for a grid of data with geographic coordinates. More...

#include <Grid.h>

Inheritance diagram for fs::data::GridBase:
Collaboration diagram for fs::data::GridBase:

Public Member Functions

 GridBase (GridBase &&rhs) noexcept=default
 Move constructor.
 
 GridBase (const GridBase &rhs)=default
 Copy constructor.
 
GridBaseoperator= (const GridBase &rhs)=default
 Copy assignment.
 
GridBaseoperator= (GridBase &&rhs) noexcept=default
 Move assignment.
 
constexpr MathSize cellSize () const noexcept
 Cell size used for GridBase.
 
constexpr FullIdx calculateRows () const noexcept
 Number of rows in the GridBase.
 
constexpr FullIdx calculateColumns () const noexcept
 Number of columns in the GridBase.
 
constexpr MathSize xllcorner () const noexcept
 Lower left corner X coordinate in meters.
 
constexpr MathSize yllcorner () const noexcept
 Lower left corner Y coordinate in meters.
 
constexpr MathSize xurcorner () const noexcept
 Upper right corner X coordinate in meters.
 
constexpr MathSize yurcorner () const noexcept
 Upper right corner Y coordinate in meters.
 
constexpr const string & proj4 () const noexcept
 Proj4 string defining coordinate system for this grid. Must be a UTM projection.
 
 GridBase (MathSize cell_size, MathSize xllcorner, MathSize yllcorner, MathSize xurcorner, MathSize yurcorner, string &&proj4) noexcept
 Constructor.
 
 GridBase () noexcept
 Default constructor.
 
void createPrj (const string &dir, const string &base_name) const
 Create .prj file in directory with base name for file.
 
unique_ptr< Coordinates > findCoordinates (const topo::Point &point, bool flipped) const
 Find Coordinates for Point.
 
unique_ptr< FullCoordinates > findFullCoordinates (const topo::Point &point, bool flipped) const
 Find FullCoordinates for Point.
 

Private Attributes

string proj4_
 Proj4 string defining projection.
 
MathSize cell_size_
 Cell height and width in meters.
 
MathSize xllcorner_
 Lower left corner X coordinate in meters.
 
MathSize yllcorner_
 Lower left corner Y coordinate in meters.
 
MathSize xurcorner_
 Upper right corner X coordinate in meters.
 
MathSize yurcorner_
 Upper right corner Y coordinate in meters.
 

Detailed Description

The base class with information for a grid of data with geographic coordinates.

Constructor & Destructor Documentation

◆ GridBase() [1/3]

fs::data::GridBase::GridBase ( GridBase && rhs)
defaultnoexcept

Move constructor.

Parameters
rhsGridBase to move from

◆ GridBase() [2/3]

fs::data::GridBase::GridBase ( const GridBase & rhs)
default

Copy constructor.

Parameters
rhsGridBase to copy from

◆ GridBase() [3/3]

fs::data::GridBase::GridBase ( MathSize cell_size,
MathSize xllcorner,
MathSize yllcorner,
MathSize xurcorner,
MathSize yurcorner,
string && proj4 )
noexcept

Constructor.

Parameters
cell_sizeCell width and height (m)
xllcornerLower left corner X coordinate (m)
yllcornerLower left corner Y coordinate (m)
xurcornerUpper right corner X coordinate (m)
yurcornerUpper right corner Y coordinate (m)
proj4Proj4 projection definition

Member Function Documentation

◆ calculateColumns()

FullIdx fs::data::GridBase::calculateColumns ( ) const
inlinenodiscardconstexprnoexcept

Number of columns in the GridBase.

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

◆ calculateRows()

FullIdx fs::data::GridBase::calculateRows ( ) const
inlinenodiscardconstexprnoexcept

Number of rows in the GridBase.

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

◆ cellSize()

MathSize fs::data::GridBase::cellSize ( ) const
inlinenodiscardconstexprnoexcept

Cell size used for GridBase.

Returns
Cell height and width in meters.
Here is the caller graph for this function:

◆ createPrj()

void fs::data::GridBase::createPrj ( const string & dir,
const string & base_name ) const

Create .prj file in directory with base name for file.

Parameters
dirDirectory to create in
base_namebase file name for .prj file

◆ findCoordinates()

unique_ptr< Coordinates > fs::data::GridBase::findCoordinates ( const topo::Point & point,
bool flipped ) const
nodiscard

Find Coordinates for Point.

Parameters
pointPoint to translate to Grid Coordinate
flippedWhether or not Grid data is flipped along x axis
Returns
Coordinates for Point translated to Grid
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findFullCoordinates()

unique_ptr< FullCoordinates > fs::data::GridBase::findFullCoordinates ( const topo::Point & point,
bool flipped ) const
nodiscard

Find FullCoordinates for Point.

Parameters
pointPoint to translate to Grid Coordinate
flippedWhether or not Grid data is flipped along x axis
Returns
Coordinates for Point translated to Grid
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

GridBase & fs::data::GridBase::operator= ( const GridBase & rhs)
default

Copy assignment.

Parameters
rhsGridBase to copy from
Returns
This, after assignment

◆ operator=() [2/2]

GridBase & fs::data::GridBase::operator= ( GridBase && rhs)
defaultnoexcept

Move assignment.

Parameters
rhsGridBase to move from
Returns
This, after assignment

◆ proj4()

const string & fs::data::GridBase::proj4 ( ) const
inlinenodiscardconstexprnoexcept

Proj4 string defining coordinate system for this grid. Must be a UTM projection.

Returns
Proj4 string defining coordinate system for this grid.
Here is the caller graph for this function:

◆ xllcorner()

MathSize fs::data::GridBase::xllcorner ( ) const
inlinenodiscardconstexprnoexcept

Lower left corner X coordinate in meters.

Returns
Lower left corner X coordinate in meters.
Here is the caller graph for this function:

◆ xurcorner()

MathSize fs::data::GridBase::xurcorner ( ) const
inlinenodiscardconstexprnoexcept

Upper right corner X coordinate in meters.

Returns
Upper right corner X coordinate in meters.
Here is the caller graph for this function:

◆ yllcorner()

MathSize fs::data::GridBase::yllcorner ( ) const
inlinenodiscardconstexprnoexcept

Lower left corner Y coordinate in meters.

Returns
Lower left corner Y coordinate in meters.
Here is the caller graph for this function:

◆ yurcorner()

MathSize fs::data::GridBase::yurcorner ( ) const
inlinenodiscardconstexprnoexcept

Upper right corner Y coordinate in meters.

Returns
Upper right corner Y coordinate in meters.
Here is the caller graph for this function:

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