OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimNitfRsmpiaTag.cpp
Go to the documentation of this file.
1 //---
2 // File: ossimNitfRsmpiaTag.cpp
3 //---
4 
5 
7 #include <iomanip>
8 #include <iostream>
9 
11 
13  :
14  ossimNitfRegisteredTag(std::string("RSMPIA"), CEL_SIZE),
15  m_iid(),
16  m_edition(),
17  m_r0(),
18  m_rx(),
19  m_ry(),
20  m_rz(),
21  m_rxx(),
22  m_rxy(),
23  m_rxz(),
24  m_ryy(),
25  m_ryz(),
26  m_rzz(),
27  m_c0(),
28  m_cx(),
29  m_cy(),
30  m_cz(),
31  m_cxx(),
32  m_cxy(),
33  m_cxz(),
34  m_cyy(),
35  m_cyz(),
36  m_czz(),
37  m_rnis(),
38  m_cnis(),
39  m_tnis(),
40  m_rssiz(),
41  m_cssiz()
42 {
43  clearFields();
44 }
45 
47 {
48  in.read(m_iid, IID_SIZE);
49  in.read(m_edition, EDITION_SIZE);
50  in.read(m_r0, FLOAT21_SIZE);
51  in.read(m_rx, FLOAT21_SIZE);
52  in.read(m_ry, FLOAT21_SIZE);
53  in.read(m_rz, FLOAT21_SIZE);
54  in.read(m_rxx, FLOAT21_SIZE);
55  in.read(m_rxy, FLOAT21_SIZE);
56  in.read(m_rxz, FLOAT21_SIZE);
57  in.read(m_ryy, FLOAT21_SIZE);
58  in.read(m_ryz, FLOAT21_SIZE);
59  in.read(m_rzz, FLOAT21_SIZE);
60  in.read(m_c0, FLOAT21_SIZE);
61  in.read(m_cx, FLOAT21_SIZE);
62  in.read(m_cy, FLOAT21_SIZE);
63  in.read(m_cz, FLOAT21_SIZE);
64  in.read(m_cxx, FLOAT21_SIZE);
65  in.read(m_cxy, FLOAT21_SIZE);
66  in.read(m_cxz, FLOAT21_SIZE);
67  in.read(m_cyy, FLOAT21_SIZE);
68  in.read(m_cyz, FLOAT21_SIZE);
69  in.read(m_czz, FLOAT21_SIZE);
70  in.read(m_rnis, NIS_SIZE);
71  in.read(m_cnis, NIS_SIZE);
72  in.read(m_tnis, NIS_SIZE);
73  in.read(m_rssiz, FLOAT21_SIZE);
74  in.read(m_cssiz, FLOAT21_SIZE);
75 }
76 
78 {
79  out.write(m_iid, IID_SIZE);
80  out.write(m_edition, EDITION_SIZE);
81  out.write(m_r0, FLOAT21_SIZE);
82  out.write(m_rx, FLOAT21_SIZE);
83  out.write(m_ry, FLOAT21_SIZE);
84  out.write(m_rz, FLOAT21_SIZE);
85  out.write(m_rxx, FLOAT21_SIZE);
86  out.write(m_rxy, FLOAT21_SIZE);
87  out.write(m_rxz, FLOAT21_SIZE);
88  out.write(m_ryy, FLOAT21_SIZE);
89  out.write(m_ryz, FLOAT21_SIZE);
90  out.write(m_rzz, FLOAT21_SIZE);
91  out.write(m_c0, FLOAT21_SIZE);
92  out.write(m_cx, FLOAT21_SIZE);
93  out.write(m_cy, FLOAT21_SIZE);
94  out.write(m_cz, FLOAT21_SIZE);
95  out.write(m_cxx, FLOAT21_SIZE);
96  out.write(m_cxy, FLOAT21_SIZE);
97  out.write(m_cxz, FLOAT21_SIZE);
98  out.write(m_cyy, FLOAT21_SIZE);
99  out.write(m_cyz, FLOAT21_SIZE);
100  out.write(m_czz, FLOAT21_SIZE);
101  out.write(m_rnis, NIS_SIZE);
102  out.write(m_cnis, NIS_SIZE);
103  out.write(m_tnis, NIS_SIZE);
104  out.write(m_rssiz, FLOAT21_SIZE);
105  out.write(m_cssiz, FLOAT21_SIZE);
106 }
107 
109  const std::string& prefix) const
110 {
111  std::string pfx = prefix;
112  pfx += getTagName();
113  pfx += ".";
114  out << setiosflags(ios::left)
115  << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
116  << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
117  << pfx << std::setw(24) << "IID:" << m_iid << "\n"
118  << pfx << std::setw(24) << "EDITION:" << m_edition << "\n"
119  << pfx << std::setw(24) << "R0:" << m_r0 << "\n"
120  << pfx << std::setw(24) << "RX:" << m_rx << "\n"
121  << pfx << std::setw(24) << "RY:" << m_ry << "\n"
122  << pfx << std::setw(24) << "RZ:" << m_rz << "\n"
123  << pfx << std::setw(24) << "RXX:" << m_rxx << "\n"
124  << pfx << std::setw(24) << "RXY:" << m_rxy << "\n"
125  << pfx << std::setw(24) << "RXZ:" << m_rxz << "\n"
126  << pfx << std::setw(24) << "RYY:" << m_ryy << "\n"
127  << pfx << std::setw(24) << "RYZ:" << m_ryz << "\n"
128  << pfx << std::setw(24) << "RZZ:" << m_rzz << "\n"
129  << pfx << std::setw(24) << "C0:" << m_c0 << "\n"
130  << pfx << std::setw(24) << "CX:" << m_cx << "\n"
131  << pfx << std::setw(24) << "CY:" << m_cy << "\n"
132  << pfx << std::setw(24) << "CZ:" << m_cz << "\n"
133  << pfx << std::setw(24) << "CXX:" << m_cxx << "\n"
134  << pfx << std::setw(24) << "CXY:" << m_cxy << "\n"
135  << pfx << std::setw(24) << "CXZ:" << m_cxz << "\n"
136  << pfx << std::setw(24) << "CYY:" << m_cyy << "\n"
137  << pfx << std::setw(24) << "CYZ:" << m_cyz << "\n"
138  << pfx << std::setw(24) << "CZZ:" << m_czz << "\n"
139  << pfx << std::setw(24) << "RNIS:" << m_rnis << "\n"
140  << pfx << std::setw(24) << "CNIS:" << m_cnis << "\n"
141  << pfx << std::setw(24) << "TNIS:" << m_tnis << "\n"
142  << pfx << std::setw(24) << "RSSIZ:" << m_rssiz << "\n"
143  << pfx << std::setw(24) << "CSSIZ:" << m_cssiz << "\n";
144 
145  return out;
146 }
147 
149 {
150  memset(m_iid,' ', IID_SIZE);
151  memset(m_edition, ' ', EDITION_SIZE);
152  memset(m_r0, ' ', FLOAT21_SIZE);
153  memset(m_rx, ' ', FLOAT21_SIZE);
154  memset(m_ry, ' ', FLOAT21_SIZE);
155  memset(m_rz, ' ', FLOAT21_SIZE);
156  memset(m_rxx, ' ', FLOAT21_SIZE);
157  memset(m_rxy, ' ', FLOAT21_SIZE);
158  memset(m_rxz, ' ', FLOAT21_SIZE);
159  memset(m_ryy, ' ', FLOAT21_SIZE);
160  memset(m_ryz, ' ', FLOAT21_SIZE);
161  memset(m_rzz, ' ', FLOAT21_SIZE);
162  memset(m_c0, ' ', FLOAT21_SIZE);
163  memset(m_cx, ' ', FLOAT21_SIZE);
164  memset(m_cy, ' ', FLOAT21_SIZE);
165  memset(m_cz, ' ', FLOAT21_SIZE);
166  memset(m_cxx, ' ', FLOAT21_SIZE);
167  memset(m_cxy, ' ', FLOAT21_SIZE);
168  memset(m_cxz, ' ', FLOAT21_SIZE);
169  memset(m_cyy, ' ', FLOAT21_SIZE);
170  memset(m_cyz, ' ', FLOAT21_SIZE);
171  memset(m_czz, ' ', FLOAT21_SIZE);
172  memset(m_rnis, ' ', NIS_SIZE);
173  memset(m_cnis, ' ', NIS_SIZE);
174  memset(m_tnis, ' ', NIS_SIZE);
175  memset(m_rssiz, ' ', FLOAT21_SIZE);
176  memset(m_cssiz, ' ', FLOAT21_SIZE);
177 
178  m_iid[IID_SIZE] = '\0';
179  m_edition[EDITION_SIZE] = '\0';
180  m_r0[FLOAT21_SIZE] = '\0';
181  m_rx[FLOAT21_SIZE] = '\0';
182  m_ry[FLOAT21_SIZE] = '\0';
183  m_rz[FLOAT21_SIZE] = '\0';
184  m_rxx[FLOAT21_SIZE] = '\0';
185  m_rxy[FLOAT21_SIZE] = '\0';
186  m_rxz[FLOAT21_SIZE] = '\0';
187  m_ryy[FLOAT21_SIZE] = '\0';
188  m_ryz[FLOAT21_SIZE] = '\0';
189  m_rzz[FLOAT21_SIZE] = '\0';
190  m_c0[FLOAT21_SIZE] = '\0';
191  m_cx[FLOAT21_SIZE] = '\0';
192  m_cy[FLOAT21_SIZE] = '\0';
193  m_cz[FLOAT21_SIZE] = '\0';
194  m_cxx[FLOAT21_SIZE] = '\0';
195  m_cxy[FLOAT21_SIZE] = '\0';
196  m_cxz[FLOAT21_SIZE] = '\0';
197  m_cyy[FLOAT21_SIZE] = '\0';
198  m_cyz[FLOAT21_SIZE] = '\0';
199  m_czz[FLOAT21_SIZE] = '\0';
200  m_rnis[NIS_SIZE] = '\0';
201  m_cnis[NIS_SIZE] = '\0';
202  m_tnis[NIS_SIZE] = '\0';
203  m_rssiz[FLOAT21_SIZE] = '\0';
204  m_cssiz[FLOAT21_SIZE] = '\0';
205 }
206 
207 
209 {
210  return ossimString(m_iid);
211 }
212 
214 {
215  return ossimString(m_edition);
216 }
217 
219 {
220  return ossimString(m_r0);
221 }
222 
224 {
225  return ossimString(m_rx);
226 }
227 
229 {
230  return ossimString(m_ry);
231 }
232 
234 {
235  return ossimString(m_rz);
236 }
237 
239 {
240  return ossimString(m_rxx);
241 }
242 
244 {
245  return ossimString(m_rxy);
246 }
247 
249 {
250  return ossimString(m_rxz);
251 }
252 
254 {
255  return ossimString(m_ryy);
256 }
257 
259 {
260  return ossimString(m_ryz);
261 }
262 
264 {
265  return ossimString(m_rzz);
266 }
267 
269 {
270  return ossimString(m_c0);
271 }
272 
274 {
275  return ossimString(m_cx);
276 }
277 
279 {
280  return ossimString(m_cy);
281 }
282 
284 {
285  return ossimString(m_cz);
286 }
287 
289 {
290  return ossimString(m_cxx);
291 }
292 
294 {
295  return ossimString(m_cxy);
296 }
297 
299 {
300  return ossimString(m_cxz);
301 }
302 
304 {
305  return ossimString(m_cyy);
306 }
307 
309 {
310  return ossimString(m_cyz);
311 }
312 
314 {
315  return ossimString(m_czz);
316 }
317 
319 {
320  return ossimString(m_rnis);
321 }
322 
324 {
325  return ossimString(m_cnis);
326 }
327 
329 {
330  return ossimString(m_tnis);
331 }
332 
334 {
335  return ossimString(m_rssiz);
336 }
337 
339 {
340  return ossimString(m_cssiz);
341 }
char m_cyz[FLOAT21_SIZE+1]
ossimString getRx() const
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
char m_rnis[NIS_SIZE+1]
virtual void writeStream(std::ostream &out)
Writes out tag to stream.
char m_r0[FLOAT21_SIZE+1]
char m_cssiz[FLOAT21_SIZE+1]
char m_cnis[NIS_SIZE+1]
ossimString getEdition() const
char m_iid[IID_SIZE+1]
char m_rzz[FLOAT21_SIZE+1]
char m_czz[FLOAT21_SIZE+1]
char m_cy[FLOAT21_SIZE+1]
ossimString getRxy() const
ossimString getRz() const
ossimString getRy() const
char m_cz[FLOAT21_SIZE+1]
char m_rxy[FLOAT21_SIZE+1]
char m_rssiz[FLOAT21_SIZE+1]
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
prints all fields.
ossimString getRssiz() const
ossimString getCz() const
char m_cxz[FLOAT21_SIZE+1]
ossimString getCxy() const
virtual ossim_uint32 getTagLength() const
Returns the length in bytes of the tag from the CEL or REL field.
ossimString getIid() const
char m_c0[FLOAT21_SIZE+1]
char m_rz[FLOAT21_SIZE+1]
ossimString getCzz() const
ossimString getRnis() const
ossimString getR0() const
ossimString getCnis() const
char m_tnis[NIS_SIZE+1]
ossimString getRxz() const
ossimString getCxz() const
ossimString getRxx() const
char m_cyy[FLOAT21_SIZE+1]
char m_cxy[FLOAT21_SIZE+1]
char m_cx[FLOAT21_SIZE+1]
ossimString getCssiz() const
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
ossimString getRyz() const
char m_ryz[FLOAT21_SIZE+1]
ossimString getCx() const
ossimString getCxx() const
ossimString getRzz() const
ossimString getTnis() const
virtual void clearFields()
Memsets fields to space.
char m_edition[EDITION_SIZE+1]
virtual void parseStream(std::istream &in)
Reads in tag from stream.
RTTI_DEF1(ossimNitfRsmpiaTag, "ossimNitfRsmpiaTag", ossimNitfRegisteredTag)
char m_rxx[FLOAT21_SIZE+1]
ossimString getCyz() const
char m_ry[FLOAT21_SIZE+1]
char m_rxz[FLOAT21_SIZE+1]
char m_ryy[FLOAT21_SIZE+1]
char m_rx[FLOAT21_SIZE+1]
ossimString getCyy() const
ossimString getRyy() const
ossimString getC0() const
char m_cxx[FLOAT21_SIZE+1]
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
ossimString getCy() const