Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Enums.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file terralib/datatype/Enums.h
22
23
\brief General enumerations for the data type module.
24
*/
25
26
#ifndef __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
27
#define __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
28
29
namespace
te
30
{
31
namespace
dt
32
{
33
/*!
34
\enum DateTimeType
35
36
\brief The subtype of date and time type, based on ISO 8621.
37
38
There are specific data types in this module to represent the types:
39
DATE, DATE_PERIOD, DATE_DURATION, TIME_DURATION, TIME_INSTANT, TIME_PERIOD,
40
TIME_INSTANT_TZ, TIME_PERIOD_TZ
41
42
The type ORDINAL_TIME is represented by the te::dt::Int type.
43
The type STRING_TIME is represented by the te::dt::String type.
44
*/
45
enum
DateTimeType
46
{
47
DATE
,
/*!< A gregorian date. Example: 10/01/2013 */
48
DATE_PERIOD
,
/*!< A date period represents a range between two dates. */
49
DATE_DURATION
,
/*!< Date duration is a simple day count used for arithmetic with DATE. Example: 3 */
50
TIME_DURATION
,
/*!< A length of time with nano-second/micro-second resolution (hh:mm:ss,ss) */
51
TIME_INSTANT
,
/*!< Date and Time instant data type (both date and local time). */
52
TIME_PERIOD
,
/*!< Date and time period data type (both date and local time). */
53
TIME_INSTANT_TZ
,
/*!< Time instant with time zone data type (both date and time with time zone). */
54
TIME_PERIOD_TZ
,
/*!< Time period with time zone data type (both date and time with time zone). */
55
ORDINAL_TIME_INSTANT
,
/*!< Ordinal time instant, for example: 1 -> Monday / 2 -> Tuesday / */
56
ORDINAL_TIME_PERIOD
,
/*!< A period of ordinal time */
57
STRING_TIME
,
/*!< A String that represents an instant of time "1999", "99". */
58
UNKNOWN
59
};
60
61
/*!
62
\enum DateTimeStringFormat
63
64
\brief The format of a string that represents a date and time.
65
66
It is based on the date and time representations of ISO 8621.
67
It must be used in the DateTimeProperty when the type is STRING_TIME.
68
*/
69
enum
DateTimeStringFormat
70
{
71
YYYY
,
/*!< A year with 4 numbers. Example: 1999 */
72
YY
,
/*!< A year with 2 numbers. Example: 99 */
73
YYYYMM
,
/*!< A year with 4 numbers and the month. Example: 199903 */
74
YYYYDDD
,
/*!< A year with 4 numbers and the ordianl day of the year. Example: 1999360 */
75
UNKNOWN_STRING_FORMAT
/*!< Unknown string format. */
76
};
77
78
/*!
79
\enum DateTimeOrdinalType
80
81
\brief The meaning of the ordial time.
82
83
It must be used in the DateTimeProperty when the type is ORDINAL_TIME.
84
*/
85
enum
DateTimeOrdinalType
86
{
87
MONTH_OF_YEAR
,
/*!< from 1 (January) to 12 (December) */
88
WEEK_OF_YEAR
,
/*!< from 1 to 52 */
89
DAY_OF_WEEK
,
/*!< from 1 (Monday) to 7 (Sunday) */
90
DAY_OF_MONTH
,
/*!< from 1 to 31 */
91
DAY_OF_YEAR
,
/*!< from 001 (01/01) to 365 ou 366 (31/12) */
92
HOUR_OF_DAY
,
/*!< from 0 to 23 */
93
MINUTE_OF_HOUR
,
/*!< from 0 to 59 */
94
SECOND_OF_MINUTE
,
/*!< from 0 to 59 */
95
USER_DEFINED
/*!< A ordinal number defined by the user */
96
};
97
98
/*!
99
\enum TemporalUnit
100
101
\brief The unit of the temporal data
102
*/
103
enum
TemporalUnit
104
{
105
YEAR
,
/*!< Year. */
106
MONTH
,
/*!< Month */
107
DAY
,
/*!< Day */
108
HOUR
,
/*!< Hour */
109
MINUTE
,
/*!< Minute */
110
SECOND
,
/*!< Second */
111
WEEK
,
/*!< Week */
112
UNKNOWN_TEMPORAL_UNIT
/*!< Unknown time unit. */
113
};
114
115
/*!
116
\struct TemporalResolution
117
118
\brief A temporal resolution is composed of a unit of time and a value.
119
120
A temporal resolution is composed of a unit and a value. For example,
121
if the temporal resolution is 16 days, the unit is DAY and the value is 16.
122
*/
123
struct
TemporalResolution
124
{
125
TemporalUnit
m_unit
;
126
unsigned
int
m_value
;
127
128
TemporalResolution
()
129
: m_unit(
UNKNOWN_TEMPORAL_UNIT
), m_value(0) { }
130
131
TemporalResolution
(
TemporalUnit
unit,
unsigned
int
val)
132
: m_unit(unit), m_value(val) { }
133
};
134
135
/*!
136
\enum TemporalRelation
137
138
\brief Temporal relations between date and time (Source: Allen, 1991).
139
*/
140
enum
TemporalRelation
141
{
142
UNKNOWN_TEMPORAL_RELATION
= 0,
/*!< */
143
BEFORE
= 1,
/*!< */
144
AFTER
= 2,
/*!< */
145
DURING
= 4,
/*!< */
146
EQUALS
= 8,
/*!< */
147
MEETS
= 16,
/*!< */
148
OVERLAPS
= 32,
/*!< */
149
STARTS
= 64,
/*!< */
150
FINISHES
= 128
151
};
152
153
/*!
154
\enum BasicRelation
155
156
\brief Relations between simple attribute values.
157
*/
158
enum
BasicRelation
159
{
160
UNKNOWN_BASIC_RELATION
= 0,
/*!< */
161
LESS
= 1,
/*!< */
162
MORE
= 2,
/*!< */
163
EQUAL
= 4
/*!< */
164
};
165
166
/*!
167
\enum StringType
168
169
\brief The subtype of string property.
170
*/
171
enum
StringType
172
{
173
FIXED_STRING
,
/*!< For fixed-length strings (blank padded if needed). */
174
VAR_STRING
,
/*!< For variable length string with a limited size. */
175
STRING
/*!< For variable unlimited length string. */
176
};
177
178
/*!
179
\brief An anonymous union for all the basic data types supported by TerraLib.
180
181
\warning If you change this list, please, update all code dependencies (for example: LAST_DATATYPE_CODE).
182
*/
183
enum
184
{
185
UNKNOWN_TYPE
= 0,
/*!< Used when the data type is unknown. */
186
VOID_TYPE
= 1,
/*!< For void data types. */
187
BIT_TYPE
= 2,
/*!< Used for 1 bit data types. */
188
CHAR_TYPE
= 3,
/*!< Character data type (1 byte long). */
189
UCHAR_TYPE
= 4,
/*!< Unsigned character data type (1 byte long). */
190
INT16_TYPE
= 5,
/*!< Integer number data type (2 bytes long). */
191
UINT16_TYPE
= 6,
/*!< Unsigned Integer number data type (2 bytes long). */
192
INT32_TYPE
= 7,
/*!< Signed Integer number data type (4 bytes long). */
193
UINT32_TYPE
= 8,
/*!< Unsigned Integer number data type (4 bytes long). */
194
INT64_TYPE
= 9,
/*!< Signed Integer number data type (8 bytes long). */
195
UINT64_TYPE
= 10,
/*!< Unsigned Integer number data type (8 bytes long). */
196
BOOLEAN_TYPE
= 11,
/*!< Boolean type (true or false). */
197
FLOAT_TYPE
= 12,
/*!< Float number (32 bits) data type. */
198
DOUBLE_TYPE
= 13,
/*!< Double number (64 bits) data type. */
199
NUMERIC_TYPE
= 14,
/*!< Arbitrary precision data type: Numeric(p, q). */
200
STRING_TYPE
= 15,
/*!< String data type. */
201
BYTE_ARRAY_TYPE
= 16,
/*!< Binary data (BLOB). */
202
GEOMETRY_TYPE
= 17,
/*!< Geometry data type. */
203
DATETIME_TYPE
= 18,
/*!< Date and time data type. */
204
ARRAY_TYPE
= 19,
/*!< Array of homogeneous elements. */
205
COMPOSITE_TYPE
= 20,
/*!< Composed type. */
206
DATASET_TYPE
= 21,
/*!< When the type is a DataSet. */
207
RASTER_TYPE
= 22,
/*!< When the type is a Raster. */
208
CINT16_TYPE
= 23,
/*!< Complex signed integer number data type (2 + 2 bytes long). */
209
CINT32_TYPE
= 24,
/*!< Complex signed integer number data type (4 + 4 bytes long). */
210
CFLOAT_TYPE
= 25,
/*!< Complex float number (32 + 32 bits) data type. */
211
CDOUBLE_TYPE
= 26,
/*!< Complex double number (64 + 64 bits) data type. */
212
XML_TYPE
= 27,
/*!< XML data type. */
213
DATASETITEM_TYPE
= 28,
/*!< When the type is a DataSetItem. */
214
POLYMORPHIC_TYPE
= 29,
/*!< When the type is polymorphic. */
215
R4BITS_TYPE
= 30,
/*!< When the type is a raster with 4 bits. */
216
R2BITS_TYPE
= 31,
/*!< When the type is a raster with 2 bits. */
217
R1BIT_TYPE
= 32
/*!< When the type is a raster with 1 bit. */
218
};
219
220
/*! \brief An anonymous union that marks the last common data type supported by TerraLib. */
221
enum
222
{
223
LAST_COMMON_DATATYPE_CODE
=
POLYMORPHIC_TYPE
224
};
225
226
}
// end namespace dt
227
}
// end namespace te
228
229
#endif // __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
230
te::dt::StringType
StringType
The subtype of string property.
Definition:
Enums.h:171
te::dt::YEAR
Definition:
Enums.h:105
te::dt::TIME_DURATION
Definition:
Enums.h:50
te::dt::VOID_TYPE
Definition:
Enums.h:186
te::dt::DATETIME_TYPE
Definition:
Enums.h:203
te::dt::MONTH
Definition:
Enums.h:106
te::dt::INT64_TYPE
Definition:
Enums.h:194
te::dt::TemporalResolution::TemporalResolution
TemporalResolution()
Definition:
Enums.h:128
te::dt::BasicRelation
BasicRelation
Relations between simple attribute values.
Definition:
Enums.h:158
te::dt::DATE_DURATION
Definition:
Enums.h:49
te::dt::R1BIT_TYPE
Definition:
Enums.h:217
te::dt::HOUR
Definition:
Enums.h:108
te::dt::NUMERIC_TYPE
Definition:
Enums.h:199
te::dt::DateTimeOrdinalType
DateTimeOrdinalType
The meaning of the ordial time.
Definition:
Enums.h:85
te::dt::AFTER
Definition:
Enums.h:144
te::dt::TemporalRelation
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Definition:
Enums.h:140
te::dt::CDOUBLE_TYPE
Definition:
Enums.h:211
te::dt::DATE
Definition:
Enums.h:47
te::dt::DAY
Definition:
Enums.h:107
te::dt::TIME_PERIOD
Definition:
Enums.h:52
te::dt::XML_TYPE
Definition:
Enums.h:212
te::dt::STRING_TYPE
Definition:
Enums.h:200
te::dt::EQUAL
Definition:
Enums.h:163
te::dt::DateTimeStringFormat
DateTimeStringFormat
The format of a string that represents a date and time.
Definition:
Enums.h:69
te::dt::TIME_INSTANT
Definition:
Enums.h:51
te::dt::BYTE_ARRAY_TYPE
Definition:
Enums.h:201
te::dt::CFLOAT_TYPE
Definition:
Enums.h:210
te::dt::MINUTE
Definition:
Enums.h:109
te::dt::TIME_INSTANT_TZ
Definition:
Enums.h:53
te::dt::LESS
Definition:
Enums.h:161
te::dt::DATASETITEM_TYPE
Definition:
Enums.h:213
te::dt::MORE
Definition:
Enums.h:162
te::dt::UNKNOWN_BASIC_RELATION
Definition:
Enums.h:160
te::dt::TemporalUnit
TemporalUnit
The unit of the temporal data.
Definition:
Enums.h:103
te::dt::INT16_TYPE
Definition:
Enums.h:190
te::dt::TemporalResolution::m_unit
TemporalUnit m_unit
Definition:
Enums.h:125
te::dt::TemporalResolution
A temporal resolution is composed of a unit of time and a value.
Definition:
Enums.h:123
te::dt::UNKNOWN_TEMPORAL_RELATION
Definition:
Enums.h:142
te::dt::ORDINAL_TIME_INSTANT
Definition:
Enums.h:55
te::dt::BEFORE
Definition:
Enums.h:143
te::dt::ORDINAL_TIME_PERIOD
Definition:
Enums.h:56
te::dt::UINT64_TYPE
Definition:
Enums.h:195
te::dt::BIT_TYPE
Definition:
Enums.h:187
te::dt::VAR_STRING
Definition:
Enums.h:174
te::dt::UNKNOWN_TEMPORAL_UNIT
Definition:
Enums.h:112
te::dt::USER_DEFINED
Definition:
Enums.h:95
te::dt::CHAR_TYPE
Definition:
Enums.h:188
te::dt::R4BITS_TYPE
Definition:
Enums.h:215
te::dt::TemporalResolution::TemporalResolution
TemporalResolution(TemporalUnit unit, unsigned int val)
Definition:
Enums.h:131
te::dt::LAST_COMMON_DATATYPE_CODE
Definition:
Enums.h:223
te::dt::OVERLAPS
Definition:
Enums.h:148
te::dt::DAY_OF_WEEK
Definition:
Enums.h:89
te
URI C++ Library.
Definition:
AddressGeocodingOp.h:51
te::dt::BOOLEAN_TYPE
Definition:
Enums.h:196
te::dt::GEOMETRY_TYPE
Definition:
Enums.h:202
te::dt::FINISHES
Definition:
Enums.h:150
te::dt::DATE_PERIOD
Definition:
Enums.h:48
te::dt::DAY_OF_YEAR
Definition:
Enums.h:91
te::dt::HOUR_OF_DAY
Definition:
Enums.h:92
te::dt::STRING_TIME
Definition:
Enums.h:57
te::dt::CINT32_TYPE
Definition:
Enums.h:209
te::dt::UINT32_TYPE
Definition:
Enums.h:193
te::dt::COMPOSITE_TYPE
Definition:
Enums.h:205
te::dt::ARRAY_TYPE
Definition:
Enums.h:204
te::dt::FLOAT_TYPE
Definition:
Enums.h:197
te::dt::UNKNOWN_STRING_FORMAT
Definition:
Enums.h:75
te::dt::RASTER_TYPE
Definition:
Enums.h:207
te::dt::UCHAR_TYPE
Definition:
Enums.h:189
te::dt::DURING
Definition:
Enums.h:145
te::dt::UNKNOWN_TYPE
Definition:
Enums.h:185
te::dt::SECOND
Definition:
Enums.h:110
te::dt::YY
Definition:
Enums.h:72
te::dt::YYYYMM
Definition:
Enums.h:73
te::dt::MINUTE_OF_HOUR
Definition:
Enums.h:93
te::dt::DOUBLE_TYPE
Definition:
Enums.h:198
te::dt::POLYMORPHIC_TYPE
Definition:
Enums.h:214
te::dt::UINT16_TYPE
Definition:
Enums.h:191
te::dt::TIME_PERIOD_TZ
Definition:
Enums.h:54
te::dt::STRING
Definition:
Enums.h:175
te::dt::TemporalResolution::m_value
unsigned int m_value
Definition:
Enums.h:126
te::dt::DateTimeType
DateTimeType
The subtype of date and time type, based on ISO 8621.
Definition:
Enums.h:45
te::dt::INT32_TYPE
Definition:
Enums.h:192
te::dt::R2BITS_TYPE
Definition:
Enums.h:216
te::dt::DAY_OF_MONTH
Definition:
Enums.h:90
te::dt::DATASET_TYPE
Definition:
Enums.h:206
te::dt::WEEK
Definition:
Enums.h:111
te::dt::UNKNOWN
Definition:
Enums.h:58
te::dt::YYYYDDD
Definition:
Enums.h:74
te::dt::WEEK_OF_YEAR
Definition:
Enums.h:88
te::dt::FIXED_STRING
Definition:
Enums.h:173
te::dt::MONTH_OF_YEAR
Definition:
Enums.h:87
te::dt::CINT16_TYPE
Definition:
Enums.h:208
te::dt::YYYY
Definition:
Enums.h:71
te::dt::MEETS
Definition:
Enums.h:147
te::dt::STARTS
Definition:
Enums.h:149
te::dt::EQUALS
Definition:
Enums.h:146
te::dt::SECOND_OF_MINUTE
Definition:
Enums.h:94
home
castejon
castejon_files
develop
terralib5
git_master
terralib5
src
terralib
datatype
Enums.h
Generated on Tue Jul 19 2016 10:33:21 for TerraLib by
1.8.10