1 //********************************************************************
2 //
3 // License:  MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author:      Garrett Potts
8 //
9 // Description: Nitf support class
10 //
11 // Documentation reference:
12 // DIGEST Part 2 Annex D - Appendix 1, Table D1-3
13 //
14 //********************************************************************
15 // $Id: ossimNitfGeoPositioningTag.h 22013 2012-12-19 17:37:20Z dburken $
16 //
17 #ifndef ossimNitfGeoPositioningTag_HEADER
18 #define ossimNitfGeoPositioningTag_HEADER 1
19 #include <ossim/support_data/ossimNitfRegisteredTag.h>
20 
21 class OSSIM_DLL ossimNitfGeoPositioningTag : public ossimNitfRegisteredTag
22 {
23 public:
24    ossimNitfGeoPositioningTag();
25    virtual ~ossimNitfGeoPositioningTag();
26 
27    virtual void parseStream(std::istream& in);
28    virtual void writeStream(std::ostream& out);
29 
30    virtual void clearFields();
31 
32    /**
33     * @brief Print method that outputs a key/value type format
34     * adding prefix to keys.
35     * @param out Stream to output to.
36     * @param prefix Prefix added to key like "image0.";
37     */
38    virtual std::ostream& print(std::ostream& out,
39                                const std::string& prefix=std::string()) const;
40 
41 protected:
42    /**
43     * FIELD: TYP
44     *
45     * required 3 byte field.
46     *
47     * Coordinate System Type
48     *
49     * This field shall contain the type of coordinate system to which the Image
50     * Segment refers.  Valid values are GEO for a geographic coordinate
51     * system (longitude & latitude), MAP for a cartographic (grid)
52     * coordinate system (easting & northing) and DIG for a geographic or
53     * cartographic coordinate system registered through location grids or
54     * registration points.
55     * See clause D1.2.2 for details.
56     * The default value is MAP.
57     *
58     *
59     * Values: MAP, GEO or DIG
60     */
61    char theType[4];
62 
63    /**
64     * FIELD: UNI
65     *
66     * required 3 byte field.
67     *
68     * Coordinate Units This field shall contain the units of measure to which
69     * the Image Segment refers.  Valid values are SEC (Decimal seconds of arc),
70     * DEG (Decimal degrees) and M (Metres).  The value must be consistent with
71     * the coordinate system type.  SEC and DEG are not allowed when the
72     * coordinate system type is MAP.  M is not allowed when the coordinate system
73     * type is GEO.  The PRJPS extension is expected when the value is M.
74     * The default value is M.
75     */
76    char theCoordinateUnits[4];
77 
78 
79    /**
80     * FIELD: DAG
81     *
82     * required 80 byte field.
83     *
84     * Geodetic Datum Name
85     *
86     * This field shall contain the name of the geodetic datum to which the
87     * Image Segment refers.
88     * The default value is World Geodetic System 1984.
89     *
90     */
91    char theGeodeticDatumName[81];
92 
93    /**
94     * FIELD: DCD
95     *
96     * required 4 byte field.
97     *
98     * Geodetic Datum Code This field shall contain the code of the geodetic
99     * datum to which the Image Segment refers. The default value is WGE.
100     *
101     */
102    char theGeodeticDatumCode[5];
103 
104    /**
105     * FIELD: ELL
106     *
107     * required 80 byte field.
108     *
109     * Ellipsoid Name
110     *
111     * This field shall contain the name of the ellipsoid to which the
112     * Image Segment refers. The default value is World Geodetic System 1984.
113     *
114     */
115    char theEllipsoidName[81];
116 
117    /**
118     * FIELD: ELC
119     *
120     * required 3 byte field.
121     *
122     * Ellipsoid Code This field shall contain the code of the ellipsoid to
123     * which the Image Segment refers.
124     * The default value is WE.
125     *
126     */
127    char theEllipsoidCode[4];
128 
129    /**
130     * FIELD: DVR
131     *
132     * required 80 byte field.
133     *
134     * Vertical Datum Reference This field shall contain the name of the vertical
135     * datum reference to which the Image Segment refers, or BCS Spaces if no elevation value
136     * appears in the Image Segment. The default name is Geodetic.
137     */
138    char theVerticalDatumReference[81];
139 
140    /**
141     * FIELD: VDCDVR
142     *
143     * required 4 byte field.
144     *
145     * Code (Category) of Vertical Reference This field shall contain the code
146     * (or category) of the vertical reference to which the Image Segment
147     * refers, or BCS Spaces if no elevation value appears in the Image Segment.
148     * The default code is GEOD.
149     *
150     */
151    char theVerticalReferenceCode[5];
152 
153    /**
154     * FIELD: SDA
155     *
156     * required 80 byte field.
157     *
158     * Sounding Datum Name This field shall contain the name of the sounding datum
159     * to which the Image Segment refers, or BCS Spaces i
160     * f no sounding appears in the Image Segment.
161     * The default value is Mean Sea.
162     */
163    char theSoundingDatumName[81];
164 
165    /**
166     * FIELD: VDCSDA
167     *
168     * required 4 byte field.
169     *
170     * Code for  Sounding Datum This field shall contain the code of the
171     * sounding datum to which the Image Segment refers, or BCS Spaces
172     * if no sounding appears in the Image Segment.
173     * The default valid code is MSL. 4BCS-A See Part 3-6 <R>
174     */
175    char theSoundingDatumCode[5];
176 
177    /**
178     * FIELD ZOR
179     *
180     * required 15 byte field
181     *
182     * Z values False Origin
183     *
184     * This field shall contain the elevation and depth false origin for Z values
185     * to which the Image Segment refers. The default value is 000000000000000,
186     * which implies that there is no projection false Z origin. 15 BCS-N positive integer
187     *
188     */
189    char theZFalseOrigin[16];
190 
191    /**
192     * FIELD: GRD
193     *
194     * required 3 byte field.
195     *
196     * Grid Code This field shall contain the identification code of the grid system
197     * to which the Image Segment refers, or BCS Spaces. The default value is
198     * BCS Spaces. 3BCS-A See Part 3-6 <R>
199     */
200    char theGridCode[4];
201 
202    /**
203     * FIELD: GRN
204     *
205     * required 80 byte field.
206     *
207     * Grid Description If the GRD Field value is not BCS Spaces, this field can
208     * contain a text description of the grid system.
209     * The default value is BCS Spaces. 80 BCS-A <R>
210     */
211    char theGridDescription[81];
212 
213    /**
214     * FIELD: ZNA
215     *
216     * required 4 byte field.
217     *
218     * Grid Zone number This field shall contain the zone number when the GRD
219     * Field contains a significant grid code and the corresponding grid system
220     * comprises more than one zone. Defaulted to 0000 otherwise.
221     * 4 BCS-N integer See Part 3-6 R
222     */
223    char theGridZoneNumber[5];
224 
225 
226 TYPE_DATA
227 };
228 
229 #endif
230