openModeller
Version 1.5.0
Main Page
Modules
Classes
Files
File List
File Members
MapFormat.hh
Go to the documentation of this file.
1
30
#ifndef _OM_MAPFORMATHH_
31
#define _OM_MAPFORMATHH_
32
33
#include <string>
34
35
#include <
openmodeller/os_specific.hh
>
36
#include <
openmodeller/om_defs.hh
>
37
38
class
Map
;
39
40
/****************************************************************/
41
/************************* MapFormat ****************************/
42
47
class
dllexp
MapFormat
48
{
49
public
:
50
51
MapFormat
();
52
53
MapFormat
(
Coord
xcel,
Coord
ycel,
Coord
xmin,
Coord
ymin,
54
Coord
xmax,
Coord
ymax,
Scalar
noval,
char
const
* proj);
55
56
MapFormat
(
char
const
*filenameWithFormat );
57
58
// Compiler generated copy constructor and copy assignment operator are fine for
59
// this class.
60
61
~
MapFormat
();
62
63
void
copyDefaults(
const
Map
& map );
64
65
// This is the output format constants.
66
enum
{ FloatingTiff = 0,
67
GreyTiff = 1,
68
GreyTiff100 = 2,
69
GreyBMP = 3,
70
FloatingHFA = 4,
//erdas imagine floating point format
71
ByteHFA = 5,
//erdas imagine single byte format (scaled 0-100)
72
ByteASC = 6,
//Arc/Info ASCII Grid single byte format (scaled 0-100)
73
FloatingASC = 7
//Arc/Info ASCII Grid floating point format
74
};
75
76
void
unsetFormat
() { format = FloatingTiff; }
77
void
unsetXCel
() { xcelIsSet =
false
; }
78
void
unsetYCel
() { ycelIsSet =
false
; }
79
void
unsetXMin
() { xminIsSet =
false
; }
80
void
unsetYMin
() { yminIsSet =
false
; }
81
void
unsetXMax
() { xmaxIsSet =
false
; }
82
void
unsetYMax
() { ymaxIsSet =
false
; }
83
void
unsetNoDataValue
() { novalIsSet =
false
; }
84
void
unsetProjection
() { projIsSet =
false
; }
85
86
void
setFormat(
int
format );
87
void
setFormat( std::string format );
88
void
setXCel(
Coord
xcel );
89
void
setYCel(
Coord
ycel );
90
void
setXMin(
Coord
xmin );
91
void
setYMin(
Coord
ymin );
92
void
setXMax(
Coord
xmax );
93
void
setYMax(
Coord
ymax );
94
void
setNoDataValue(
Scalar
noval );
95
void
setProjection(
const
std::string& proj);
96
97
int
getFormat
()
const
{
return
format; }
98
int
getWidth()
const
;
99
int
getHeight()
const
;
100
Coord
getXCel()
const
;
101
Coord
getYCel()
const
;
102
Coord
getXMin()
const
;
103
Coord
getYMin()
const
;
104
Coord
getXMax()
const
;
105
Coord
getYMax()
const
;
106
Scalar
getNoDataValue()
const
;
107
std::string getProjection()
const
;
108
109
private
:
110
int
format
;
111
112
Coord
xcel
;
113
bool
xcelIsSet
;
114
115
Coord
ycel
;
116
bool
ycelIsSet
;
117
118
Coord
xmin
;
119
bool
xminIsSet
;
120
121
Coord
ymin
;
122
bool
yminIsSet
;
123
124
Coord
xmax
;
125
bool
xmaxIsSet
;
126
127
Coord
ymax
;
128
bool
ymaxIsSet
;
129
130
Scalar
noval
;
131
bool
novalIsSet
;
132
133
//TODO: Perhaps DataType is required, but need to figure out a way
134
// for the user to represent it.
135
//DataType dtype; /**< File data type. */
136
137
std::string
proj
;
138
bool
projIsSet
;
139
140
};
141
142
143
#endif
MapFormat::ycel
Coord ycel
Definition:
MapFormat.hh:115
MapFormat::novalIsSet
bool novalIsSet
Definition:
MapFormat.hh:131
om_defs.hh
MapFormat::ymaxIsSet
bool ymaxIsSet
Definition:
MapFormat.hh:128
Scalar
double Scalar
Type of map values.
Definition:
om_defs.hh:39
MapFormat::xcelIsSet
bool xcelIsSet
Definition:
MapFormat.hh:113
MapFormat::xcel
Coord xcel
Definition:
MapFormat.hh:112
MapFormat::ymax
Coord ymax
Definition:
MapFormat.hh:127
MapFormat::ycelIsSet
bool ycelIsSet
Definition:
MapFormat.hh:116
MapFormat::unsetYMax
void unsetYMax()
Definition:
MapFormat.hh:82
MapFormat::unsetYCel
void unsetYCel()
Definition:
MapFormat.hh:78
MapFormat::unsetFormat
void unsetFormat()
Definition:
MapFormat.hh:76
MapFormat::getFormat
int getFormat() const
Definition:
MapFormat.hh:97
MapFormat::unsetXMax
void unsetXMax()
Definition:
MapFormat.hh:81
MapFormat::xmax
Coord xmax
Definition:
MapFormat.hh:124
MapFormat::xmin
Coord xmin
Definition:
MapFormat.hh:118
MapFormat::unsetXMin
void unsetXMin()
Definition:
MapFormat.hh:79
MapFormat
Definition:
MapFormat.hh:47
Map
Definition:
Map.hh:49
MapFormat::xminIsSet
bool xminIsSet
Definition:
MapFormat.hh:119
MapFormat::format
int format
Definition:
MapFormat.hh:110
MapFormat::unsetProjection
void unsetProjection()
Definition:
MapFormat.hh:84
MapFormat::yminIsSet
bool yminIsSet
Definition:
MapFormat.hh:122
os_specific.hh
MapFormat::proj
std::string proj
Definition:
MapFormat.hh:137
MapFormat::unsetXCel
void unsetXCel()
Definition:
MapFormat.hh:77
MapFormat::unsetYMin
void unsetYMin()
Definition:
MapFormat.hh:80
Coord
double Coord
Type of map coordinates.
Definition:
om_defs.hh:38
MapFormat::noval
Scalar noval
Definition:
MapFormat.hh:130
MapFormat::projIsSet
bool projIsSet
Definition:
MapFormat.hh:138
MapFormat::unsetNoDataValue
void unsetNoDataValue()
Definition:
MapFormat.hh:83
MapFormat::ymin
Coord ymin
Definition:
MapFormat.hh:121
MapFormat::xmaxIsSet
bool xmaxIsSet
Definition:
MapFormat.hh:125
src
openmodeller
MapFormat.hh
Generated on Thu Jan 8 2015 17:05:09 for openModeller by
1.8.6