openModeller  Version 1.5.0
Header Class Reference

#include <Header.hh>

Collaboration diagram for Header:
Collaboration graph

Public Member Functions

 Header ()
 
 Header (const Header &h)
 
 Header (int xd, int yd, Coord xm, Coord ym, Coord xM, Coord yM, Scalar nv, int nb=1, int gd=0)
 
 ~Header ()
 
Headeroperator= (const Header &h)
 
void calculateCell ()
 
void setProj (const std::string &projection)
 
int hasProj () const
 
void printHeader (const std::string &msg="") const
 
std::pair< Coord, CoordconvertXY2LonLat (int x, int y) const
 
std::pair< int, int > convertLonLat2XY (Coord lon, Coord lat) const
 

Public Attributes

int xdim
 
int ydim
 
Coord xmin
 
Coord ymin
 
Coord xmax
 
Coord ymax
 
Coord xcel
 
Coord ycel
 
Coord gt [6]
 
Scalar noval
 
int nband
 
int grid
 
int categ
 
int minmax
 
Scalar vmin
 
Scalar vmax
 
std::string proj
 

Detailed Description

Declaration of Header class.

Author
Mauro E S Muņoz mauro.nosp@m.@cri.nosp@m.a.org.nosp@m..br
Date
2003-08-22
Id:
Header.hh 5925 2014-03-17 17:55:12Z rdg

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html Header with metadata of georeferenced raster maps.

Definition at line 45 of file Header.hh.

Constructor & Destructor Documentation

Header::Header ( )
inline

Definition at line 49 of file Header.hh.

Header::Header ( const Header h)

Definition at line 75 of file Header.cpp.

References operator=().

Here is the call graph for this function:

Header::Header ( int  xd,
int  yd,
Coord  xm,
Coord  ym,
Coord  xM,
Coord  yM,
Scalar  nv,
int  nb = 1,
int  gd = 0 
)

Definition at line 43 of file Header.cpp.

References calculateCell(), gt, xcel, xmin, ycel, and ymax.

Here is the call graph for this function:

Header::~Header ( )

Definition at line 84 of file Header.cpp.

Member Function Documentation

void Header::calculateCell ( )

Definition at line 130 of file Header.cpp.

References xcel, xdim, xmax, xmin, ycel, ydim, ymax, and ymin.

Referenced by Header(), and GdalRaster::open().

pair< int, int > Header::convertLonLat2XY ( Coord  lon,
Coord  lat 
) const

Definition at line 160 of file Header.cpp.

References gt.

Referenced by GdalRaster::get(), TerralibRaster::get(), TerralibRaster::put(), and GdalRaster::put().

pair< Coord, Coord > Header::convertXY2LonLat ( int  x,
int  y 
) const

Definition at line 149 of file Header.cpp.

References gt.

Referenced by MapIterator::operator*().

int Header::hasProj ( ) const
inline

Definition at line 65 of file Header.hh.

Referenced by Projector::createMap(), and GdalRaster::open().

Header & Header::operator= ( const Header h)

Definition at line 92 of file Header.cpp.

References categ, grid, gt, minmax, nband, noval, proj, vmax, vmin, xcel, xdim, xmax, xmin, ycel, ydim, ymax, and ymin.

Referenced by Header().

void Header::printHeader ( const std::string &  msg = "") const

Definition at line 171 of file Header.cpp.

References categ, grid, gt, Log::info(), Log::instance(), minmax, nband, noval, proj, vmax, vmin, xcel, xdim, xmax, xmin, ycel, ydim, ymax, and ymin.

Here is the call graph for this function:

void Header::setProj ( const std::string &  projection)

Definition at line 142 of file Header.cpp.

References proj.

Referenced by TerralibRaster::createRaster(), and GdalRaster::open().

Member Data Documentation

int Header::categ

If not zero the map represents a categorical variable. This way it cannot be interpolated. Obs: it is not saved in files! (there is no room :( ).

Definition at line 93 of file Header.hh.

Referenced by operator=(), and printHeader().

int Header::grid

"grid" (not zero) or "pixel" (zero) cell alignment

Definition at line 86 of file Header.hh.

Referenced by GdalRaster::open(), operator=(), and printHeader().

Coord Header::gt[6]

The actual gdal geotransform

Definition at line 80 of file Header.hh.

Referenced by convertLonLat2XY(), convertXY2LonLat(), GdalRaster::create(), Header(), GdalRaster::open(), operator=(), and printHeader().

int Header::minmax

If not zero 'min' and 'max' are valid values.

Definition at line 99 of file Header.hh.

Referenced by GdalRaster::calcMinMax(), GdalRaster::open(), operator=(), printHeader(), and Raster::setMinMax().

std::string Header::proj
Scalar Header::vmax

Maximum map value.

Definition at line 102 of file Header.hh.

Referenced by GdalRaster::calcMinMax(), GdalRaster::getMinMax(), GdalRaster::open(), operator=(), printHeader(), and Raster::setMinMax().

Scalar Header::vmin

Minimum map value.

Definition at line 101 of file Header.hh.

Referenced by GdalRaster::calcMinMax(), GdalRaster::getMinMax(), GdalRaster::open(), operator=(), printHeader(), and Raster::setMinMax().

Coord Header::xcel

Cell width

Definition at line 78 of file Header.hh.

Referenced by calculateCell(), MapFormat::copyDefaults(), Header(), MapFormat::MapFormat(), operator=(), and printHeader().

Coord Header::ycel

Cell hight

Definition at line 79 of file Header.hh.

Referenced by calculateCell(), MapFormat::copyDefaults(), Header(), MapFormat::MapFormat(), operator=(), and printHeader().


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