61 template <
typename InputIterator>
66 unsigned long const number_of_input_values =
67 static_cast<unsigned long>(std::distance(
begin,
end));
70 throw std::out_of_range(
71 "Number of raster data mismatch, need " +
72 std::to_string(_header.n_cols * _header.n_rows) +
73 " values, but got " + std::to_string(number_of_input_values));
96 std::vector<double>::const_iterator
begin()
const
106 std::vector<double>::const_iterator
end()
const
116 double const&
operator()(std::size_t
const row, std::size_t
const col)
const
121 "Raster pixel ({}, {}) doesn't exist. Raster size is {} x {}.",
126 double&
operator()(std::size_t
const row, std::size_t
const col)
128 return const_cast<double&
>(std::as_const(*
this)(row, col));
Definition of the Point3d class.
Class Raster is used for managing raster data.
Raster & operator=(Raster &&)=default
double & operator()(std::size_t const row, std::size_t const col)
Raster(Raster &&)=default
GeoLib::RasterHeader _header
std::vector< double > _raster_data
std::vector< double >::const_iterator begin() const
Raster(RasterHeader header, InputIterator begin, InputIterator end)
Constructor for an object of class Raster. The raster data have to be handed over via input iterators...
double const & operator()(std::size_t const row, std::size_t const col) const
void setNoDataVal(double no_data_val)
void refineRaster(std::size_t scaling)
bool operator==(Raster const &) const =default
double getValueAtPoint(const MathLib::Point3d &pnt) const
double const * data() const
bool isPntOnRaster(MathLib::Point3d const &pnt) const
Raster & operator=(Raster const &)=default
double interpolateValueAtPoint(const MathLib::Point3d &pnt) const
RasterHeader const & getHeader() const
Returns the complete header information.
std::vector< double >::const_iterator end() const
void setCellSize(double cell_size)
Raster(Raster const &)=default
std::unique_ptr< GeoLib::Raster > raster