39 PNGIO(
const std::string& configfile);
51 static
void parse_size(const std::
string& size_spec,
size_t& width,
size_t& height);
52 double getScaleFactor(const
size_t& grid_w, const
size_t& grid_h) const;
54 size_t setLegend(const
size_t &ncols, const
size_t &nrows, const
double &min, const
double &max,
Array2D<
double> &legend_array) const;
55 static png_color* setPalette(const
Gradient &gradient, png_structp& png_ptr, png_infop& info_ptr);
57 void writeMetadata(png_structp &png_ptr, png_infop &info_ptr);
58 void setFile(const std::
string& filename, png_structp& png_ptr, png_infop& info_ptr, const
size_t &width, const
size_t &height);
59 void writeWorldFile(const
Grid2DObject& grid_in, const std::
string& filename) const;
60 void writeDataSection(const
Grid2DObject &grid, const
Array2D<
double> &legend_array, const
Gradient &gradient, const
size_t &full_width, const png_structp &png_ptr, png_infop& info_ptr);
61 void closePNG(png_structp& png_ptr, png_infop& info_ptr, png_color *palette);
62 static std::
string decimal_to_dms(const
double& decimal);
69 bool optimize_for_speed;
71 unsigned char nr_levels;
72 std::
string coordout, coordoutparam;
73 std::
string grid2dpath;
76 size_t min_w, min_h, max_w, max_h;
78 std::vector<std::
string> metadata_key, metadata_text;
80 static const
double plugin_nodata;
81 static const
unsigned char channel_depth;
82 static const
unsigned char channel_max_color;
83 static const
unsigned char transparent_grey;
The template class Array2D is a 2D Array (Matrix) able to hold any type of object as datatype....
Definition: Array2D.h:65
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
This converts numeric values into rgb values. The object is initialized with the range that the gradi...
Definition: Graphics.h:181
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:42
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
A class to represent the meteorological parameters that could be contained in a grid....
Definition: MeteoData.h:43
This plugin write 2D grids as PNG images.
Definition: PNGIO.h:37
~PNGIO() noexcept
Definition: PNGIO.cc:162
virtual void write2DGrid(const Grid2DObject &grid_in, const std::string &filename)
Write a Grid2DObject The filename is specified relative to GRID2DPATH for most plugins.
Definition: PNGIO.cc:439
PNGIO(const std::string &configfile)
Definition: PNGIO.cc:117