openModeller
Version 1.5.0
|
#include <MapFormat.hh>
Public Types | |
enum | { FloatingTiff = 0, GreyTiff = 1, GreyTiff100 = 2, GreyBMP = 3, FloatingHFA = 4, ByteHFA = 5, ByteASC = 6, FloatingASC = 7 } |
Public Member Functions | |
MapFormat () | |
MapFormat (Coord xcel, Coord ycel, Coord xmin, Coord ymin, Coord xmax, Coord ymax, Scalar noval, char const *proj) | |
MapFormat (char const *filenameWithFormat) | |
~MapFormat () | |
void | copyDefaults (const Map &map) |
void | unsetFormat () |
void | unsetXCel () |
void | unsetYCel () |
void | unsetXMin () |
void | unsetYMin () |
void | unsetXMax () |
void | unsetYMax () |
void | unsetNoDataValue () |
void | unsetProjection () |
void | setFormat (int format) |
void | setFormat (std::string format) |
void | setXCel (Coord xcel) |
void | setYCel (Coord ycel) |
void | setXMin (Coord xmin) |
void | setYMin (Coord ymin) |
void | setXMax (Coord xmax) |
void | setYMax (Coord ymax) |
void | setNoDataValue (Scalar noval) |
void | setProjection (const std::string &proj) |
int | getFormat () const |
int | getWidth () const |
int | getHeight () const |
Coord | getXCel () const |
Coord | getYCel () const |
Coord | getXMin () const |
Coord | getYMin () const |
Coord | getXMax () const |
Coord | getYMax () const |
Scalar | getNoDataValue () const |
std::string | getProjection () const |
Private Attributes | |
int | format |
Coord | xcel |
bool | xcelIsSet |
Coord | ycel |
bool | ycelIsSet |
Coord | xmin |
bool | xminIsSet |
Coord | ymin |
bool | yminIsSet |
Coord | xmax |
bool | xmaxIsSet |
Coord | ymax |
bool | ymaxIsSet |
Scalar | noval |
bool | novalIsSet |
std::string | proj |
bool | projIsSet |
Defines the format of the output projection map, i.e., its extent (coordinates), width, height, novalue data and projection
Definition at line 47 of file MapFormat.hh.
anonymous enum |
Enumerator | |
---|---|
FloatingTiff | |
GreyTiff | |
GreyTiff100 | |
GreyBMP | |
FloatingHFA | |
ByteHFA | |
ByteASC | |
FloatingASC |
Definition at line 66 of file MapFormat.hh.
MapFormat::MapFormat | ( | ) |
Definition at line 40 of file MapFormat.cpp.
MapFormat::MapFormat | ( | Coord | xcel, |
Coord | ycel, | ||
Coord | xmin, | ||
Coord | ymin, | ||
Coord | xmax, | ||
Coord | ymax, | ||
Scalar | noval, | ||
char const * | proj | ||
) |
Definition at line 60 of file MapFormat.cpp.
MapFormat::MapFormat | ( | char const * | filenameWithFormat | ) |
Definition at line 81 of file MapFormat.cpp.
References RasterFactory::create(), Raster::header(), RasterFactory::instance(), Header::noval, Header::proj, setNoDataValue(), setProjection(), setXCel(), setXMax(), setXMin(), setYCel(), setYMax(), setYMin(), Header::xcel, Header::xmax, Header::xmin, Header::ycel, Header::ymax, and Header::ymin.
MapFormat::~MapFormat | ( | ) |
Definition at line 148 of file MapFormat.cpp.
void MapFormat::copyDefaults | ( | const Map & | map | ) |
Definition at line 101 of file MapFormat.cpp.
References Log::debug(), Map::getHeader(), Log::instance(), Header::proj, projIsSet, setProjection(), setXCel(), setXMax(), setXMin(), setYCel(), setYMax(), setYMin(), Header::xcel, xcelIsSet, Header::xmax, xmaxIsSet, Header::xmin, xminIsSet, Header::ycel, ycelIsSet, Header::ymax, ymaxIsSet, Header::ymin, and yminIsSet.
Referenced by OpenModeller::createMap().
|
inline |
Definition at line 97 of file MapFormat.hh.
Referenced by TerralibRaster::createRaster().
int MapFormat::getHeight | ( | ) | const |
Computed height in pixels
Definition at line 256 of file MapFormat.cpp.
References ycel, ymax, and ymin.
Referenced by TerralibRaster::createRaster().
Scalar MapFormat::getNoDataValue | ( | ) | const |
Definition at line 347 of file MapFormat.cpp.
References Log::error(), Log::instance(), noval, and novalIsSet.
string MapFormat::getProjection | ( | ) | const |
Definition at line 361 of file MapFormat.cpp.
References Log::error(), Log::instance(), proj, and projIsSet.
Referenced by TerralibRaster::createRaster().
int MapFormat::getWidth | ( | ) | const |
Computed width in pixels
Definition at line 245 of file MapFormat.cpp.
References getXCel(), getXMax(), getXMin(), xcel, xmax, and xmin.
Referenced by TerralibRaster::createRaster().
Coord MapFormat::getXCel | ( | ) | const |
Definition at line 263 of file MapFormat.cpp.
References Log::error(), Log::instance(), xcel, and xcelIsSet.
Referenced by getWidth().
Coord MapFormat::getXMax | ( | ) | const |
Definition at line 319 of file MapFormat.cpp.
References Log::error(), Log::instance(), xmax, and xmaxIsSet.
Referenced by TerralibRaster::createRaster(), and getWidth().
Coord MapFormat::getXMin | ( | ) | const |
Definition at line 291 of file MapFormat.cpp.
References Log::error(), Log::instance(), xmin, and xminIsSet.
Referenced by TerralibRaster::createRaster(), and getWidth().
Coord MapFormat::getYCel | ( | ) | const |
Definition at line 277 of file MapFormat.cpp.
References Log::error(), Log::instance(), ycel, and ycelIsSet.
Coord MapFormat::getYMax | ( | ) | const |
Definition at line 333 of file MapFormat.cpp.
References Log::error(), Log::instance(), ymax, and ymaxIsSet.
Referenced by TerralibRaster::createRaster().
Coord MapFormat::getYMin | ( | ) | const |
Definition at line 305 of file MapFormat.cpp.
References Log::error(), Log::instance(), ymin, and yminIsSet.
Referenced by TerralibRaster::createRaster().
void MapFormat::setFormat | ( | int | format | ) |
Definition at line 151 of file MapFormat.cpp.
References DEFAULT_FORMAT, FloatingASC, and format.
Referenced by RequestFile::_setProjection(), OpenModeller::createMap(), main(), setFormat(), and OpenModeller::setProjectionConfiguration().
void MapFormat::setFormat | ( | std::string | format | ) |
Definition at line 161 of file MapFormat.cpp.
References ByteASC, ByteHFA, FloatingASC, FloatingHFA, FloatingTiff, GreyBMP, GreyTiff, GreyTiff100, Log::instance(), setFormat(), and Log::warn().
void MapFormat::setNoDataValue | ( | Scalar | noval | ) |
Definition at line 235 of file MapFormat.cpp.
References noval, and novalIsSet.
Referenced by MapFormat().
void MapFormat::setProjection | ( | const std::string & | proj | ) |
Definition at line 240 of file MapFormat.cpp.
References proj, and projIsSet.
Referenced by copyDefaults(), and MapFormat().
void MapFormat::setXCel | ( | Coord | xcel | ) |
Definition at line 205 of file MapFormat.cpp.
References xcel, and xcelIsSet.
Referenced by copyDefaults(), and MapFormat().
void MapFormat::setXMax | ( | Coord | xmax | ) |
Definition at line 225 of file MapFormat.cpp.
References xmax, and xmaxIsSet.
Referenced by RequestFile::_setProjection(), copyDefaults(), and MapFormat().
void MapFormat::setXMin | ( | Coord | xmin | ) |
Definition at line 215 of file MapFormat.cpp.
References xmin, and xminIsSet.
Referenced by RequestFile::_setProjection(), copyDefaults(), and MapFormat().
void MapFormat::setYCel | ( | Coord | ycel | ) |
Definition at line 210 of file MapFormat.cpp.
References ycel, and ycelIsSet.
Referenced by copyDefaults(), and MapFormat().
void MapFormat::setYMax | ( | Coord | ymax | ) |
Definition at line 230 of file MapFormat.cpp.
References ymax, and ymaxIsSet.
Referenced by RequestFile::_setProjection(), copyDefaults(), and MapFormat().
void MapFormat::setYMin | ( | Coord | ymin | ) |
Definition at line 220 of file MapFormat.cpp.
References ymin, and yminIsSet.
Referenced by RequestFile::_setProjection(), copyDefaults(), and MapFormat().
|
inline |
Definition at line 76 of file MapFormat.hh.
|
inline |
Definition at line 83 of file MapFormat.hh.
|
inline |
Definition at line 84 of file MapFormat.hh.
|
inline |
Definition at line 77 of file MapFormat.hh.
|
inline |
Definition at line 81 of file MapFormat.hh.
|
inline |
Definition at line 79 of file MapFormat.hh.
|
inline |
Definition at line 78 of file MapFormat.hh.
|
inline |
Definition at line 82 of file MapFormat.hh.
|
inline |
Definition at line 80 of file MapFormat.hh.
|
private |
Definition at line 110 of file MapFormat.hh.
Referenced by setFormat().
|
private |
Value indicating absence of information.
Definition at line 130 of file MapFormat.hh.
Referenced by getNoDataValue(), and setNoDataValue().
|
private |
Definition at line 131 of file MapFormat.hh.
Referenced by getNoDataValue(), and setNoDataValue().
|
private |
Projection specification (in WKT).
Definition at line 137 of file MapFormat.hh.
Referenced by getProjection(), and setProjection().
|
private |
Definition at line 138 of file MapFormat.hh.
Referenced by copyDefaults(), getProjection(), and setProjection().
|
private |
Map cell width
Definition at line 112 of file MapFormat.hh.
Referenced by getWidth(), getXCel(), and setXCel().
|
private |
Definition at line 113 of file MapFormat.hh.
Referenced by copyDefaults(), getXCel(), and setXCel().
|
private |
Highest longitude
Definition at line 124 of file MapFormat.hh.
Referenced by getWidth(), getXMax(), and setXMax().
|
private |
Definition at line 125 of file MapFormat.hh.
Referenced by copyDefaults(), getXMax(), and setXMax().
|
private |
Lowest longitude
Definition at line 118 of file MapFormat.hh.
Referenced by getWidth(), getXMin(), and setXMin().
|
private |
Definition at line 119 of file MapFormat.hh.
Referenced by copyDefaults(), getXMin(), and setXMin().
|
private |
Map cell height
Definition at line 115 of file MapFormat.hh.
Referenced by getHeight(), getYCel(), and setYCel().
|
private |
Definition at line 116 of file MapFormat.hh.
Referenced by copyDefaults(), getYCel(), and setYCel().
|
private |
Highest latitude
Definition at line 127 of file MapFormat.hh.
Referenced by getHeight(), getYMax(), and setYMax().
|
private |
Definition at line 128 of file MapFormat.hh.
Referenced by copyDefaults(), getYMax(), and setYMax().
|
private |
Lowest latitude
Definition at line 121 of file MapFormat.hh.
Referenced by getHeight(), getYMin(), and setYMin().
|
private |
Definition at line 122 of file MapFormat.hh.
Referenced by copyDefaults(), getYMin(), and setYMin().