OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimFfL7.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See LICENSE.txt file in the top level directory for more details.
4 //
5 // Author: Ken Melero
6 // Orginally written by Oscar Kramer (SoBe Software)
7 //
8 // Description: Container class for LandSat7 Fast Format header files.
9 //
10 //********************************************************************
11 // $Id: ossimFfL7.h 15766 2009-10-20 12:37:09Z gpotts $
12 
13 #ifndef ossimFfL7_HEADER
14 #define ossimFfL7_HEADER
15 
16 #include <vector>
17 #include <iostream>
18 
22 
23 #include <ossim/base/ossimString.h>
24 #include <ossim/base/ossimGpt.h>
25 #include <ossim/base/ossimIpt.h>
26 #include <ossim/base/ossimRefPtr.h>
27 
28 class ossimProperty;
29 class ossimDate;
30 
31 
32 // ***************************************************************************
33 // CLASS: ossimFfL7
34 // ***************************************************************************
35 
39 {
40  friend std::ostream& operator<<(std::ostream& os, const ossimFfL7& head);
41 
42 public:
43  ossimFfL7 ();
44  ossimFfL7 (const char* headerFile);
45 
46  void dump(std::ostream& os) const;
47  //> Provides a readable dump of this object.
48  //<
49  void writeHeader(std::ostream& os) const;
50  //> Writes the full header to the output stream in proper L7A format.
51  // NOT YET IMPLEMENTED
52  //<
53  int path() const;
54  //> Returns the path as an int.
55  // Currently uses the1stPathRowNumber string.
56  //<
57  int row() const;
58  //> Returns the row as an int from the pathRowString.
59  // Currently uses the1stPathRowNumber string.
60  //<
61  ossimString pathRow() const;
62  //> Returns a string represnting the path and row as a name.
63  // i.e.: PPP/RRFFSS will be returned as pPPPrRRFFSS
64  // This method will remove any spaces.
65  //<
66 
71  void getBias(vector<double>& bias) const;
72  double getBias(long bandIdx)const;
73 
78  void getGain(vector<double>& gain) const;
79  double getGain(long bandIdx)const;
80 
81  double getParam(ossim_uint32 i)const;
82 
83  virtual unsigned int getBandCount()const;
84 
85  long getJulianDay()const;
86 
88  ossimString getAcquisitionDate() const;
89 
94  void getAcquisitionDate(ossimDate& date)const;
95 
97  ossimString getSatelliteName() const;
98 
100  ossimFilename getBandFilename(ossim_uint32 idx)const;
101 
103  int getLinesPerBand() const;
104 
106  int getPixelsPerLine() const;
107 
112  void getSunElevation(double& elevation) const;
113 
118  void getSunAzimuth(double& azimuth) const;
119 
125  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
126 
131  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
132 
133  // The Admin Record:
134  char theRequestNumber[21]; // NNNYYMMDDSSSSUUUU
135  char theLocationCode[18]; // ppp/rrrffss
138  char theAcquisitionDate[20]; // yyyymmdd
139  char theSatName[11]; // "LANDSAT7"
140  char theSensorName[11]; // "ETM+"
141  char theSensorMode[7]; // "NORMAL"
142  double theOffNadirAngle; // degrees
143  char theProductType[19]; // "MAPbORIENTED"|"ORBITbORIENTED"
144  char theProductSize[11]; // ("FULLb"|"SUB"|"MULTI")+"SCENE"
145  char theProcessingType[12]; // "SYSTEMATIC"
146  char theResampAlgorithm[3]; // "CC"|"NN"|"MF"
150  double theGsd;
153  char theBandsPresentString[33];
154  char theBandFileNames[8][30];
155 
156  // The Radiometry Record:
157  vector<double> theBias;
158  vector<double> theGain;
159 
160  // The Geometry Record:
161  char theMapProjectionName[5];
162  char theEllipsoid[19]; // "WGS84"
163  char theDatum[7]; // "WGS84"
164  double theProjectionParams[15];
166 
172 
174 
175  int theHorizontalOffset; // pixels
176  double theOrientationAngle; // degrees
177  double theSunElevation; // degrees
178  double theSunAzimuth; // degrees
179 
180 protected:
181  virtual ~ossimFfL7();
182 
183 private:
184 
185  void initialize();
186  void readAdminRecord(FILE* fptr);
187  void readRadiomRecord(FILE* fptr);
188  void readGeomRecord(FILE* fptr);
189  int convertGeoPoint(FILE*, ossimGpt&);
190 
191 };
192 
193 #endif
vector< double > theBias
Definition: ossimFfL7.h:157
ossimGpt theUL_Corner
Definition: ossimFfL7.h:167
int theRowNumber
Definition: ossimFfL7.h:137
#define OSSIMDLLEXPORT
double theSunAzimuth
Definition: ossimFfL7.h:178
ossimGpt theUR_Corner
Definition: ossimFfL7.h:168
int theRecordSize
Definition: ossimFfL7.h:149
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
int theHorizontalOffset
Definition: ossimFfL7.h:175
ossimIpt theCenterImagePoint
Definition: ossimFfL7.h:173
int theLinesPerBand
Definition: ossimFfL7.h:148
double theSunElevation
Definition: ossimFfL7.h:177
ossimGpt theLR_Corner
Definition: ossimFfL7.h:169
unsigned int ossim_uint32
int theAcquiredBitsPerPixel
Definition: ossimFfL7.h:152
ossimGpt theCenterGP
Definition: ossimFfL7.h:171
ossimGpt theLL_Corner
Definition: ossimFfL7.h:170
int theUsgsMapZone
Definition: ossimFfL7.h:165
int thePathNumber
Definition: ossimFfL7.h:136
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
friend OSSIMDLLEXPORT std::ostream & operator<<(std::ostream &out, const ossimErrorStatusInterface &obj)
double theOffNadirAngle
Definition: ossimFfL7.h:142
double theGsd
Definition: ossimFfL7.h:150
int thePixelsPerLine
Definition: ossimFfL7.h:147
int theOutputBitsPerPixel
Definition: ossimFfL7.h:151
vector< double > theGain
Definition: ossimFfL7.h:158
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
double theOrientationAngle
Definition: ossimFfL7.h:176