OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Classes | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
ossimFfRevc Class Reference

#include <ossimFfRevc.h>

Classes

class  AdminRecord
 
class  GeoRecord
 
class  RadiomRecord
 

Public Types

enum  ErrorStatus { OSSIM_OK = 0, OSSIM_ERROR = 1 }
 
enum  { NUMBER_OF_BANDS = 8, NUMBER_OF_SCENES = 4, NUMBER_OF_PROJECTION_PARAMETERS = 15 }
 
enum  {
  PRODUCT_ORDER_NUMBER_DESC_SIZE = 12, PRODUCT_ORDER_NUMBER_SIZE = 11, LOCATION_DESC_SIZE = 11, PATH_ROW_NUMBER_SIZE = 17,
  DATE_DESC_SIZE = 19, DATE_SIZE = 8, SAT_NAME_DESC_SIZE = 11, SAT_NAME_SIZE = 10,
  SENSOR_NAME_DESC_SIZE = 9, SENSOR_NAME_SIZE = 10, SENSOR_MODE_DESC_SIZE = 14, SENSOR_MODE_SIZE = 6,
  LOOK_ANGLE_DESC_SIZE = 13, OFF_NADIR_ANGLE_SIZE = 6, PRODUCT_TYPE_DESC_SIZE = 14, PRODUCT_TYPE_SIZE = 18,
  PRODUCT_SIZE_DESC_SIZE = 15, PRODUCT_SIZE_SIZE = 10, PROCESSING_TYPE_DESC_SIZE = 20, PROCESSING_TYPE_SIZE = 11,
  RESAMPLING_ALGO_DESC_SIZE = 13, RESAMPLING_ALGO_SIZE = 2, TAPE_VOLUME_NUMBER_DESC_SIZE = 19, TAPE_VOLUME_NUMBER_SIZE = 2,
  VOLUMES_PER_TAPE_SIZE = 2, PIXELS_PER_LINE_DESC_SIZE = 18, PIXELS_PER_LINE_SIZE = 5, LINES_PER_IMAGE_DESC_SIZE = 17,
  LINES_PER_IMAGE_SIZE = 5, FIRST_LINE_DESC_SIZE = 14, FIRST_LINE_IN_VOLUME_SIZE = 5, BLOCKING_FACTOR_DESC_SIZE = 18,
  BLOCKING_FACTOR_SIZE = 2, RECORD_LENGTH_DESC_SIZE = 16, RECORD_LENGTH_SIZE = 5, PIXEL_GSD_DESC_SIZE = 13,
  PIXEL_GSD_SIZE = 6, BITS_PER_PIXEL_DESC_SIZE = 23, BITS_PER_PIXEL_SIZE = 2, AQUIRED_BITS_PER_PIXEL_DESC_SIZE = 26,
  BANDS_PRESENT_DESC_SIZE = 15, BANDS_PRESENT_SIZE = 33, REV_DESC_SIZE = 15, FORMAT_VERSION_SIZE = 1,
  BIAS_GAIN_DESC_SIZE = 50, BIAS_SIZE = 24, GAIN_SIZE = 24, GEO_DESC_SIZE = 14,
  MAP_PROJECTION_NAME_DESC_SIZE = 17, MAP_PROJECTION_NAME_SIZE = 4, ELLIPSOID_DESC_SIZE = 12, ELLIPSOID_SIZE = 18,
  DATUM_DESC_SIZE = 8, DATUM_SIZE = 6, PROJECTION_PARAMETER_DESC_SIZE = 28, PROJECTION_PARAMETER_SIZE = 24,
  CORNER_DESC_SIZE = 4, CENTER_DESC_SIZE = 8, LON_SIZE = 13, LAT_SIZE = 12,
  EASTING_SIZE = 13, NORTHING_SIZE = 13, CENTER_SAMPLE_SIZE = 5, CENTER_LINE_SIZE = 5,
  HORIZONTAL_OFFSET_DESC_SIZE = 8, HORIZONTAL_OFFSET_SIZE = 6, ORIENTATION_ANGLE_DESC_SIZE = 20, ORIENTATION_ANGLE_SIZE = 6,
  SUN_ELEVATION_DESC_SIZE = 21, SUN_ELEVATION_SIZE = 4, SUN_AZIMUTH_DESC_SIZE = 20, SUN_AZIMUTH_SIZE = 5
}
 
enum  {
  PRODUCT_ORDER_NUMBER_OFFSET = 12, PRODUCT_TYPE_OFFSET = 654, PRODUCT_SIZE_OFFSET = 687, PROCESSING_TYPE_OFFSET = 740,
  RESAMPLING_ALGO_OFFSET = 764, TAPE_VOLUME_NUMBER_OFFSET = 819, VOLUMES_PER_TAPE_OFFSET = 822, PIXELS_PER_LINE_OFFSET = 842,
  LINES_PER_IMAGE_OFFSET = 864, FIRST_LINE_IN_VOLUME_OFFSET = 894, BLOCKING_FACTOR_OFFSET = 917, RECORD_LENGTH_OFFSET = 935,
  PIXEL_GSD_OFFSET = 954, BITS_PER_PIXEL_OFFSET = 983, ACQUIRED_BITS_PER_PIXEL_OFFSET = 1011, BANDS_PRESENT_OFFSET = 1055,
  FORMAT_VERSION_OFFSET = 1535, MAP_PROJECTION_NAME_OFFSET = 3103, ELLIPSOID_OFFSET = 3119, DATUM_OFFSET = 3145,
  UL_LON_OFFSET = 3637, UL_LAT_OFFSET = 3651, UL_EASTING_OFFSET = 3664, UL_NORTHING_OFFSET = 3678,
  UR_LON_OFFSET = 3717, UR_LAT_OFFSET = 3731, UR_EASTING_OFFSET = 3744, UR_NORTHING_OFFSET = 3758,
  LR_LON_OFFSET = 3797, LR_LAT_OFFSET = 3811, LR_EASTING_OFFSET = 3824, LR_NORTHING_OFFSET = 3838,
  LL_LON_OFFSET = 3877, LL_LAT_OFFSET = 3891, LL_EASTING_OFFSET = 3904, LL_NORTHING_OFFSET = 3918,
  CENTER_LON_OFFSET = 3961, CENTER_LAT_OFFSET = 3975, CENTER_EASTING_OFFSET = 3988, CENTER_NORTHING_OFFSET = 4002,
  CENTER_SAMPLE_OFFSET = 4016, CENTER_LINE_OFFSET = 4022, HORIZONTAL_OFFSET_OFFSET = 4040, ORIENTATION_ANGLE_OFFSET = 4066,
  SUN_ELEVATION_OFFSET = 4133, SUN_AZIMUTH_OFFSET = 4157
}
 

Public Member Functions

 ossimFfRevc ()
 
 ossimFfRevc (const char *headerFile)
 
 ~ossimFfRevc ()
 
int errorStatus () const
 
void print (std::ostream &os) const
 
void write (std::ostream &os) const
 
int path (int sceneNbr=0) const
 
int row (int sceneNbr=0) const
 
int fraction (int sceneNbr=0) const
 
ossimString subScene (int sceneNbr=0) const
 
ossimString pathRow (int sceneNbr=0) const
 

Public Attributes

AdminRecord theAdminRecord
 
RadiomRecord theRadiomRecord
 
GeoRecord theGeoRecord
 

Private Member Functions

void loadFromStream (ossim::istream &is)
 
int checkStream (ossim::istream &is)
 

Private Attributes

ErrorStatus theErrorStatus
 

Friends

std::ostream & operator<< (std::ostream &os, const ossimFfRevc &head)
 

Detailed Description

Definition at line 24 of file ossimFfRevc.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUMBER_OF_BANDS 
NUMBER_OF_SCENES 
NUMBER_OF_PROJECTION_PARAMETERS 

Definition at line 46 of file ossimFfRevc.h.

◆ anonymous enum

anonymous enum
Enumerator
PRODUCT_ORDER_NUMBER_DESC_SIZE 
PRODUCT_ORDER_NUMBER_SIZE 
LOCATION_DESC_SIZE 
PATH_ROW_NUMBER_SIZE 
DATE_DESC_SIZE 
DATE_SIZE 
SAT_NAME_DESC_SIZE 
SAT_NAME_SIZE 
SENSOR_NAME_DESC_SIZE 
SENSOR_NAME_SIZE 
SENSOR_MODE_DESC_SIZE 
SENSOR_MODE_SIZE 
LOOK_ANGLE_DESC_SIZE 
OFF_NADIR_ANGLE_SIZE 
PRODUCT_TYPE_DESC_SIZE 
PRODUCT_TYPE_SIZE 
PRODUCT_SIZE_DESC_SIZE 
PRODUCT_SIZE_SIZE 
PROCESSING_TYPE_DESC_SIZE 
PROCESSING_TYPE_SIZE 
RESAMPLING_ALGO_DESC_SIZE 
RESAMPLING_ALGO_SIZE 
TAPE_VOLUME_NUMBER_DESC_SIZE 
TAPE_VOLUME_NUMBER_SIZE 
VOLUMES_PER_TAPE_SIZE 
PIXELS_PER_LINE_DESC_SIZE 
PIXELS_PER_LINE_SIZE 
LINES_PER_IMAGE_DESC_SIZE 
LINES_PER_IMAGE_SIZE 
FIRST_LINE_DESC_SIZE 
FIRST_LINE_IN_VOLUME_SIZE 
BLOCKING_FACTOR_DESC_SIZE 
BLOCKING_FACTOR_SIZE 
RECORD_LENGTH_DESC_SIZE 
RECORD_LENGTH_SIZE 
PIXEL_GSD_DESC_SIZE 
PIXEL_GSD_SIZE 
BITS_PER_PIXEL_DESC_SIZE 
BITS_PER_PIXEL_SIZE 
AQUIRED_BITS_PER_PIXEL_DESC_SIZE 
BANDS_PRESENT_DESC_SIZE 
BANDS_PRESENT_SIZE 
REV_DESC_SIZE 
FORMAT_VERSION_SIZE 
BIAS_GAIN_DESC_SIZE 
BIAS_SIZE 
GAIN_SIZE 
GEO_DESC_SIZE 
MAP_PROJECTION_NAME_DESC_SIZE 
MAP_PROJECTION_NAME_SIZE 
ELLIPSOID_DESC_SIZE 
ELLIPSOID_SIZE 
DATUM_DESC_SIZE 
DATUM_SIZE 
PROJECTION_PARAMETER_DESC_SIZE 
PROJECTION_PARAMETER_SIZE 
CORNER_DESC_SIZE 
CENTER_DESC_SIZE 
LON_SIZE 
LAT_SIZE 
EASTING_SIZE 
NORTHING_SIZE 
CENTER_SAMPLE_SIZE 
CENTER_LINE_SIZE 
HORIZONTAL_OFFSET_DESC_SIZE 
HORIZONTAL_OFFSET_SIZE 
ORIENTATION_ANGLE_DESC_SIZE 
ORIENTATION_ANGLE_SIZE 
SUN_ELEVATION_DESC_SIZE 
SUN_ELEVATION_SIZE 
SUN_AZIMUTH_DESC_SIZE 
SUN_AZIMUTH_SIZE 

