OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimFfRevb.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // Author: Ken Melero (kmelero@imagelinks.com)
6 // Orginally written by Dave Burken (dburken@imagelinks.com)
7 // Description: This class parses an EOSAT Fast Format rev b header.
8 //
9 //********************************************************************
10 // $Id$
11 
12 #ifndef ossimFfRevb_HEADER
13 #define ossimFfRevb_HEADER 1
14 
16 #include <iosfwd>
17 
18 //***************************************************************************
19 // CLASS: ossimFfRevb.h
20 //***************************************************************************
22 {
23 public:
24  ossimFfRevb ();
25  ossimFfRevb (const char* headerFile);
27 
29  {
30  OSSIM_OK = 0,
32  };
33 
34  //***
35  // Enumerations for parsing header. Contains size in bytes
36  // for all fields.
37  //
38  // NOTE: Sizes are the actual number of bytes for that field so add
39  // one for trailing '\0' to get the string length for the
40  // data member that are character arrays.
41  //***
42  enum
43  {
46  };
47 
48  enum
49  {
55  DATE_SIZE = 8,
100  LON_SIZE = 13,
101  LAT_SIZE = 12,
121  };
122 
123  //***
124  // Enumerations for byte offsets in header. All offsets are relative to
125  // the first byte of the first record which is byte 0.
126  //***
127  enum
128  {
129  // One record: bytes 0 - 1535
182 
183  int errorStatus() const { return theErrorStatus; }
184 
185  void print(std::ostream& os) const;
186 
187  void write(std::ostream& os) const;
188 
189  int path() const;
190  //> Returns the path as an int.
191  //<
192  int row() const;
193  //> Returns the row as an int from the pathRowString.
194  //<
195  int fraction() const;
196  //> Returns the fraction as an int from the pathRowString.
197  //<
198  double projParam(int paramNumber) const;
199  //> Converts the USGS Projection Parameter string, which has a
200  // "D" to denote the exponent, to a double.
201  //<
202 
203  friend std::ostream& operator<<(std::ostream& os, const ossimFfRevb& head);
204 
208  //> yyyyddmm
209  //<
211  //> L4, L5, 1B, 1C
212  //<
214  //> TM, LISS1 LISS2, LISS3, PAN, WIFS
215  //<
216  char theProductType[PRODUCT_TYPE_SIZE + 1]; // MAP or ORBIT oriented
217  char theProductSize[PRODUCT_SIZE_SIZE + 1]; // FULL, SUB, MAP
218  //> SYSTEMATIC, PRECISION, TERRAIN RADIOMETRIC
219  //<
222  //> SYSTEMATIC, PRECISION, TERRAIN RADIOMETRIC
223  //<
224  char theResampAlgorithm[RESAMPLING_ALGO_SIZE + 1]; // CC, NN or BL
229  double theOrientationAngle; // degrees
235  //> USGS Projection Parameters. These are actually a string
236  // representing doubles; however, EOSAT uses a "D" for the
237  // exponent notation, so they are read in as a char*.
238  // To convert to double use the method "projParam".
239  //<
243  double theGsd; // pixel size in meters
244  int thePixelsPerLine; // samples
245  int theLinesPerImage; // lines
246 
247  char theUlLon[LON_SIZE + 1]; // deg, min, sec
248  char theUlLat[LAT_SIZE + 1]; // deg, min, sec
249  double theUlEasting; // meters
250  double theUlNorthing; // meters
251 
252  char theUrLon[LON_SIZE + 1]; // deg, min, sec
253  char theUrLat[LAT_SIZE + 1]; // deg, min, sec
254  double theUrEasting; // meters
255  double theUrNorthing; // meters
256 
257  char theLrLon[LON_SIZE + 1]; // deg, min, sec
258  char theLrLat[LAT_SIZE + 1]; // deg, min, sec
259  double theLrEasting; // meters
260  double theLrNorthing; // meters
261 
262  char theLlLon[LON_SIZE + 1]; // deg, min, sec
263  char theLlLat[LAT_SIZE + 1]; // deg, min, sec
264  double theLlEasting; // meters
265  double theLlNorthing; // meters
266 
270  int theSunElevation; // degrees
271  int theSunAzimuth; // degrees
272 
273  char theCenterLon[LON_SIZE + 1]; // deg, min, sec
274  char theCenterLat[LAT_SIZE + 1]; // deg, min, sec
275  double theCenterEasting; // meters
276  double theCenterNorthing; // meters
277  int theCenterSample; // Nearest whole pixel.
278  int theCenterLine; // Nearest whole pixel.
279  int theOffset; // pixels
281 
282 private:
283  void loadFromStream(std::istream& is);
284 
285  int checkStream(std::istream& is);
286 
288 };
289 
290 #endif
int fraction() const
char theInstrumentType[INSTRUMENT_TYPE_SIZE+1]
Definition: ossimFfRevb.h:213
double theSemiMajorAxis
Definition: ossimFfRevb.h:241
double theUlNorthing
Definition: ossimFfRevb.h:250
char theFormatVersion[FORMAT_VERSION_SIZE+1]
Definition: ossimFfRevb.h:280
char thePathRowNumber[PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevb.h:206
void loadFromStream(std::istream &is)
ErrorStatus theErrorStatus
Definition: ossimFfRevb.h:287
int theUsgsProjNumber
Definition: ossimFfRevb.h:231
void write(std::ostream &os) const
double theUlEasting
Definition: ossimFfRevb.h:249
double theLrEasting
Definition: ossimFfRevb.h:259
char theProductType[PRODUCT_TYPE_SIZE+1]
Definition: ossimFfRevb.h:216
char theUrLat[LAT_SIZE+1]
Definition: ossimFfRevb.h:253
friend std::ostream & operator<<(std::ostream &os, const ossimFfRevb &head)
char theAcquisitionDate[DATE_SIZE+1]
Definition: ossimFfRevb.h:207
char theUrLon[LON_SIZE+1]
Definition: ossimFfRevb.h:252
int the1stLineInVolume
Definition: ossimFfRevb.h:227
char theProductSize[PRODUCT_SIZE_SIZE+1]
Definition: ossimFfRevb.h:217
int theCenterLine
Definition: ossimFfRevb.h:278
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
int theCenterSample
Definition: ossimFfRevb.h:277
double theLlEasting
Definition: ossimFfRevb.h:264
double theCenterNorthing
Definition: ossimFfRevb.h:276
char theUlLat[LAT_SIZE+1]
Definition: ossimFfRevb.h:248
int checkStream(std::istream &is)
int theRecordSize
Definition: ossimFfRevb.h:269
char theProductOrderNumber[PRODUCT_ORDER_NUMBER_SIZE+1]
Definition: ossimFfRevb.h:205
char theUlLon[LON_SIZE+1]
Definition: ossimFfRevb.h:247
char theBandRadiance[NUMBER_OF_BANDS][RADIANCE_SIZE+1]
Definition: ossimFfRevb.h:225
char theUsgsProjParam[NUMBER_OF_PROJECTION_PARAMETERS][USGS_PROJ_PARAMS_SIZE+1]
Definition: ossimFfRevb.h:234
double theGsd
Definition: ossimFfRevb.h:243
void print(std::ostream &os) const
char theCenterLat[LAT_SIZE+1]
Definition: ossimFfRevb.h:274
char theProcessingType[PROCESSING_TYPE_SIZE+1]
Definition: ossimFfRevb.h:221
double theUrNorthing
Definition: ossimFfRevb.h:255
char theSatNumber[SAT_NUMBER_SIZE+1]
Definition: ossimFfRevb.h:210
double projParam(int paramNumber) const
char theResampAlgorithm[RESAMPLING_ALGO_SIZE+1]
Definition: ossimFfRevb.h:224
char theLlLat[LAT_SIZE+1]
Definition: ossimFfRevb.h:263
char theBandsPresentString[BANDS_PRESENT_SIZE+1]
Definition: ossimFfRevb.h:267
int path() const
int theSunAzimuth
Definition: ossimFfRevb.h:271
char theLrLon[LON_SIZE+1]
Definition: ossimFfRevb.h:257
char theMapSheetName[MAP_SHEET_SIZE+1]
Definition: ossimFfRevb.h:220
int thePixelsPerLine
Definition: ossimFfRevb.h:244
int theLinesPerVolume
Definition: ossimFfRevb.h:228
char theLrLat[LAT_SIZE+1]
Definition: ossimFfRevb.h:258
int row() const
char theMapProjName[MAP_PROJ_NAME_SIZE+1]
Definition: ossimFfRevb.h:230
double theSemiMinorAxis
Definition: ossimFfRevb.h:242
int theUsgsMapZone
Definition: ossimFfRevb.h:232
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
int theSunElevation
Definition: ossimFfRevb.h:270
int theLinesPerImage
Definition: ossimFfRevb.h:245
char theVolumeNumber[VOLUME_NUMBER_SIZE+1]
Definition: ossimFfRevb.h:226
double theCenterEasting
Definition: ossimFfRevb.h:275
char theLlLon[LON_SIZE+1]
Definition: ossimFfRevb.h:262
int theBlockingFactor
Definition: ossimFfRevb.h:268
double theLlNorthing
Definition: ossimFfRevb.h:265
int errorStatus() const
Definition: ossimFfRevb.h:183
char theEllipsoid[ELLIPSOID_SIZE+1]
Definition: ossimFfRevb.h:240
double theOrientationAngle
Definition: ossimFfRevb.h:229
char theCenterLon[LON_SIZE+1]
Definition: ossimFfRevb.h:273
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
double theLrNorthing
Definition: ossimFfRevb.h:260
double theUrEasting
Definition: ossimFfRevb.h:254