OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRpfAttributes.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: LGPL
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 //----------------------------------------------------------------------------
8 // $Id: ossimRpfAttributes.cpp 14241 2009-04-07 19:59:23Z dburken $
9 
10 #include <iostream>
11 
13 
15  const ossimRpfAttributes& data)
16 {
17  data.print(out);
18 
19  return out;
20 }
21 
23 {
24  clearFields();
25 }
27 {
28 }
29 
31  const std::string& prefix) const
32 {
33  out << prefix << "CurrencyDate: " << theCurrencyDate << "\n"
34  << prefix << "ProductionDate: " << theProductionDate << "\n"
35  << prefix << "SignificantDate: " << theSignificantDate << "\n"
36  << prefix << "ChartSeriesCode: " << theChartSeriesCode << "\n"
37  << prefix << "MapDesignationCode: " << theMapDesignationCode << "\n"
38  << prefix << "OldHorDatum: " << theOldHorDatum << "\n"
39  << prefix << "Edition: " << theEdition << "\n"
40  << prefix << "ProjectionCode: " << theProjectionCode << "\n"
41  << prefix << "ProjectionA: " << theProjectionA << "\n"
42  << prefix << "ProjectionB: " << theProjectionB << "\n"
43  << prefix << "ProjectionC: " << theProjectionC << "\n"
44  << prefix << "ProjectionD: " << theProjectionD << "\n"
45  << prefix << "VertDatumCode: " << theVertDatumCode<< "\n"
46  << prefix << "HorDatumCode: " << theHorDatumCode << "\n"
47  << prefix << "VertAbsAccuracy: " << theVertAbsAccuracy << "\n"
48  << prefix << "VertAbsUnits: " << theVertAbsUnits << "\n"
49  << prefix << "HorAbsAccuracy: " << theHorAbsAccuracy << "\n"
50  << prefix << "HorAbsUnits: " << theHorAbsUnits << "\n"
51  << prefix << "VertRelAccuracy: " << theVertRelAccuracy << "\n"
52  << prefix << "VertRelUnits: " << theVertRelUnits << "\n"
53  << prefix << "HorRelAccuracy: " << theHorRelAccuracy << "\n"
54  << prefix << "HorRelUnits: " << theHorRelUnits << "\n"
55  << prefix << "ellipsoidCode: " << ellipsoidCode << "\n"
56  << prefix << "SoundingDatumCode: " << theSoundingDatumCode << "\n"
57  << prefix << "NavSystemCode: " << theNavSystemCode << "\n"
58  << prefix << "GridCode: " << theGridCode << "\n"
59  << prefix << "EeasterlyMagChange: " << theEeasterlyMagChange << "\n"
60  << prefix << "EasterlyMagChangeUnits: " << theEasterlyMagChangeUnits << "\n"
61  << prefix << "WesterlyMagChange: " << theWesterlyMagChange << "\n"
62  << prefix << "WesterlyMagChangeUnits: " << theWesterlyMagChangeUnits << "\n"
63  << prefix << "MagAngle: " << theMagAngle << "\n"
64  << prefix << "GridConver: " << theGridConver << "\n"
65  << prefix << "GridConverUnits: " << theGridConverUnits << "\n"
66  << prefix << "HighElevation: " << theHighElevation << "\n"
67  << prefix << "HighElevationUnits: " << theHighElevationUnits << "\n"
68  << prefix << "HighLat: " << theHighLat << "\n"
69  << prefix << "HighLon: " << theHighLon << "\n"
70  << prefix << "LegendFileName: " << theLegendFileName << "\n"
71  << prefix << "DataSource: " << theDataSource << "\n"
72  << prefix << "gsd: " << theGsd << "\n"
73  << prefix << "DataLevel: " << theDataLevel << std::endl;
74  return out;
75 }
76 
78 {
79  for(std::map<ossim_uint32, bool>::const_iterator iter= theAttributeIdBoolMap.begin();
80  iter != theAttributeIdBoolMap.end();++iter)
81  {
82  if(iter->second!=false)
83  {
84  return false;
85  }
86  }
87  return true;
88 }
89 
91 {
92  theCurrencyDate = "";
93  theProductionDate = "";
94  theSignificantDate = "";
95  theChartSeriesCode = "";
97  theOldHorDatum = "";
98  theEdition = "";
99  theProjectionCode = "";
100  theProjectionA = 0.0;
101  theProjectionB = 0.0;
102  theProjectionC = 0.0;
103  theProjectionD = 0.0;
104  theVertDatumCode = "";
105  theHorDatumCode = "";
106  theVertAbsAccuracy = 0;
107  theVertAbsUnits = 0;
108  theHorAbsAccuracy = 0;
109  theHorAbsUnits = 0;
110  theVertRelAccuracy = 0;
111  theVertRelUnits = 0;
112  theHorRelAccuracy = 0;
113  theHorRelUnits = 0;
114  ellipsoidCode = "";
116  theNavSystemCode = 0;
117  theGridCode = "";
118  theEeasterlyMagChange = 0.0;
120  theWesterlyMagChange = 0.0;
122  theMagAngle = 0.0;
123  theMagAngleUnits = 0;
124  theGridConver = 0.0;
125  theGridConverUnits = 0;
126  theHighElevation = 0.0;
128  theHighLat = 0.0;
129  theHighLon = 0.0;
130  theLegendFileName = "";
131  theDataSource = "";
132  theGsd = 0;
133  theDataLevel = 0;
134 
135  theAttributeIdBoolMap.clear();
136 }
137 
139  bool flag)
140 {
141  std::map<ossim_uint32, bool>::iterator iter = theAttributeIdBoolMap.find(id);
142 
143  if(iter != theAttributeIdBoolMap.end())
144  {
145  if(flag)
146  {
147  iter->second = flag;
148  }
149  else
150  {
151  theAttributeIdBoolMap.erase(iter);
152  }
153  }
154  else if(flag)
155  {
156  theAttributeIdBoolMap.insert(std::make_pair(id, flag));
157  }
158 }
159 
161 {
162  std::map<ossim_uint32, bool>::const_iterator iter = theAttributeIdBoolMap.find(id);
163 
164  if(iter != theAttributeIdBoolMap.end())
165  {
166  return iter->second;
167  }
168 
169  return false;
170 }
ossim_uint16 theHorRelUnits
ossimString theSignificantDate
ossim_uint16 theVertAbsUnits
ossimString theCurrencyDate
ossimString theVertDatumCode
ossim_uint32 theVertAbsAccuracy
ossimString theMapDesignationCode
std::ostream & operator<<(std::ostream &out, const ossimRpfAttributes &data)
ossimString theChartSeriesCode
ossimString theSoundingDatumCode
ossim_uint32 theHorRelAccuracy
unsigned int ossim_uint32
bool getAttributeFlag(ossim_uint32 id) const
ossim_uint32 theHorAbsAccuracy
ossim_uint16 theHorAbsUnits
ossim_uint16 theGridConverUnits
ossim_uint32 theVertRelAccuracy
std::map< ossim_uint32, bool > theAttributeIdBoolMap
ossim_uint16 theMagAngleUnits
void setAttributeFlag(ossim_uint32 id, bool flag)
ossim_uint16 theHighElevationUnits
std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.
ossimString theProjectionCode
ossim_uint16 theEasterlyMagChangeUnits
ossimString theLegendFileName
ossimString theOldHorDatum
ossimString theProductionDate
ossim_uint16 theNavSystemCode
ossim_uint16 theWesterlyMagChangeUnits
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
ossim_uint16 theVertRelUnits