Definition at line 53 of file ossimFfRevc.h.

54  {
55  // Adminstrative record:
58  LOCATION_DESC_SIZE = 11,
60  DATE_DESC_SIZE = 19,
61  DATE_SIZE = 8,
62  SAT_NAME_DESC_SIZE = 11,
63  SAT_NAME_SIZE = 10,
65  SENSOR_NAME_SIZE = 10,
67  SENSOR_MODE_SIZE = 6,
71  PRODUCT_TYPE_SIZE = 18,
73  PRODUCT_SIZE_SIZE = 10,
92  PIXEL_GSD_SIZE = 6,
94  BITS_PER_PIXEL_SIZE = 2, // Output and Acquired
97  BANDS_PRESENT_SIZE = 33,
98  REV_DESC_SIZE = 15,
100  // Radiometric record:
101  BIAS_GAIN_DESC_SIZE = 50,
102  BIAS_SIZE = 24,
103  GAIN_SIZE = 24,
104  // Geometric record:
105  GEO_DESC_SIZE = 14,
108  ELLIPSOID_DESC_SIZE = 12,
109  ELLIPSOID_SIZE = 18,
110  DATUM_DESC_SIZE = 8,
111  DATUM_SIZE = 6,
114  CORNER_DESC_SIZE = 4,
115  CENTER_DESC_SIZE = 8,
116  LON_SIZE = 13,
117  LAT_SIZE = 12,
118  EASTING_SIZE = 13,
119  NORTHING_SIZE = 13,
120  CENTER_SAMPLE_SIZE = 5,
121  CENTER_LINE_SIZE = 5,
127  SUN_ELEVATION_SIZE = 4,
129  SUN_AZIMUTH_SIZE = 5
130  };

◆ anonymous enum

anonymous enum
Enumerator
PRODUCT_ORDER_NUMBER_OFFSET 
PRODUCT_TYPE_OFFSET 
PRODUCT_SIZE_OFFSET 
PROCESSING_TYPE_OFFSET 
RESAMPLING_ALGO_OFFSET 
TAPE_VOLUME_NUMBER_OFFSET 
VOLUMES_PER_TAPE_OFFSET 
PIXELS_PER_LINE_OFFSET 
LINES_PER_IMAGE_OFFSET 
FIRST_LINE_IN_VOLUME_OFFSET 
BLOCKING_FACTOR_OFFSET 
RECORD_LENGTH_OFFSET 
PIXEL_GSD_OFFSET 
BITS_PER_PIXEL_OFFSET 
ACQUIRED_BITS_PER_PIXEL_OFFSET 
BANDS_PRESENT_OFFSET 
FORMAT_VERSION_OFFSET 
MAP_PROJECTION_NAME_OFFSET 
ELLIPSOID_OFFSET 
DATUM_OFFSET 
UL_LON_OFFSET 
UL_LAT_OFFSET 
UL_EASTING_OFFSET 
UL_NORTHING_OFFSET 
UR_LON_OFFSET 
UR_LAT_OFFSET 
UR_EASTING_OFFSET 
UR_NORTHING_OFFSET 
LR_LON_OFFSET 
LR_LAT_OFFSET 
LR_EASTING_OFFSET 
LR_NORTHING_OFFSET 
LL_LON_OFFSET 
LL_LAT_OFFSET 
LL_EASTING_OFFSET 
LL_NORTHING_OFFSET 
CENTER_LON_OFFSET 
CENTER_LAT_OFFSET 
CENTER_EASTING_OFFSET 
CENTER_NORTHING_OFFSET 
CENTER_SAMPLE_OFFSET 
CENTER_LINE_OFFSET 
HORIZONTAL_OFFSET_OFFSET 
ORIENTATION_ANGLE_OFFSET 
SUN_ELEVATION_OFFSET 
SUN_AZIMUTH_OFFSET 

Definition at line 138 of file ossimFfRevc.h.

139  {
140  // Administrative record: bytes 0 - 1535
142  PRODUCT_TYPE_OFFSET = 654,
143  PRODUCT_SIZE_OFFSET = 687,
152  RECORD_LENGTH_OFFSET = 935,
153  PIXEL_GSD_OFFSET = 954,
154  BITS_PER_PIXEL_OFFSET = 983,
156  BANDS_PRESENT_OFFSET = 1055,
157  FORMAT_VERSION_OFFSET = 1535,
158  // Radiometric record: bytes 1536 - 3071
159  // See file scope constants for bias and gain OFFSET positions.
160  // Geometric record: bytes 3072 - 4607
162  ELLIPSOID_OFFSET = 3119,
163  DATUM_OFFSET = 3145,
164  UL_LON_OFFSET = 3637,
165  UL_LAT_OFFSET = 3651,
166  UL_EASTING_OFFSET = 3664,
167  UL_NORTHING_OFFSET = 3678,
168  UR_LON_OFFSET = 3717,
169  UR_LAT_OFFSET = 3731,
170  UR_EASTING_OFFSET = 3744,
171  UR_NORTHING_OFFSET = 3758,
172  LR_LON_OFFSET = 3797,
173  LR_LAT_OFFSET = 3811,
174  LR_EASTING_OFFSET = 3824,
175  LR_NORTHING_OFFSET = 3838,
176  LL_LON_OFFSET = 3877,
177  LL_LAT_OFFSET = 3891,
178  LL_EASTING_OFFSET = 3904,
179  LL_NORTHING_OFFSET = 3918,
180  CENTER_LON_OFFSET = 3961,
181  CENTER_LAT_OFFSET = 3975,
182  CENTER_EASTING_OFFSET = 3988,
183  CENTER_NORTHING_OFFSET = 4002,
184  CENTER_SAMPLE_OFFSET = 4016,
185  CENTER_LINE_OFFSET = 4022,
187  ORIENTATION_ANGLE_OFFSET = 4066,
188  SUN_ELEVATION_OFFSET = 4133,
189  SUN_AZIMUTH_OFFSET = 4157
190  };

◆ ErrorStatus

Enumerator
OSSIM_OK 
OSSIM_ERROR 

Definition at line 31 of file ossimFfRevc.h.

Constructor & Destructor Documentation

◆ ossimFfRevc() [1/2]

ossimFfRevc::ossimFfRevc ( )

Definition at line 95 of file ossimFfRevc.cpp.

96  :
99  theGeoRecord(),
101 { }
RadiomRecord theRadiomRecord
Definition: ossimFfRevc.h:299
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
ErrorStatus theErrorStatus
Definition: ossimFfRevc.h:343
GeoRecord theGeoRecord
Definition: ossimFfRevc.h:300

◆ ossimFfRevc() [2/2]

ossimFfRevc::ossimFfRevc ( const char *  headerFile)

Definition at line 109 of file ossimFfRevc.cpp.

References ossim::StreamFactoryRegistry::instance(), loadFromStream(), OSSIM_ERROR, ossimNotify(), ossimNotifyLevel_FATAL, and theErrorStatus.

110  :
112 {
113  std::shared_ptr<ossim::istream> is = ossim::StreamFactoryRegistry::instance()->
114  createIstream(ossimString(headerFile), std::ios_base::in);
115 
116  if (!is)
117  {
119 
120  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimFfRevc::ossimFfRevc(header): "
121  << "Cannot open: " << headerFile << "\n"
122  << "Returning from constructor." << std::endl;
123 
124  return;
125  }
126 
127  loadFromStream( *is );
128 }
void loadFromStream(ossim::istream &is)
static StreamFactoryRegistry * instance()
ErrorStatus theErrorStatus
Definition: ossimFfRevc.h:343
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ~ossimFfRevc()

ossimFfRevc::~ossimFfRevc ( )
inline

Definition at line 29 of file ossimFfRevc.h.

29 {};

Member Function Documentation

◆ checkStream()

int ossimFfRevc::checkStream ( ossim::istream is)
private

Definition at line 1519 of file ossimFfRevc.cpp.

References OSSIM_ERROR, ossimNotify(), ossimNotifyLevel_FATAL, and theErrorStatus.

Referenced by loadFromStream().

1520 {
1521  //***
1522  // istreams set fault bits and the operator! is overloaded to return
1523  // true if an error has occurred.
1524  //***
1525 
1526  if (!is)
1527  {
1529 
1530  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimFfRevc::checkStream: "
1531  << "Stream corrupted. Returning from method."
1532  << std::endl;
1533  }
1534 
1535  return theErrorStatus;
1536 }
ErrorStatus theErrorStatus
Definition: ossimFfRevc.h:343
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ errorStatus()

int ossimFfRevc::errorStatus ( ) const
inline

Definition at line 302 of file ossimFfRevc.h.

References theErrorStatus.

302 { return theErrorStatus; }
ErrorStatus theErrorStatus
Definition: ossimFfRevc.h:343

◆ fraction()

int ossimFfRevc::fraction ( int  sceneNbr = 0) const

Definition at line 190 of file ossimFfRevc.cpp.

References theAdminRecord, and ossimFfRevc::AdminRecord::thePathRowNumber.

191 {
192  char tmpBuff[3];
193  int fraction = 0;
194 
196 
197  if (is)
198  {
199  is.seekg(7, std::ios_base::beg);
200  is.get(tmpBuff, 3);
201  fraction = atoi(tmpBuff);
202  }
203 
204  return fraction;
205 }
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
int fraction(int sceneNbr=0) const
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ loadFromStream()

void ossimFfRevc::loadFromStream ( ossim::istream is)
private

Definition at line 1022 of file ossimFfRevc.cpp.

