1 #ifndef ossimRpfAttributeOffsetRecord_HEADER
2 #define ossimRpfAttributeOffsetRecord_HEADER 1
3 
4 #include <ossim/base/ossimConstants.h>
5 #include <ossim/base/ossimErrorContext.h>
6 #include <ossim/base/ossimIosFwd.h>
7 
8 class ossimRpfAttributeOffsetRecord
9 {
10 public:
11    friend std::ostream& operator <<(std::ostream& out,
12                                     const ossimRpfAttributeOffsetRecord& data);
13 
14    ossimRpfAttributeOffsetRecord();
15    virtual ~ossimRpfAttributeOffsetRecord(){}
16 
17    ossimErrorCode parseStream(ossim::istream& in, ossimByteOrder byteOrder);
18    void print(std::ostream& out)const;
19    ossim_uint16  getAttributeId()const{return theAttributeId;}
20    ossim_uint8   getParamterId()const{return theParameterId;}
21    ossim_uint32  getAttributeRecordOffset()const{return theAttributeRecordOffset;}
22 
23 private:
24    void clearFields();
25    /*!
26     * The attribute Id.  The Id and descriptions are taken from
27     * MIL-STD-2411-1 and can have one of the following values:
28     *
29     * ID     Description
30     * _________________________________________________________________
31     * 1      Currency Date, 1 parameter:
32     *          1. Date of most recent revision to the RPF
33     *             YYYYMMDD
34     *             8 byte ascii value
35     *
36     * 2      Production Date, 1 parameter:
37     *          1. Date the source data was transformed to RPF format
38     *             YYYYMMDD
39     *             8 byte ascii value
40     *
41     * 3      Significant Date, 1 parameter:
42     *          1. Most accurately describes the date of
43     *             the source data.
44     *             YYYYMMDD
45     *             8 byte ascii value
46     *
47     * 4      Map/Chart source, 4 parameters:
48     *          1. Short title for the id of a group of
49     *             products.  ex: JOG 1501A ...
50     *             10 byte ascii value
51     *          2. The designation of the hardcopy source
ossimQuickbirdTileInfo()52     *             8 byte ascii value
53     *          3. Old horizontal datum code.  Original
54     *             horizontal datum of the hardcopy product
55     *             4 byte ascii value
56     *          4. Edition number of the source graphic
57     *             7 byte ascii value.
58     *
59     * 5      Projection Systemd, 5 parameters: p. 38 of MIL-STD-2411-1
60     *          1. Projection Code. 2 byte ascii value
61     *             AC    Albers Equal area
62     *                   Requires Parameters A B C D
63     *             AL    Azimuthal Equal Dist.
64     *                   Requires Parameters A B
65     *             RB    Hotline Oblique Mercator
66     *                   Requires Parameters A B C
67     *             LE    Lambert Conformal Conic
68     *                   Requires Parameters A B C D
69     *             MC    Mercator
70     *                   Requires Parameters A B
71     *             OC    Oblique Mercator
72     *                   Requires Parameters A B C
73     *             OD    Orthographic
74     *                   Requires Parameters A B
75     *             PG    Polar Stereo-graphic
76     *                   Requires Parameters A B C D
77     *             PH    Poly conic
78     *                   Requires Parameters A B
79     *             TC    Transverse Mercator
80     *                   Requires Parameters A B C
81     *             UT    Universal Transverse Mercator
82     *                   Requires Parameters A
83     *          2. Projection Param A: real 4 byte value
84     *          3. Projeciton Param B: real 4 byte value
85     *          4. Projection Param C: real 4 byte value
86     *          5. Projection Param D: real 4 byte value
87     * 6      Vertical Datum (1 parameter) p. 37 MIL-STD-2411-1
88     *         4 byte ascii
89     *
90     *          MSL     Mean Sea Level.  All elevations in th data set
91     *                  are referenced to the geoid of the specified datum
92     *          GEOD    Geodetic (All elevations in the data set
93     *                  are referenced to the ellipsoid of the specified
94     *                  datum
95     * 7      Horizontal Datum (1 parameter)
96     *        4 byte ascii
97     *
98     *            Look on p.33 of MIL-STD-2411-1.  Too big to list
99     *            we will need a translation table for these
100     *            codes
101     * 8      Vertical Absolute Accurracy (2 parameters)
102     *        1. vertical absolute accuracy: 4 byte unsigned int
103     *        2. Accuracy units of measure:  2 byte value
104     *             0   unknown
105     *             1   meters (Length area Volume)
106     *             2   Kilopounds
107     *             3   Seconds (of time)
108     *             4   Meters/Second (speed)
109     *             5   Cubic Meters per second (Flow)
110     *             6   Volt (Electrical potential)
111     *             7   Watt (Ten to 6 electirical power)
112     *             8   Hertz
113     *             9   +- DD MM SS.S (Angular)
114     *             10  +- HH MM SS.S (Time)
115     *             11  International Nautical Mile (1852 meters)
116     *             12  knot
117     *             13  Nautical mile per day
118     *             14  Feet
119     *             15  Fathom
120     *             16  Micrometers (microns)
121     *             17  Mils
122     *             18  Seconds of Arc
123     *             19  Minutes of Arc
124     *             20  Degrees of arc
125     *             999 Other
126     *
127     * 9      Horizontal Absolute Accuracy (2 parameters)
128     *        1. Horizontal absolute accuracy: 4 byte unsigned int
129     *        2. Accuracy units of measure:  2 byte value
130     *             0   unknown
131     *             1   meters (Length area Volume)
132     *             2   Kilopounds
133     *             3   Seconds (of time)
134     *             4   Meters/Second (speed)
135     *             5   Cubic Meters per second (Flow)
136     *             6   Volt (Electrical potential)
137     *             7   Watt (Ten to 6 electirical power)
138     *             8   Hertz
139     *             9   +- DD MM SS.S (Angular)
140     *             10  +- HH MM SS.S (Time)
141     *             11  International Nautical Mile (1852 meters)
142     *             12  knot
143     *             13  Nautical mile per day
144     *             14  Feet
145     *             15  Fathom
146     *             16  Micrometers (microns)
147     *             17  Mils
148     *             18  Seconds of Arc
149     *             19  Minutes of Arc
150     *             20  Degrees of arc
151     *             999 Other
152     *
153     * 10     Vertical Relative Accuracy (2 parameters)
154     *        1. Vertical relative accuracy: 4 byte unsigned int
155     *        2. Accuracy units of measure:  2 byte value
156     *             0   unknown
157     *             1   meters (Length area Volume)
158     *             2   Kilopounds
159     *             3   Seconds (of time)
160     *             4   Meters/Second (speed)
161     *             5   Cubic Meters per second (Flow)
162     *             6   Volt (Electrical potential)
163     *             7   Watt (Ten to 6 electirical power)
164     *             8   Hertz
165     *             9   +- DD MM SS.S (Angular)
166     *             10  +- HH MM SS.S (Time)
167     *             11  International Nautical Mile (1852 meters)
168     *             12  knot
169     *             13  Nautical mile per day
170     *             14  Feet
171     *             15  Fathom
172     *             16  Micrometers (microns)
173     *             17  Mils
174     *             18  Seconds of Arc
175     *             19  Minutes of Arc
176     *             20  Degrees of arc
177     *             999 Other
178     *
179     * 11     Horizontal Relative Accuracy (2 parameters)
180     *        1. Horizontal relative accuracy: 4 byte unsigned int
181     *        2. Accuracy units of measure:  2 byte value
182     *             0   unknown
183     *             1   meters (Length area Volume)
184     *             2   Kilopounds
185     *             3   Seconds (of time)
186     *             4   Meters/Second (speed)
187     *             5   Cubic Meters per second (Flow)
188     *             6   Volt (Electrical potential)
189     *             7   Watt (Ten to 6 electirical power)
190     *             8   Hertz
191     *             9   +- DD MM SS.S (Angular)
192     *             10  +- HH MM SS.S (Time)
193     *             11  International Nautical Mile (1852 meters)
194     *             12  knot
195     *             13  Nautical mile per day
196     *             14  Feet
197     *             15  Fathom
198     *             16  Micrometers (microns)
199     *             17  Mils
200     *             18  Seconds of Arc
201     *             19  Minutes of Arc
202     *             20  Degrees of arc
203     *             999 Other
204     *
205     * 12     Ellipsoid, 1 parameter:
206     *        1. Ellipsoid code.  3 byte ascii
207     *           See p. 40 of MIL-STD-2411-1
208     * 13     Sounding Datumm, 1 parameter: 4 byte ascii
209     *        See p. 33 MIL-STD-2411-1 5.3.2.2
210     * 14     Navigation System, 1 parameter:
211     *        1. Navigation code. 2 byte unsigned int
212     *           See MIL-STD-2411-1 5.3.2.4
213     * 15     Grid, 1 parameter:
214     *        1. Grid code. 2 byte ascii
215     *           See MIL-STD-2411-1 5.3.2.7
216     * 16     Easterly Annual Magnetic Change, 2 parameters:
217     *        1. Easterly annual magnetic change. 4 byte real
218     *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
219     * 17     Westerly Annual Magnetic Change, 2 parameters:
220     *        1. Westerly annual magnetic change. 4 byte real
221     *        2. Units of the change.  See 5.3.2.6 of MIL-STD-2411-1
222     * 18     Grid North Magnetic North ANgle, 2 paramters:
223     *        1. Grid North - Magnetic North.  4 byte real
224     *        2. Units of angle. 2 byte unsigned int
225     *           see 5.3.2.6
226     * 19     Grid convergence angle, 2 parameters:
227     *        1. Grid convergence angle.  4 byte Real
228     *        2. Units of angle. 2 byte unsigned int 5.3.2.6
229     * 20     Highest known elevation (4 parameters)
230     *        1. Highest known elevation: 8 byte real
231     *        2. Units of elevation: See 5.3.2.6 of MIL-STD-2411-1
232     *        3. Lat of elevation: 8 byte real in decimal degrees
233     *        4. Lon of elevation: 8 byte real in decimal degrees
234     * 21     Multiple legend, 1 paraemter:
235     *        1. Name of legend file that applies to this
236     *           12 byte ascii
237     * 22     Image source, 2 parameters:
238     *        1. Source of data from which this
239     *           RPF was derived. ex: SPOT. Landsat7, Landsat4.
240     *           for CDTED: "imagery, "carto"
241     *           12 byte ascii
242     *        2. GSD.  Ground sample or post distance.
243     *           4 byte unsigned int
244     * 23     Data Level, 1 parameter:
245     *        1. The level of the source.  For example:
246     *           if this is a DTED or CDTED it would
247     *           distinguish between level 1 and 2
248     */
249    ossim_uint16 theAttributeId;
250 
251    /*!
252     * This defines which parameter number for theAttrributeId
253     */
254    ossim_uint8  theParameterId;
255 
256    /*!
257     * This is a 1 byte field.  If the value is 0 then
258     * the attribute applies to the entire geographic coverage
259     * of this frame.  If it's > 0 then the areal coverage
260     * where the given attribute applies is defined in the corresponding
261     * explicit areal coverage record in the explicit areal
262     * coverage table.
263     */
264     ossim_uint8 theArealCoverageSequenceNumber;
265 
266    /*!
267     * a 4-byte unsigned integer.  displacement in bytes measured
268     * from the beginning of the [attribute subsection] and the first
269     * byte of the [attribute record].
270     */
271    ossim_uint32 theAttributeRecordOffset;
272 };
273 
274 #endif
275