38 PNGIO(
const std::string& configfile);
50 static void parse_size(
const std::string& size_spec,
size_t& width,
size_t& height);
51 double getScaleFactor(
const size_t& grid_w,
const size_t& grid_h)
const;
53 size_t setLegend(
const size_t &ncols,
const size_t &nrows,
const double &min,
const double &max,
Array2D<double> &legend_array)
const;
54 static void setPalette(
const Gradient &gradient, png_structp& png_ptr, png_infop& info_ptr, png_color *palette);
56 void writeMetadata(png_structp &png_ptr, png_infop &info_ptr);
57 void setFile(
const std::string& filename, png_structp& png_ptr, png_infop& info_ptr,
const size_t &width,
const size_t &height);
58 void writeWorldFile(
const Grid2DObject& grid_in,
const std::string& filename)
const;
59 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);
60 void closePNG(png_structp& png_ptr, png_infop& info_ptr, png_color *palette);
61 static std::string decimal_to_dms(
const double& decimal);
68 bool optimize_for_speed;
70 unsigned char nr_levels;
71 std::string coordout, coordoutparam;
72 std::string grid2dpath;
75 size_t min_w, min_h, max_w, max_h;
77 std::vector<std::string> metadata_key, metadata_text;
79 static const double plugin_nodata;
80 static const unsigned char channel_depth;
81 static const unsigned char channel_max_color;
82 static const unsigned char transparent_grey;
A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class.
Definition: IOInterface.h:43
PNGIO & operator=(const PNGIO &)
Assignement operator, required because of pointer member.
Definition: PNGIO.cc:131
This plugin write 2D grids as PNG images.
Definition: PNGIO.h:36
~PNGIO()
Definition: PNGIO.cc:154
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:58
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:37
This converts numeric values into rgb values. The object is initialized with the range that the gradi...
Definition: Graphics.h:180
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
PNGIO(const std::string &configfile)
Definition: PNGIO.cc:109
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:430
Parameters
Definition: MeteoData.h:44