References ACQUIRED_BITS_PER_PIXEL_OFFSET, BANDS_PRESENT_OFFSET, BANDS_PRESENT_SIZE, BIAS_OFFSET, BIAS_SIZE, BITS_PER_PIXEL_OFFSET, BITS_PER_PIXEL_SIZE, BLOCKING_FACTOR_OFFSET, BLOCKING_FACTOR_SIZE, checkStream(), DATE_OFFSET, DATE_SIZE, DATUM_OFFSET, DATUM_SIZE, ELLIPSOID_OFFSET, ELLIPSOID_SIZE, FIRST_LINE_IN_VOLUME_OFFSET, FIRST_LINE_IN_VOLUME_SIZE, FORMAT_VERSION_OFFSET, FORMAT_VERSION_SIZE, GAIN_OFFSET, GAIN_SIZE, LINES_PER_IMAGE_OFFSET, LINES_PER_IMAGE_SIZE, MAP_PROJECTION_NAME_OFFSET, MAP_PROJECTION_NAME_SIZE, NUMBER_OF_BANDS, NUMBER_OF_SCENES, OFF_NADIR_ANGLE_OFFSET, OFF_NADIR_ANGLE_SIZE, PATH_ROW_NUMBER_OFFSET, PATH_ROW_NUMBER_SIZE, PIXEL_GSD_OFFSET, PIXEL_GSD_SIZE, PIXELS_PER_LINE_OFFSET, PIXELS_PER_LINE_SIZE, PROCESSING_TYPE_OFFSET, PROCESSING_TYPE_SIZE, PRODUCT_ORDER_NUMBER_OFFSET, PRODUCT_ORDER_NUMBER_SIZE, PRODUCT_SIZE_OFFSET, PRODUCT_SIZE_SIZE, PRODUCT_TYPE_OFFSET, PRODUCT_TYPE_SIZE, RECORD_LENGTH_OFFSET, RECORD_LENGTH_SIZE, RESAMPLING_ALGO_OFFSET, RESAMPLING_ALGO_SIZE, SAT_NAME_OFFSET, SAT_NAME_SIZE, SENSOR_MODE_OFFSET, SENSOR_MODE_SIZE, SENSOR_NAME_OFFSET, SENSOR_NAME_SIZE, TAPE_VOLUME_NUMBER_OFFSET, TAPE_VOLUME_NUMBER_SIZE, ossimFfRevc::AdminRecord::the1stLineInVolume, ossimFfRevc::AdminRecord::theAcquiredBitsPerPixel, ossimFfRevc::AdminRecord::theAcquisitionDate, theAdminRecord, ossimFfRevc::AdminRecord::theBandsPresentString, ossimFfRevc::RadiomRecord::theBias, ossimFfRevc::GeoRecord::theDatum, ossimFfRevc::GeoRecord::theEllipsoid, ossimFfRevc::AdminRecord::theFormatVersion, ossimFfRevc::RadiomRecord::theGain, theGeoRecord, ossimFfRevc::AdminRecord::theGsd, ossimFfRevc::AdminRecord::theLinesPerImage, ossimFfRevc::GeoRecord::theMapProjectionName, ossimFfRevc::AdminRecord::theNumberVolumesPerTape, ossimFfRevc::AdminRecord::theOffNadirAngle, ossimFfRevc::AdminRecord::theOutputBitsPerPixel, ossimFfRevc::AdminRecord::thePathRowNumber, ossimFfRevc::AdminRecord::thePixelsPerLine, ossimFfRevc::AdminRecord::theProcessingType, ossimFfRevc::AdminRecord::theProductOrderNumber, ossimFfRevc::AdminRecord::theProductSize, ossimFfRevc::AdminRecord::theProductType, theRadiomRecord, ossimFfRevc::AdminRecord::theRecordSize, ossimFfRevc::AdminRecord::theResampAlgorithm, ossimFfRevc::AdminRecord::theSatName, ossimFfRevc::AdminRecord::theSensorMode, ossimFfRevc::AdminRecord::theSensorName, ossimFfRevc::AdminRecord::theTapeBlockingFactor, ossimFfRevc::AdminRecord::theTapeVolumeNumber, VOLUMES_PER_TAPE_OFFSET, and VOLUMES_PER_TAPE_SIZE.

Referenced by ossimFfRevc().

1023 {
1024  //***
1025  // See .h for enumerations for field sizes and offsets.
1026  //***
1027 
1028  //***
1029  // NOTE: Because of header inconsistencies all seeks will be relative to
1030  // the beginning of the stream.
1031  //***
1032 
1033  //***
1034  // Temporary buffer for fields that need to be converted to integers or
1035  // floats.
1036  //***
1037 
1038  char tmpBuff[25];
1039 
1040  //***
1041  // Start of administrative record.
1042  //***
1043 
1044  is.seekg(PRODUCT_ORDER_NUMBER_OFFSET, std::ios_base::beg);
1045 
1048  ' ');
1049 
1050  if (checkStream(is)) return;
1051 
1052  //***
1053  // Loop through the four scenes and get the data.
1054  //***
1055 
1056  int i;
1057  for (i = 0; i < NUMBER_OF_SCENES; i++)
1058  {
1059 
1060  is.seekg(PATH_ROW_NUMBER_OFFSET[i], std::ios_base::beg);
1061 
1063 
1064  if (checkStream(is)) return;
1065 
1066  is.seekg(DATE_OFFSET[i], std::ios_base::beg);
1067 
1069 
1070  if (checkStream(is)) return;
1071 
1072  is.seekg(SAT_NAME_OFFSET[i], std::ios_base::beg);
1073 
1074  is.get(theAdminRecord.theSatName[i], SAT_NAME_SIZE + 1);
1075 
1076  if (checkStream(is)) return;
1077 
1078  is.seekg(SENSOR_NAME_OFFSET[i], std::ios_base::beg);
1079 
1081 
1082  if (checkStream(is)) return;
1083 
1084  is.seekg(SENSOR_MODE_OFFSET[i], std::ios_base::beg);
1085 
1087 
1088  if (checkStream(is)) return;
1089 
1090  is.seekg(OFF_NADIR_ANGLE_OFFSET[i], std::ios_base::beg);
1091 
1092  is.get(tmpBuff, OFF_NADIR_ANGLE_SIZE + 1);
1093 
1094  if (checkStream(is)) return;
1095 
1096  theAdminRecord.theOffNadirAngle[i] = atof(tmpBuff);
1097 
1098  } // End of scene loop.
1099 
1100  is.seekg(PRODUCT_TYPE_OFFSET, std::ios_base::beg);
1101 
1103 
1104  if (checkStream(is)) return;
1105 
1106  is.seekg(PRODUCT_SIZE_OFFSET, std::ios_base::beg);
1107 
1109 
1110  if (checkStream(is)) return;
1111 
1112  is.seekg(PROCESSING_TYPE_OFFSET, std::ios_base::beg);
1113 
1115 
1116  if (checkStream(is)) return;
1117 
1118  is.seekg(RESAMPLING_ALGO_OFFSET, std::ios_base::beg);
1119 
1121 
1122  if (checkStream(is)) return;
1123 
1124  is.seekg(TAPE_VOLUME_NUMBER_OFFSET, std::ios_base::beg);
1125 
1126  is.get(tmpBuff, TAPE_VOLUME_NUMBER_SIZE + 1, '/');
1127 
1128  if (checkStream(is)) return;
1129 
1130  theAdminRecord.theTapeVolumeNumber = atoi(tmpBuff);
1131 
1132  is.seekg(VOLUMES_PER_TAPE_OFFSET, std::ios_base::beg);
1133 
1134  is.get(tmpBuff, VOLUMES_PER_TAPE_SIZE + 1);
1135 
1136  if (checkStream(is)) return;
1137 
1138  theAdminRecord.theNumberVolumesPerTape = atoi(tmpBuff);
1139 
1140  is.seekg(PIXELS_PER_LINE_OFFSET, std::ios_base::beg);
1141 
1142  is.get(tmpBuff, PIXELS_PER_LINE_SIZE + 1);
1143 
1144  if (checkStream(is)) return;
1145 
1146  theAdminRecord.thePixelsPerLine = atoi(tmpBuff);
1147 
1148  is.seekg(LINES_PER_IMAGE_OFFSET, std::ios_base::beg);
1149 
1150  is.get(tmpBuff, LINES_PER_IMAGE_SIZE + 1);
1151 
1152  if (checkStream(is)) return;
1153 
1154  theAdminRecord.theLinesPerImage = atoi(tmpBuff);
1155 
1156  is.seekg(FIRST_LINE_IN_VOLUME_OFFSET, std::ios_base::beg);
1157 
1158  is.get(tmpBuff, FIRST_LINE_IN_VOLUME_SIZE + 1);
1159 
1160  if (checkStream(is)) return;
1161 
1162  theAdminRecord.the1stLineInVolume = atoi(tmpBuff);
1163 
1164  is.seekg(BLOCKING_FACTOR_OFFSET, std::ios_base::beg);
1165 
1166  is.get(tmpBuff, BLOCKING_FACTOR_SIZE + 1);
1167 
1168  if (checkStream(is)) return;
1169 
1170  theAdminRecord.theTapeBlockingFactor = atoi(tmpBuff);
1171 
1172  is.seekg(RECORD_LENGTH_OFFSET, std::ios_base::beg);
1173 
1174  is.get(tmpBuff, RECORD_LENGTH_SIZE + 1);
1175 
1176  if (checkStream(is)) return;
1177 
1178  theAdminRecord.theRecordSize = atoi(tmpBuff);
1179 
1180  is.seekg(PIXEL_GSD_OFFSET, std::ios_base::beg);
1181 
1182  is.get(tmpBuff, PIXEL_GSD_SIZE + 1);
1183 
1184  if (checkStream(is)) return;
1185 
1186  theAdminRecord.theGsd = atof(tmpBuff);
1187 
1188  is.seekg(BITS_PER_PIXEL_OFFSET, std::ios_base::beg);
1189 
1190  is.get(tmpBuff, BITS_PER_PIXEL_SIZE + 1);
1191 
1192  if (checkStream(is)) return;
1193 
1194  theAdminRecord.theOutputBitsPerPixel = atoi(tmpBuff);
1195 
1196  is.seekg(ACQUIRED_BITS_PER_PIXEL_OFFSET, std::ios_base::beg);
1197 
1198  is.get(tmpBuff, BITS_PER_PIXEL_SIZE + 1);
1199 
1200  if (checkStream(is)) return;
1201 
1202  theAdminRecord.theAcquiredBitsPerPixel = atoi(tmpBuff);
1203 
1204  is.seekg(BANDS_PRESENT_OFFSET, std::ios_base::beg);
1205 
1207 
1208  if (checkStream(is)) return;
1209 
1210  is.seekg(FORMAT_VERSION_OFFSET, std::ios_base::beg);
1211 
1213 
1214  if (checkStream(is)) return;
1215  //***
1216  // End of administrative record.
1217  //***
1218 
1219  //***
1220  // Start of radiometric record.
1221  //***
1222 
1223  for (i = 0; i < NUMBER_OF_BANDS; i++)
1224  {
1225  is.seekg(BIAS_OFFSET[i], std::ios_base::beg);
1226 
1227  is.get(tmpBuff, BIAS_SIZE + 1);
1228 
1229  if (checkStream(is)) return;
1230 
1231  theRadiomRecord.theBias[i] = atof(tmpBuff);
1232 
1233  is.seekg(GAIN_OFFSET[i], std::ios_base::beg);
1234 
1235  is.get(tmpBuff, GAIN_SIZE + 1);
1236 
1237  if (checkStream(is)) return;
1238 
1239  theRadiomRecord.theGain[i] = atof(tmpBuff);
1240  }
1241  //***
1242  // End of radiometric record.
1243  //***
1244 
1245  //***
1246  // Start of geometric record.
1247  //***
1248 
1249  is.seekg(MAP_PROJECTION_NAME_OFFSET, std::ios_base::beg);
1250 
1252 
1253  if (checkStream(is)) return;
1254 
1255  is.seekg(ELLIPSOID_OFFSET, std::ios_base::beg);
1256 
1258 
1259  if (checkStream(is)) return;
1260 
1261  is.seekg(DATUM_OFFSET, std::ios_base::beg);
1262 
1263  is.get(theGeoRecord.theDatum, DATUM_SIZE + 1, ' ');
1264 
1265  if (checkStream(is)) return;
1266 
1267  //***
1268  // Get the fifteen projection parameters.
1269  //***
1270 
1271  for(i = 0; i < 15; i++)
1272  {
1273  is.seekg(PROJ_PARAM_OFFSET[i], std::ios_base::beg);
1274 
1275  is.get(tmpBuff, PROJECTION_PARAMETER_SIZE + 1);
1276 
1277  if (checkStream(is)) return;
1278 
1279  theGeoRecord.theProjectionParams[i] = atof(tmpBuff);
1280  }
1281 
1282  //***
1283  // Start of upper left data: longitude, latitude, easting, and northing.
1284  //***
1285  is.seekg(UL_LON_OFFSET, std::ios_base::beg);
1286 
1287  is.get(theGeoRecord.theUlLon, LON_SIZE + 1);
1288 
1289  if (checkStream(is)) return;
1290 
1291  is.seekg(UL_LAT_OFFSET, std::ios_base::beg);
1292 
1293  is.get(theGeoRecord.theUlLat, LAT_SIZE + 1);
1294 
1295  if (checkStream(is)) return;
1296 
1297  is.seekg(UL_EASTING_OFFSET, std::ios_base::beg);
1298 
1299  is.get(tmpBuff, EASTING_SIZE + 1);
1300 
1301  if (checkStream(is)) return;
1302 
1303  theGeoRecord.theUlEasting = atof(tmpBuff);
1304 
1305  is.seekg(UL_NORTHING_OFFSET, std::ios_base::beg);
1306 
1307  is.get(tmpBuff, NORTHING_SIZE + 1);
1308 
1309  if (checkStream(is)) return;
1310 
1311  theGeoRecord.theUlNorthing = atof(tmpBuff);
1312 
1313  //***
1314  // End of upper left data.
1315  //***
1316 
1317  //***
1318  // Start of upper right data: longitude, latitude, easting, and northing.
1319  //***
1320  is.seekg(UR_LON_OFFSET, std::ios_base::beg);
1321 
1322  is.get(theGeoRecord.theUrLon, LON_SIZE + 1);
1323 
1324  if (checkStream(is)) return;
1325 
1326  is.seekg(UR_LAT_OFFSET, std::ios_base::beg);
1327 
1328  is.get(theGeoRecord.theUrLat, LAT_SIZE + 1);
1329 
1330  if (checkStream(is)) return;
1331 
1332  is.seekg(UR_EASTING_OFFSET, std::ios_base::beg);
1333 
1334  is.get(tmpBuff, EASTING_SIZE + 1);
1335 
1336  if (checkStream(is)) return;
1337 
1338  theGeoRecord.theUrEasting = atof(tmpBuff);
1339 
1340  is.seekg(UR_NORTHING_OFFSET, std::ios_base::beg);
1341 
1342  is.get(tmpBuff, NORTHING_SIZE + 1);
1343 
1344  if (checkStream(is)) return;
1345 
1346  theGeoRecord.theUrNorthing = atof(tmpBuff);
1347 
1348  //***
1349  // End of upper right data.
1350  //***
1351 
1352  //***
1353  // Start of lower right data: longitude, latitude, easting, and northing.
1354  //***
1355  is.seekg(LR_LON_OFFSET, std::ios_base::beg);
1356 
1357  is.get(theGeoRecord.theLrLon, LON_SIZE + 1);
1358 
1359  if (checkStream(is)) return;
1360 
1361  is.seekg(LR_LAT_OFFSET, std::ios_base::beg);
1362 
1363  is.get(theGeoRecord.theLrLat, LAT_SIZE + 1);
1364 
1365  if (checkStream(is)) return;
1366 
1367  is.seekg(LR_EASTING_OFFSET, std::ios_base::beg);
1368 
1369  is.get(tmpBuff, EASTING_SIZE + 1);
1370 
1371  if (checkStream(is)) return;
1372 
1373  theGeoRecord.theLrEasting = atof(tmpBuff);
1374 
1375  is.seekg(LR_NORTHING_OFFSET, std::ios_base::beg);
1376 
1377  is.get(tmpBuff, NORTHING_SIZE + 1);
1378 
1379  if (checkStream(is)) return;
1380 
1381  theGeoRecord.theLrNorthing = atof(tmpBuff);
1382 
1383  //***
1384  // End of lower right data.
1385  //***
1386 
1387  //***
1388  // Start of lower left data: longitude, latitude, easting, and northing.
1389  //***
1390  is.seekg(LL_LON_OFFSET, std::ios_base::beg);
1391 
1392  is.get(theGeoRecord.theLlLon, LON_SIZE + 1);
1393 
1394  if (checkStream(is)) return;
1395 
1396  is.seekg(LL_LAT_OFFSET, std::ios_base::beg);
1397 
1398  is.get(theGeoRecord.theLlLat, LAT_SIZE + 1);
1399 
1400  if (checkStream(is)) return;
1401 
1402  is.seekg(LL_EASTING_OFFSET, std::ios_base::beg);
1403 
1404  is.get(tmpBuff, EASTING_SIZE + 1);
1405 
1406  if (checkStream(is)) return;
1407 
1408  theGeoRecord.theLlEasting = atof(tmpBuff);
1409 
1410  is.seekg(LL_NORTHING_OFFSET, std::ios_base::beg);
1411 
1412  is.get(tmpBuff, NORTHING_SIZE + 1);
1413 
1414  if (checkStream(is)) return;
1415 
1416  theGeoRecord.theLlNorthing = atof(tmpBuff);
1417 
1418  //***
1419  // End of lower left data.
1420  //***
1421 
1422  //***
1423  // Start of scene center data: longitude, latitude, easting, northing,
1424  // sample, line.
1425  //***
1426  is.seekg(CENTER_LON_OFFSET, std::ios_base::beg);
1427 
1428  is.get(theGeoRecord.theCenterLon, LON_SIZE + 1);
1429 
1430  if (checkStream(is)) return;
1431 
1432  is.seekg(CENTER_LAT_OFFSET, std::ios_base::beg);
1433 
1434  is.get(theGeoRecord.theCenterLat, LAT_SIZE + 1);
1435 
1436  if (checkStream(is)) return;
1437 
1438  is.seekg(CENTER_EASTING_OFFSET, std::ios_base::beg);
1439 
1440  is.get(tmpBuff, EASTING_SIZE + 1);
1441 
1442  if (checkStream(is)) return;
1443 
1444  theGeoRecord.theCenterEasting = atof(tmpBuff);
1445 
1446  is.seekg(CENTER_NORTHING_OFFSET, std::ios_base::beg);
1447 
1448  is.get(tmpBuff, NORTHING_SIZE + 1);
1449 
1450  if (checkStream(is)) return;
1451 
1452  theGeoRecord.theCenterNorthing = atof(tmpBuff);
1453 
1454  is.seekg(CENTER_SAMPLE_OFFSET, std::ios_base::beg);
1455 
1456  is.get(tmpBuff, CENTER_SAMPLE_SIZE + 1);
1457 
1458  if (checkStream(is)) return;
1459 
1460  theGeoRecord.theCenterSample = atoi(tmpBuff);
1461 
1462  is.seekg(CENTER_LINE_OFFSET, std::ios_base::beg);
1463 
1464  is.get(tmpBuff, CENTER_LINE_SIZE + 1);
1465 
1466  if (checkStream(is)) return;
1467 
1468  theGeoRecord.theCenterLine = atoi(tmpBuff);
1469 
1470  //***
1471  // End of scene center data.
1472  //***
1473 
1474  is.seekg(HORIZONTAL_OFFSET_OFFSET, std::ios_base::beg);
1475 
1476  is.get(tmpBuff, HORIZONTAL_OFFSET_SIZE + 1);
1477 
1478  if (checkStream(is)) return;
1479 
1480  theGeoRecord.theHorizontalOffset = atoi(tmpBuff);
1481 
1482  is.seekg(ORIENTATION_ANGLE_OFFSET, std::ios_base::beg);
1483 
1484  is.get(tmpBuff, ORIENTATION_ANGLE_SIZE + 1);
1485 
1486  if (checkStream(is)) return;
1487 
1488  theGeoRecord.theOrientationAngle = atof(tmpBuff);
1489 
1490  is.seekg(SUN_ELEVATION_OFFSET, std::ios_base::beg);
1491 
1492  is.get(tmpBuff, SUN_ELEVATION_SIZE + 1);
1493 
1494  if (checkStream(is)) return;
1495 
1496  theGeoRecord.theSunElevationAngle = atof(tmpBuff);
1497 
1498  is.seekg(SUN_AZIMUTH_OFFSET, std::ios_base::beg);
1499 
1500  is.get(tmpBuff, SUN_AZIMUTH_SIZE + 1);
1501 
1502  if (checkStream(is)) return;
1503 
1504  theGeoRecord.theSunAzimuth = atof(tmpBuff);
1505 
1506  //***
1507  // End of geometric record.
1508  //***
1509 
1510 }
double theProjectionParams[15]
Definition: ossimFfRevc.h:263
const int OFF_NADIR_ANGLE_OFFSET[4]
Definition: ossimFfRevc.cpp:50
char theProductOrderNumber[PRODUCT_ORDER_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:208
RadiomRecord theRadiomRecord
Definition: ossimFfRevc.h:299
char theProductType[PRODUCT_TYPE_SIZE+1]
Definition: ossimFfRevc.h:223
char theLrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:275
char theUlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:266
char theUrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:271
int checkStream(ossim::istream &is)
char theMapProjectionName[MAP_PROJECTION_NAME_SIZE+1]
Definition: ossimFfRevc.h:260
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
const int SENSOR_MODE_OFFSET[4]
Definition: ossimFfRevc.cpp:45
const int DATE_OFFSET[4]
Definition: ossimFfRevc.cpp:30
char theProcessingType[PROCESSING_TYPE_SIZE+1]
Definition: ossimFfRevc.h:227
const int SENSOR_NAME_OFFSET[4]
Definition: ossimFfRevc.cpp:40
char theProductSize[PRODUCT_SIZE_SIZE+1]
Definition: ossimFfRevc.h:224
char theResampAlgorithm[RESAMPLING_ALGO_SIZE+1]
Definition: ossimFfRevc.h:228
char theLlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:280
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
char theDatum[DATUM_SIZE+1]
Definition: ossimFfRevc.h:262
double theOffNadirAngle[NUMBER_OF_SCENES]
Definition: ossimFfRevc.h:221
char theUlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:265
char theCenterLon[LON_SIZE+1]
Definition: ossimFfRevc.h:285
char theEllipsoid[ELLIPSOID_SIZE+1]
Definition: ossimFfRevc.h:261
char theLlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:281
char theUrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:270
char theLrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:276
const int PATH_ROW_NUMBER_OFFSET[4]
Definition: ossimFfRevc.cpp:25
const int GAIN_OFFSET[8]
Definition: ossimFfRevc.cpp:65
char theSatName[NUMBER_OF_SCENES][SAT_NAME_SIZE+1]
Definition: ossimFfRevc.h:214
GeoRecord theGeoRecord
Definition: ossimFfRevc.h:300
char theSensorName[NUMBER_OF_SCENES][SENSOR_NAME_SIZE+1]
Definition: ossimFfRevc.h:217
const int SAT_NAME_OFFSET[4]
Definition: ossimFfRevc.cpp:35
const int BIAS_OFFSET[8]
Definition: ossimFfRevc.cpp:56
char theFormatVersion[FORMAT_VERSION_SIZE+1]
Definition: ossimFfRevc.h:240
char theCenterLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:286
char theAcquisitionDate[NUMBER_OF_SCENES][DATE_SIZE+1]
Definition: ossimFfRevc.h:211
char theBandsPresentString[BANDS_PRESENT_SIZE+1]
Definition: ossimFfRevc.h:239
char theSensorMode[NUMBER_OF_SCENES][SENSOR_MODE_SIZE+1]
Definition: ossimFfRevc.h:220

◆ path()

int ossimFfRevc::path ( int  sceneNbr = 0) const

Definition at line 139 of file ossimFfRevc.cpp.

References theAdminRecord, and ossimFfRevc::AdminRecord::thePathRowNumber.

140 {
141  char tmpBuff[4];
142  int path = 0;
143 
145 
146  if (is)
147  {
148  is.get(tmpBuff, 4);
149  path = atoi(tmpBuff);
150  }
151 
152  return path;
153 }
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
int path(int sceneNbr=0) const
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ pathRow()

ossimString ossimFfRevc::pathRow ( int  sceneNbr = 0) const

Definition at line 236 of file ossimFfRevc.cpp.

References ossimString::gsub(), theAdminRecord, and ossimFfRevc::AdminRecord::thePathRowNumber.

237 {
238  ossimString tmp = "p";
239 
240  tmp += theAdminRecord.thePathRowNumber[sceneNbr];
241 
242  tmp.gsub("/", "r");
243 
244  tmp.gsub(" ", "");
245 
246  return tmp;
247 }
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
ossimString & gsub(const ossimString &searchKey, const ossimString &replacementValue, bool replaceAll=false)
Substitutes searchKey string with replacementValue and returns a reference to *this.

◆ print()

void ossimFfRevc::print ( std::ostream &  os) const

Definition at line 255 of file ossimFfRevc.cpp.

References NUMBER_OF_BANDS, NUMBER_OF_SCENES, ossimFfRevc::AdminRecord::the1stLineInVolume, ossimFfRevc::AdminRecord::theAcquiredBitsPerPixel, ossimFfRevc::AdminRecord::theAcquisitionDate, theAdminRecord, ossimFfRevc::AdminRecord::theBandsPresentString, ossimFfRevc::RadiomRecord::theBias, ossimFfRevc::GeoRecord::theCenterEasting, ossimFfRevc::GeoRecord::theCenterLat, ossimFfRevc::GeoRecord::theCenterLine, ossimFfRevc::GeoRecord::theCenterLon, ossimFfRevc::GeoRecord::theCenterNorthing, ossimFfRevc::GeoRecord::theCenterSample, ossimFfRevc::GeoRecord::theDatum, ossimFfRevc::GeoRecord::theEllipsoid, ossimFfRevc::AdminRecord::theFormatVersion, ossimFfRevc::RadiomRecord::theGain, theGeoRecord, ossimFfRevc::AdminRecord::theGsd, ossimFfRevc::GeoRecord::theHorizontalOffset, ossimFfRevc::AdminRecord::theLinesPerImage, ossimFfRevc::GeoRecord::theLlEasting, ossimFfRevc::GeoRecord::theLlLat, ossimFfRevc::GeoRecord::theLlLon, ossimFfRevc::GeoRecord::theLlNorthing, ossimFfRevc::GeoRecord::theLrEasting, ossimFfRevc::GeoRecord::theLrLat, ossimFfRevc::GeoRecord::theLrLon, ossimFfRevc::GeoRecord::theLrNorthing, ossimFfRevc::GeoRecord::theMapProjectionName, ossimFfRevc::AdminRecord::theNumberVolumesPerTape, ossimFfRevc::AdminRecord::theOffNadirAngle, ossimFfRevc::GeoRecord::theOrientationAngle, ossimFfRevc::AdminRecord::theOutputBitsPerPixel, ossimFfRevc::AdminRecord::thePathRowNumber, ossimFfRevc::AdminRecord::thePixelsPerLine, ossimFfRevc::AdminRecord::theProcessingType, ossimFfRevc::AdminRecord::theProductOrderNumber, ossimFfRevc::AdminRecord::theProductSize, ossimFfRevc::AdminRecord::theProductType, ossimFfRevc::GeoRecord::theProjectionParams, theRadiomRecord, ossimFfRevc::AdminRecord::theRecordSize, ossimFfRevc::AdminRecord::theResampAlgorithm, ossimFfRevc::AdminRecord::theSatName, ossimFfRevc::AdminRecord::theSensorMode, ossimFfRevc::AdminRecord::theSensorName, ossimFfRevc::GeoRecord::theSunAzimuth, ossimFfRevc::GeoRecord::theSunElevationAngle, ossimFfRevc::AdminRecord::theTapeBlockingFactor, ossimFfRevc::AdminRecord::theTapeVolumeNumber, ossimFfRevc::GeoRecord::theUlEasting, ossimFfRevc::GeoRecord::theUlLat, ossimFfRevc::GeoRecord::theUlLon, ossimFfRevc::GeoRecord::theUlNorthing, ossimFfRevc::GeoRecord::theUrEasting, ossimFfRevc::GeoRecord::theUrLat, ossimFfRevc::GeoRecord::theUrLon, and ossimFfRevc::GeoRecord::theUrNorthing.

Referenced by operator<<().

256 {
257  os << std::setiosflags(std::ios_base::left | std::ios_base::fixed)
258  << "Administrative Record:"
259  << std::setw(30) << "\ntheProductOrderNumber:"
261 
262  int i;
263  for (i = 0; i < NUMBER_OF_SCENES; i++)
264  {
265  os << "\nScene" << (i + 1) << std::setw(23) << " PathRowNumber:"
267  << "\nScene" << (i + 1) << std::setw(23) << " AcquisitionDate: "
269  << "\nScene" << (i + 1) << std::setw(23) << " SatelliteName: "
271  << "\nScene" << (i + 1) << std::setw(23) << " SensorName: "
273  << "\nScene" << (i + 1) << std::setw(23) << " SensorMode: "
275  << "\nScene" << (i + 1) << std::setw(23) << " OffNadirAngle: "
276  << std::setprecision(2) << theAdminRecord.theOffNadirAngle[i];
277  }
278 
279  os << std::setw(30) << "\nProductType:"
281  << std::setw(30) << "\nProductSize:"
283  << std::setw(30) << "\nProcessingType:"
285  << std::setw(30) << "\nResampAlgorithm:"
287  << std::setw(30) << "\nTapeVolumeNumber:"
289  << std::setw(30) << "\nNumberVolumesPerTape:"
291  << std::setw(30) << "\nPixelsPerLine:"
293  << std::setw(30) << "\nLinesPerImage:"
295  << std::setw(30) << "\n1stLineInVolume:"
297  << std::setw(30) << "\nTapeBlockingFactor:"
299  << std::setw(30) << "\nRecordSize:"
301  << std::setw(30) << "\nGsd:"
302  << std::setprecision(2) << theAdminRecord.theGsd
303  << std::setw(30) << "\nOutputBitsPerPixel:"
305  << std::setw(30) << "\nAcquiredBitsPerPixel:"
307  << std::setw(30) << "\nBandsPresentString:"
309  << std::setw(30) << "\nFormatVersion:"
311  << "\n"
312  << std::setw(30) << "Radiometric record:";
313 
314  os << std::setprecision(15);
315 
316  for (i = 0; i < NUMBER_OF_BANDS; i++)
317  {
318  os << "\nBand" << (i + 1) << std::setw(24) << " bias:"
320  << "\nBand" << (i + 1) << std::setw(24) << " gain:"
321  << theRadiomRecord.theGain[i];
322  }
323 
324  os << "\n"
325  << "Geometric Record:"
326  << std::setw(30) << "\nMapProjectionName:"
328  << std::setw(30) << "\nEllipsoid:"
330  << std::setw(30) << "\nDatum:"
332 
333  for (i = 0; i < 15; i++)
334  {
335  os << "\nProjectionParams[" << std::setw(2) << i << std::setw(10) << "]: "
337  }
338 
339  os << std::setprecision(3)
340  << std::setw(30) << "\nUlLon:"
342  << std::setw(30) << "\nUlLat:"
344  << std::setw(30) << "\nUlEasting:"
346  << std::setw(30) << "\nUlNorthing:"
348  << std::setw(30) << "\nUrLon:"
350  << std::setw(30) << "\nUrLat:"
352  << std::setw(30) << "\nUrEasting:"
354  << std::setw(30) << "\nUrNorthing:"
356  << std::setw(30) << "\nLrLon:"
358  << std::setw(30) << "\nLrLat:"
360  << std::setw(30) << "\nLrEasting:"
362  << std::setw(30) << "\nLrNorthing:"
364  << std::setw(30) << "\nLlLon:"
366  << std::setw(30) << "\nLlLat:"
368  << std::setw(30) << "\nLlEasting:"
370  << std::setw(30) << "\nLlNorthing:"
372  << std::setw(30) << "\nCenterLon:"
374  << std::setw(30) << "\nCenterLat:"
376  << std::setw(30) << "\nCenterEasting:"
378  << std::setw(30) << "\nCenterNorthing:"
380  << std::setw(30) << "\nCenterSample:"
382  << std::setw(30) << "\nCenterLine:"
384  << std::setw(30) << "\nHorizontalOffset:"
386  << std::setprecision(2) << std::setw(30) << "\nOrientationAngle:"
388  << std::setw(30) << "\nSunElevationAngle:"
389  << std::setprecision(1) << theGeoRecord.theSunElevationAngle
390  << std::setw(30) << "\nSunAzimuth:" << theGeoRecord.theSunAzimuth
391  << std::resetiosflags(std::ios_base::left)
392  << "\n\n";
393 
394 }
double theProjectionParams[15]
Definition: ossimFfRevc.h:263
char theProductOrderNumber[PRODUCT_ORDER_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:208
RadiomRecord theRadiomRecord
Definition: ossimFfRevc.h:299
char theProductType[PRODUCT_TYPE_SIZE+1]
Definition: ossimFfRevc.h:223
char theLrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:275
char theUlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:266
char theUrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:271
char theMapProjectionName[MAP_PROJECTION_NAME_SIZE+1]
Definition: ossimFfRevc.h:260
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
char theProcessingType[PROCESSING_TYPE_SIZE+1]
Definition: ossimFfRevc.h:227
char theProductSize[PRODUCT_SIZE_SIZE+1]
Definition: ossimFfRevc.h:224
char theResampAlgorithm[RESAMPLING_ALGO_SIZE+1]
Definition: ossimFfRevc.h:228
char theLlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:280
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
char theDatum[DATUM_SIZE+1]
Definition: ossimFfRevc.h:262
double theOffNadirAngle[NUMBER_OF_SCENES]
Definition: ossimFfRevc.h:221
char theUlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:265
char theCenterLon[LON_SIZE+1]
Definition: ossimFfRevc.h:285
char theEllipsoid[ELLIPSOID_SIZE+1]
Definition: ossimFfRevc.h:261
char theLlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:281
char theUrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:270
char theLrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:276
char theSatName[NUMBER_OF_SCENES][SAT_NAME_SIZE+1]
Definition: ossimFfRevc.h:214
GeoRecord theGeoRecord
Definition: ossimFfRevc.h:300
char theSensorName[NUMBER_OF_SCENES][SENSOR_NAME_SIZE+1]
Definition: ossimFfRevc.h:217
char theFormatVersion[FORMAT_VERSION_SIZE+1]
Definition: ossimFfRevc.h:240
char theCenterLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:286
char theAcquisitionDate[NUMBER_OF_SCENES][DATE_SIZE+1]
Definition: ossimFfRevc.h:211
char theBandsPresentString[BANDS_PRESENT_SIZE+1]
Definition: ossimFfRevc.h:239
char theSensorMode[NUMBER_OF_SCENES][SENSOR_MODE_SIZE+1]
Definition: ossimFfRevc.h:220

◆ row()

int ossimFfRevc::row ( int  sceneNbr = 0) const

Definition at line 164 of file ossimFfRevc.cpp.

References theAdminRecord, and ossimFfRevc::AdminRecord::thePathRowNumber.

165 {
166  char tmpBuff[4];
167  int row = 0;
168 
170 
171  if (is)
172  {
173  is.seekg(4, std::ios_base::beg);
174  is.get(tmpBuff, 4);
175  row = atoi(tmpBuff);
176  }
177 
178  return row;
179 }
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
int row(int sceneNbr=0) const
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ subScene()

ossimString ossimFfRevc::subScene ( int  sceneNbr = 0) const

Definition at line 216 of file ossimFfRevc.cpp.

References theAdminRecord, and ossimFfRevc::AdminRecord::thePathRowNumber.

217 {
218  char tmpBuff[3];
220 
222 
223  if (is)
224  {
225  is.seekg(9, std::ios_base::beg);
226  is.get(tmpBuff, 3);
227  subScene = tmpBuff;
228  }
229 
230  return subScene;
231 }
ossimString subScene(int sceneNbr=0) const
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32

◆ write()

void ossimFfRevc::write ( std::ostream &  os) const

Definition at line 402 of file ossimFfRevc.cpp.

References AQUIRED_BITS_PER_PIXEL_DESC_SIZE, BANDS_PRESENT_DESC_SIZE, BANDS_PRESENT_SIZE, BIAS_GAIN_DESC_SIZE, BIAS_OFFSET, BIAS_SIZE, BITS_PER_PIXEL_DESC_SIZE, BITS_PER_PIXEL_SIZE, BLOCKING_FACTOR_DESC_SIZE, BLOCKING_FACTOR_SIZE, CENTER_DESC_SIZE, CORNER_DESC_SIZE, DATE_DESC_SIZE, DATE_SIZE, DATUM_DESC_SIZE, DATUM_SIZE, ELLIPSOID_DESC_SIZE, ELLIPSOID_SIZE, FIRST_LINE_DESC_SIZE, FORMAT_VERSION_SIZE, GAIN_SIZE, GEO_DESC_SIZE, HORIZONTAL_OFFSET_DESC_SIZE, LINES_PER_IMAGE_DESC_SIZE, LINES_PER_IMAGE_SIZE, LOCATION_DESC_SIZE, LOCATION_OFFSET, LOOK_ANGLE_DESC_SIZE, MAP_PROJECTION_NAME_DESC_SIZE, MAP_PROJECTION_NAME_SIZE, OFF_NADIR_ANGLE_SIZE, ORIENTATION_ANGLE_DESC_SIZE, PATH_ROW_NUMBER_SIZE, PIXEL_GSD_DESC_SIZE, PIXEL_GSD_SIZE, PIXELS_PER_LINE_DESC_SIZE, PIXELS_PER_LINE_SIZE, PROCESSING_TYPE_DESC_SIZE, PROCESSING_TYPE_SIZE, PRODUCT_ORDER_NUMBER_DESC_SIZE, PRODUCT_ORDER_NUMBER_SIZE, PRODUCT_SIZE_DESC_SIZE, PRODUCT_SIZE_SIZE, PRODUCT_TYPE_DESC_SIZE, PRODUCT_TYPE_SIZE, PROJECTION_PARAMETER_DESC_SIZE, RECORD_LENGTH_DESC_SIZE, RECORD_LENGTH_SIZE, RESAMPLING_ALGO_DESC_SIZE, RESAMPLING_ALGO_SIZE, REV_DESC_SIZE, SAT_NAME_DESC_SIZE, SAT_NAME_SIZE, SENSOR_MODE_DESC_SIZE, SENSOR_MODE_SIZE, SENSOR_NAME_DESC_SIZE, SENSOR_NAME_SIZE, SPACE, SUN_AZIMUTH_DESC_SIZE, SUN_ELEVATION_DESC_SIZE, TAPE_VOLUME_NUMBER_DESC_SIZE, TAPE_VOLUME_NUMBER_SIZE, ossimFfRevc::AdminRecord::the1stLineInVolume, ossimFfRevc::AdminRecord::theAcquiredBitsPerPixel, ossimFfRevc::AdminRecord::theAcquisitionDate, theAdminRecord, ossimFfRevc::AdminRecord::theBandsPresentString, ossimFfRevc::RadiomRecord::theBias, ossimFfRevc::GeoRecord::theDatum, ossimFfRevc::GeoRecord::theEllipsoid, ossimFfRevc::AdminRecord::theFormatVersion, ossimFfRevc::RadiomRecord::theGain, theGeoRecord, ossimFfRevc::AdminRecord::theGsd, ossimFfRevc::AdminRecord::theLinesPerImage, ossimFfRevc::GeoRecord::theMapProjectionName, ossimFfRevc::AdminRecord::theNumberVolumesPerTape, ossimFfRevc::AdminRecord::theOffNadirAngle, ossimFfRevc::AdminRecord::theOutputBitsPerPixel, ossimFfRevc::AdminRecord::thePathRowNumber, ossimFfRevc::AdminRecord::thePixelsPerLine, ossimFfRevc::AdminRecord::theProcessingType, ossimFfRevc::AdminRecord::theProductOrderNumber, ossimFfRevc::AdminRecord::theProductSize, ossimFfRevc::AdminRecord::theProductType, theRadiomRecord, ossimFfRevc::AdminRecord::theRecordSize, ossimFfRevc::AdminRecord::theResampAlgorithm, ossimFfRevc::AdminRecord::theSatName, ossimFfRevc::AdminRecord::theSensorMode, ossimFfRevc::AdminRecord::theSensorName, ossimFfRevc::AdminRecord::theTapeBlockingFactor, ossimFfRevc::AdminRecord::theTapeVolumeNumber, and VOLUMES_PER_TAPE_SIZE.

403 {
404  const char PRODUCT_ID_DESC [PRODUCT_ORDER_NUMBER_DESC_SIZE + 1]
405  = "PRODUCT ID =";
406 
407  const char LOCATION_DESC [LOCATION_DESC_SIZE + 1]
408  = " LOCATION =";
409 
410  const char DATE_DESC [DATE_DESC_SIZE + 1]
411  = " ACQUISITION DATE =";
412 
413  const char SATELLITE_NAME_DESC [SAT_NAME_DESC_SIZE + 1]
414  = "SATELLITE =";
415 
416  const char SENSOR_NAME_DESC [SENSOR_NAME_DESC_SIZE + 1]
417  = " SENSOR =";
418 
419  const char SENSOR_MODE_DESC [SENSOR_MODE_DESC_SIZE + 1]
420  = " SENSOR MODE =";
421 
422  const char LOOK_ANGLE_DESC [LOOK_ANGLE_DESC_SIZE + 1]
423  = " LOOK ANGLE =";
424 
425  const char PRODUCT_TYPE_DESC [PRODUCT_TYPE_DESC_SIZE + 1]
426  = "PRODUCT TYPE =";
427 
428  const char PRODUCT_SIZE_DESC [PRODUCT_SIZE_DESC_SIZE + 1]
429  = " PRODUCT SIZE =";
430 
431  const char PROCESSING_TYPE_DESC [PROCESSING_TYPE_DESC_SIZE + 1]
432  = "TYPE OF PROCESSING =";
433 
434  const char RESAMPLING_ALGO_DESC [RESAMPLING_ALGO_DESC_SIZE + 1]
435  = " RESAMPLING =";
436 
437  const char TAPE_VOLUME_NUMBER_DESC [TAPE_VOLUME_NUMBER_DESC_SIZE + 1]
438  = "VOLUME #/# IN SET =";
439 
440  const char PIXELS_PER_LINE_DESC [PIXELS_PER_LINE_DESC_SIZE + 1]
441  = " PIXELS PER LINE =";
442 
443  const char LINES_PER_IMAGE_DESC [LINES_PER_IMAGE_DESC_SIZE + 1]
444  = " LINES PER BAND =";
445 
446  const char FIRST_LINE_DESC [FIRST_LINE_DESC_SIZE + 1]
447  = "START LINE # =";
448 
449  const char BLOCKING_FACTOR_DESC [BLOCKING_FACTOR_DESC_SIZE + 1]
450  = " BLOCKING FACTOR =";
451 
452  const char RECORD_LENGTH_DESC [RECORD_LENGTH_DESC_SIZE + 1]
453  = " RECORD LENGTH =";
454 
455  const char PIXEL_GSD_DESC [PIXEL_GSD_DESC_SIZE + 1]
456  = " PIXEL SIZE =";
457 
458  const char BITS_PER_PIXEL_DESC [BITS_PER_PIXEL_DESC_SIZE + 1]
459  = "OUTPUT BITS PER PIXEL =";
460 
461  const char AQUIRED_BITS_PER_PIXEL_DESC
462  [AQUIRED_BITS_PER_PIXEL_DESC_SIZE + 1] = " ACQUIRED BITS PER PIXEL =";
463 
464  const char BANDS_PRESENT_DESC [BANDS_PRESENT_DESC_SIZE + 1]
465  = "BANDS PRESENT =";
466 
467  const char REV_DESC [REV_DESC_SIZE + 1]
468  = "REV ";
469 
470  const char BIAS_GAIN_DESC [BIAS_GAIN_DESC_SIZE + 1]
471  = "BIASES AND GAINS IN THE BAND ORDER AS ON THIS TAPE";
472 
473  const char GEO_DESC [GEO_DESC_SIZE + 1]
474  = "GEOMETRIC DATA";
475 
476  const char MAP_PROJECTION_NAME_DESC [MAP_PROJECTION_NAME_DESC_SIZE + 1]
477  = " MAP PROJECTION =";
478 
479  const char ELLIPSOID_DESC [ELLIPSOID_DESC_SIZE + 1]
480  = " ELLIPSOID =";
481 
482  const char DATUM_DESC [DATUM_DESC_SIZE + 1]
483  = " DATUM =";
484 
485  const char PROJECTION_PARAMETER_DESC [PROJECTION_PARAMETER_DESC_SIZE + 1]
486  = "USGS PROJECTION PARAMETERS =";
487 
488  const char UL_DESC [CORNER_DESC_SIZE + 1]
489  = "UL =";
490 
491  const char UR_DESC [CORNER_DESC_SIZE + 1]
492  = "UR =";
493 
494  const char LR_DESC [CORNER_DESC_SIZE + 1]
495  = "LR =";
496 
497  const char LL_DESC [CORNER_DESC_SIZE + 1]
498  = "LL =";
499 
500  const char CENTER_DESC [CENTER_DESC_SIZE + 1]
501  = "CENTER =";
502 
503  const char HORIZONTAL_OFFSET_DESC [HORIZONTAL_OFFSET_DESC_SIZE + 1]
504  = "OFFSET =";
505 
506  const char ORIENTATION_ANGLE_DESC [ORIENTATION_ANGLE_DESC_SIZE + 1]
507  = " ORIENTATION ANGLE =";
508 
509  const char SUN_ELEVATION_DESC [SUN_ELEVATION_DESC_SIZE + 1]
510  = "SUN ELEVATION ANGLE =";
511 
512  const char SUN_AZIMUTH_DESC [SUN_AZIMUTH_DESC_SIZE + 1]
513  = " SUN AZIMUTH ANGLE =";
514 
515  const char SPACE[] = " ";
516 
517  //>
518  // NOTE: "seekp's" will be perormed as needed for safety.
519  //<
520 
521  //>
522  // Start at beginning of the stream.
523  //<
524  os.seekp(0, std::ios_base::beg);
525 
526  //>
527  // Start of administrative record.
528  //<
529 
530  os << std::setiosflags(std::ios_base::fixed) // Disable scientific mode.
531 
532  << PRODUCT_ID_DESC
533 
534  << std::setw(PRODUCT_ORDER_NUMBER_SIZE)
536 
537  //>
538  // The admin record can contain info for up to four scenes.
539  //<
540 
541  int i;
542  for (i = 0; i < 4; i++)
543  {
544  os.seekp(LOCATION_OFFSET[i], std::ios_base::beg);
545 
546  os << LOCATION_DESC
547 
548  << std::setw(PATH_ROW_NUMBER_SIZE)
550 
551  << DATE_DESC
552 
553  << std::setw(DATE_SIZE)
555 
556  << std::setw(1) << SPACE << "\n" // End of line.
557 
558  << SATELLITE_NAME_DESC // Start of line.
559 
560  << std::setw(SAT_NAME_SIZE)
562 
563  << SENSOR_NAME_DESC
564 
565  << std::setw(SENSOR_NAME_SIZE)
567 
568  << SENSOR_MODE_DESC
569 
570  << std::setw(SENSOR_MODE_SIZE)
572 
573  << LOOK_ANGLE_DESC
574 
575  << std::setw(OFF_NADIR_ANGLE_SIZE)
576  << std::setiosflags(std::ios_base::right)
577  << std::setprecision(2)
578  << theAdminRecord.theOffNadirAngle[i] // End of scene.
579  << std::resetiosflags(std::ios_base::right)
580  << "\n"
581  << std::setw(23) << SPACE; // End of line.
582  } // End of scene loop.
583 
584  os.seekp(640, std::ios_base::beg); // Start of line.
585 
586  os << PRODUCT_TYPE_DESC
587 
588  << std::setiosflags(std::ios_base::left)
589 
590  << std::setw(PRODUCT_TYPE_SIZE)
592 
593  << PRODUCT_SIZE_DESC
594 
595  << std::setw(PRODUCT_SIZE_SIZE)
597 
598  << std::setw(22) << SPACE << "\n"; // End of line.
599 
600  os.seekp(720, std::ios_base::beg);
601 
602  os << PROCESSING_TYPE_DESC
603 
604  << std::setw(PROCESSING_TYPE_SIZE)
606 
607  << RESAMPLING_ALGO_DESC
608 
609  << std::setw(RESAMPLING_ALGO_SIZE)
611 
612  << std::resetiosflags(std::ios_base::left)
613 
614  << std::setw(33) << SPACE << "\n"; // End of line.
615 
616  os.seekp(800, std::ios_base::beg); // Start of line.
617 
618  os << TAPE_VOLUME_NUMBER_DESC
619 
620  << std::setiosflags(std::ios_base::right)
621 
622  << std::setw(TAPE_VOLUME_NUMBER_SIZE)
624  << "/" << std::setw(VOLUMES_PER_TAPE_SIZE)
626 
627  << PIXELS_PER_LINE_DESC
628 
629  << std::setw(PIXELS_PER_LINE_SIZE)
631 
632  << LINES_PER_IMAGE_DESC
633 
634  << std::setw(LINES_PER_IMAGE_SIZE)
636 
637  << "/"
638 
639  << std::setw(LINES_PER_IMAGE_SIZE)
641 
642  << std::setw(4) << SPACE << "\n"; // End of line.
643 
644  os.seekp(880, std::ios_base::beg); // Start of line.
645 
646  os << std::setiosflags(std::ios_base::right)
647 
648  << FIRST_LINE_DESC
649 
650  << std::setw(LINES_PER_IMAGE_SIZE)
652 
653  << BLOCKING_FACTOR_DESC
654 
655  << std::setw(BLOCKING_FACTOR_SIZE)
657 
658  << RECORD_LENGTH_DESC
659 
660  << std::setw(RECORD_LENGTH_SIZE)
662 
663  << PIXEL_GSD_DESC
664 
665 
666  << std::setw(PIXEL_GSD_SIZE)
667  << std::setprecision(2)
669 
670  << "\n"; // End of line.
671 
672  os.seekp(960, std::ios_base::beg); // Start of line.
673 
674  os << BITS_PER_PIXEL_DESC
675 
676  << std::setw(BITS_PER_PIXEL_SIZE)
678 
679  << AQUIRED_BITS_PER_PIXEL_DESC
680 
681  << std::setw(BITS_PER_PIXEL_SIZE)
683 
684  << std::resetiosflags(std::ios_base::right)
685 
686  << std::setw(26) << SPACE << "\n"; // End of line.
687 
688  os.seekp(1040, std::ios_base::beg); // Start of line.
689 
690  os << BANDS_PRESENT_DESC
691 
692  << std::setw(BANDS_PRESENT_SIZE)
694 
695  << std::setw(31) << SPACE << "\n" // End of line.
696  << std::setw(79) << SPACE << "\n"
697  << std::setw(79) << SPACE << "\n"
698  << std::setw(79) << SPACE << "\n"
699  << std::setw(79) << SPACE << "\n"
700  << std::setw(79) << SPACE << "\n";
701 
702  os.seekp(1520, std::ios_base::beg);
703 
704  os << REV_DESC
705 
706  << std::setw(FORMAT_VERSION_SIZE)
708 
709  //***
710  // End of administrative record(bytes 0 to 1535).
711  //***
712 
713  //***
714  // Beginning of radiometric record.
715  //***
716 
717  os.seekp(1536, std::ios_base::beg);
718 
719  os << BIAS_GAIN_DESC
720 
721  << std::setw(29) << SPACE << "\n";
722 
723  //***
724  // Loop through the bands and get write out the bias and gain for each
725  // band.
726  //***
727 
728  os << std::resetiosflags(std::ios_base::left) << std::setiosflags(std::ios_base::right);
729 
730  for (i = 0; i < 8; i++)
731  {
732  os.seekp(BIAS_OFFSET[i], std::ios_base::beg);
733 
734  os << std::setprecision(15)
735 
736  << std::setw(BIAS_SIZE)
738 
739  << SPACE
740 
741  << std::setw(GAIN_SIZE)
743 
744  << std::setw(30) << SPACE << "\n";
745  } // End of loop through the bands.
746 
747  os << std::resetiosflags(std::ios_base::right);
748 
749  os.seekp(2256, std::ios_base::beg);
750 
751  os << std::setw(79) << SPACE << "\n";
752  os << std::setw(79) << SPACE << "\n";
753  os << std::setw(79) << SPACE << "\n";
754  os << std::setw(79) << SPACE << "\n";
755  os << std::setw(79) << SPACE << "\n";
756  os << std::setw(79) << SPACE << "\n";
757  os << std::setw(79) << SPACE << "\n";
758  os << std::setw(79) << SPACE << "\n";
759  os << std::setw(79) << SPACE << "\n";
760  os << std::setw(79) << SPACE << "\n";
761  os << std::setw(15) << SPACE << "\n";
762 
763  //***
764  // End of radiometric record(bytes 1536 to 3071).
765  //***
766 
767  //**
768  // Start of geometric record(bytes 3072 to 4607).
769  //***
770 
771  os.seekp(3072, std::ios_base::beg); // Start of record.
772 
773  os << GEO_DESC
774 
775  << MAP_PROJECTION_NAME_DESC
776 
777  << std::setiosflags(std::ios_base::left) // Alpha fields left justified.
778 
779  << std::setw(MAP_PROJECTION_NAME_SIZE)
781 
782  << ELLIPSOID_DESC // Looks like this has changed.
783 
784  << std::setw(ELLIPSOID_SIZE)
786 
787  << DATUM_DESC
788 
789  << std::setw(DATUM_SIZE)
791 
792  << std::resetiosflags(std::ios_base::left)
793 
794  << "\n" // End of line
795 
796  << PROJECTION_PARAMETER_DESC
797  << SPACE;
798 
799  os.seekp(PROJ_PARAM_OFFSET[0], std::ios_base::beg);
800  os << std::setprecision(15)
801  << std::setiosflags(std::ios_base::right)
802 
803  << std::setw(PROJECTION_PARAMETER_SIZE)
805  << SPACE;
806 
807  os.seekp(PROJ_PARAM_OFFSET[1], std::ios_base::beg);
808  os << std::setw(PROJECTION_PARAMETER_SIZE)
810  << std::setw(1) << SPACE << "\n";
811 
812  //***
813  // Code is duplicated every three projection parameter four times;
814  // hence, the double loop.
815  //***
816  for (i = 0; i < 4; i++)
817  {
818  for (int j = i * 3 + 2; j < (i * 3) + 5; j++)
819  {
820  os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
821 
822  os << std::setw(PROJECTION_PARAMETER_SIZE)
824  << std::setw(1) << SPACE;
825 
826  os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
827  os << std::setw(PROJECTION_PARAMETER_SIZE)
829  << std::setw(1) << SPACE;
830 
831  os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
832  os << std::setw(PROJECTION_PARAMETER_SIZE)
834  << std::setw(5) << SPACE << "\n";
835  }
836  }
837 
838  os.seekp(PROJ_PARAM_OFFSET[14], std::ios_base::beg);
839  os << std::setw(PROJECTION_PARAMETER_SIZE)
841  << std::setw(55) << SPACE << "\n" << std::resetiosflags(std::ios_base::right);
842 
843 
844  os.seekp(3632, std::ios_base::beg);
845  os << UL_DESC
846 
847  << SPACE
848 
849  << std::setw(LON_SIZE) << theGeoRecord.theUlLon
850 
851  << SPACE
852 
853  << std::setw(LAT_SIZE) << theGeoRecord.theUlLat
854 
855  << SPACE
856 
857  << std::setprecision(3)
858 
859  << std::setw(EASTING_SIZE) << std::setiosflags(std::ios_base::right)
861 
862  << SPACE
863 
864  << std::setw(NORTHING_SIZE)
866 
867  << std::setw(20) << SPACE << "\n" << std::resetiosflags(std::ios_base::right);
868 
869 
870  os.seekp(3712, std::ios_base::beg);
871  os << UR_DESC
872 
873  << SPACE
874 
875  << std::setw(LON_SIZE) << theGeoRecord.theUrLon
876 
877  << SPACE
878 
879  << std::setw(LAT_SIZE) << theGeoRecord.theUrLat
880 
881  << SPACE
882 
883  << std::setw(EASTING_SIZE) << std::setiosflags(std::ios_base::right)
885 
886  << SPACE
887 
888  << std::setw(NORTHING_SIZE)
890 
891  << std::setw(20) << SPACE << "\n" << std::resetiosflags(std::ios_base::right);
892 
893 
894  os.seekp(3792, std::ios_base::beg);
895  os << LR_DESC
896 
897  << SPACE
898 
899  << std::setw(LON_SIZE) << theGeoRecord.theLrLon
900 
901  << SPACE
902 
903  << std::setw(LAT_SIZE) << theGeoRecord.theLrLat
904 
905  << SPACE
906 
907  << std::setw(EASTING_SIZE) << std::setiosflags(std::ios_base::right)
909 
910  << SPACE
911 
912  << std::setw(NORTHING_SIZE)
914 
915  << std::setw(20) << SPACE << "\n" << std::resetiosflags(std::ios_base::right);
916 
917 
918  os.seekp(3872, std::ios_base::beg);
919  os << LL_DESC
920 
921  << SPACE
922 
923  << std::setw(LON_SIZE) << theGeoRecord.theLlLon
924 
925  << SPACE
926 
927  << std::setw(LAT_SIZE) << theGeoRecord.theLlLat
928 
929  << SPACE
930 
931  << std::setw(EASTING_SIZE) << std::setiosflags(std::ios_base::right)
933 
934  << SPACE
935 
936  << std::setw(NORTHING_SIZE)
938 
939  << std::setw(20) << SPACE << "\n" << std::resetiosflags(std::ios_base::right);
940 
941  os.seekp(3952, std::ios_base::beg);
942  os << CENTER_DESC
943 
944  << SPACE
945 
946  << std::setw(LON_SIZE)
948 
949  << SPACE
950 
951  << std::setw(LAT_SIZE)
953 
954  << SPACE
955 
956  << std::setw(EASTING_SIZE) << std::setiosflags(std::ios_base::right)
958 
959  << SPACE
960 
961  << std::setw(NORTHING_SIZE)
963 
964  << SPACE
965 
966  << std::setw(CENTER_SAMPLE_SIZE)
968 
969  << SPACE
970 
971  << std::setw(CENTER_LINE_SIZE)
973 
974  << std::setw(4) << SPACE << "\n";
975 
976  os.seekp(4032, std::ios_base::beg);
977  os << HORIZONTAL_OFFSET_DESC
978 
979  << std::setw(HORIZONTAL_OFFSET_SIZE)
981 
982  << ORIENTATION_ANGLE_DESC
983 
984  << std::setw(ORIENTATION_ANGLE_SIZE)
985  << std::setprecision(2)
987 
988  << std::setw(39) << SPACE << "\n"; // 41 in spec
989 
990  os.seekp(4112, std::ios_base::beg);
991  os << SUN_ELEVATION_DESC
992 
993  << std::setw(SUN_ELEVATION_SIZE)
994  << std::setprecision(1)
996 
997  << SUN_AZIMUTH_DESC
998 
999  << std::setw(SUN_AZIMUTH_SIZE)
1000  << std::setprecision(1)
1001  << theGeoRecord.theSunAzimuth // End of data.
1002 
1003  << std::setw(29) << SPACE << "\n"
1004  << std::setw(79) << SPACE << "\n"
1005  << std::setw(79) << SPACE << "\n"
1006  << std::setw(79) << SPACE << "\n"
1007  << std::setw(79) << SPACE << "\n"
1008  << std::setw(79) << SPACE << "\n"
1009  << std::setw(15) << SPACE << "\n" << std::flush; // ? size
1010 
1011  //***
1012  // End of geometric record(bytes 3072 to 4607).
1013  //***
1014 
1015 }
double theProjectionParams[15]
Definition: ossimFfRevc.h:263
char theProductOrderNumber[PRODUCT_ORDER_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:208
RadiomRecord theRadiomRecord
Definition: ossimFfRevc.h:299
char theProductType[PRODUCT_TYPE_SIZE+1]
Definition: ossimFfRevc.h:223
char theLrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:275
char theUlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:266
char theUrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:271
char theMapProjectionName[MAP_PROJECTION_NAME_SIZE+1]
Definition: ossimFfRevc.h:260
#define SPACE
Definition: vpfio.h:25
AdminRecord theAdminRecord
Definition: ossimFfRevc.h:298
const int LOCATION_OFFSET[4]
Definition: ossimFfRevc.cpp:20
char theProcessingType[PROCESSING_TYPE_SIZE+1]
Definition: ossimFfRevc.h:227
char theProductSize[PRODUCT_SIZE_SIZE+1]
Definition: ossimFfRevc.h:224
char theResampAlgorithm[RESAMPLING_ALGO_SIZE+1]
Definition: ossimFfRevc.h:228
char theLlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:280
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
Definition: ossimFfRevc.h:210
char theDatum[DATUM_SIZE+1]
Definition: ossimFfRevc.h:262
double theOffNadirAngle[NUMBER_OF_SCENES]
Definition: ossimFfRevc.h:221
char theUlLon[LON_SIZE+1]
Definition: ossimFfRevc.h:265
char theCenterLon[LON_SIZE+1]
Definition: ossimFfRevc.h:285
char theEllipsoid[ELLIPSOID_SIZE+1]
Definition: ossimFfRevc.h:261
char theLlLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:281
char theUrLon[LON_SIZE+1]
Definition: ossimFfRevc.h:270
char theLrLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:276
char theSatName[NUMBER_OF_SCENES][SAT_NAME_SIZE+1]
Definition: ossimFfRevc.h:214
GeoRecord theGeoRecord
Definition: ossimFfRevc.h:300
char theSensorName[NUMBER_OF_SCENES][SENSOR_NAME_SIZE+1]
Definition: ossimFfRevc.h:217
const int BIAS_OFFSET[8]
Definition: ossimFfRevc.cpp:56
char theFormatVersion[FORMAT_VERSION_SIZE+1]
Definition: ossimFfRevc.h:240
char theCenterLat[LAT_SIZE+1]
Definition: ossimFfRevc.h:286
char theAcquisitionDate[NUMBER_OF_SCENES][DATE_SIZE+1]
Definition: ossimFfRevc.h:211
char theBandsPresentString[BANDS_PRESENT_SIZE+1]
Definition: ossimFfRevc.h:239
char theSensorMode[NUMBER_OF_SCENES][SENSOR_MODE_SIZE+1]
Definition: ossimFfRevc.h:220

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const ossimFfRevc head 
)
friend

Definition at line 1542 of file ossimFfRevc.cpp.

1543 {
1544  head.print(os);
1545 
1546  return os;
1547 }
void print(std::ostream &os) const

Member Data Documentation

◆ theAdminRecord

AdminRecord ossimFfRevc::theAdminRecord

Definition at line 298 of file ossimFfRevc.h.

Referenced by fraction(), loadFromStream(), path(), pathRow(), print(), row(), subScene(), and write().

◆ theErrorStatus

ErrorStatus ossimFfRevc::theErrorStatus
private

Definition at line 343 of file ossimFfRevc.h.

Referenced by checkStream(), errorStatus(), and ossimFfRevc().

◆ theGeoRecord

GeoRecord ossimFfRevc::theGeoRecord

Definition at line 300 of file ossimFfRevc.h.

Referenced by loadFromStream(), print(), and write().

◆ theRadiomRecord

RadiomRecord ossimFfRevc::theRadiomRecord

Definition at line 299 of file ossimFfRevc.h.

Referenced by loadFromStream(), print(), and write().


The documentation for this class was generated from the following files: