74 static const int PROJ_PARAM_OFFSET [15] = { 3181,
90 static const char BLANK_STRING[] =
" ";
100 theErrorStatus(OSSIM_OK)
111 theErrorStatus(OSSIM_OK)
114 createIstream(
ossimString(headerFile), std::ios_base::in);
121 <<
"Cannot open: " << headerFile <<
"\n" 122 <<
"Returning from constructor." << std::endl;
149 path = atoi(tmpBuff);
173 is.seekg(4, std::ios_base::beg);
199 is.seekg(7, std::ios_base::beg);
225 is.seekg(9, std::ios_base::beg);
257 os << std::setiosflags(std::ios_base::left | std::ios_base::fixed)
258 <<
"Administrative Record:" 259 << std::setw(30) <<
"\ntheProductOrderNumber:" 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: " 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:" 303 << std::setw(30) <<
"\nOutputBitsPerPixel:" 305 << std::setw(30) <<
"\nAcquiredBitsPerPixel:" 307 << std::setw(30) <<
"\nBandsPresentString:" 309 << std::setw(30) <<
"\nFormatVersion:" 312 << std::setw(30) <<
"Radiometric record:";
314 os << std::setprecision(15);
318 os <<
"\nBand" << (i + 1) << std::setw(24) <<
" bias:" 320 <<
"\nBand" << (i + 1) << std::setw(24) <<
" gain:" 325 <<
"Geometric Record:" 326 << std::setw(30) <<
"\nMapProjectionName:" 328 << std::setw(30) <<
"\nEllipsoid:" 330 << std::setw(30) <<
"\nDatum:" 333 for (i = 0; i < 15; i++)
335 os <<
"\nProjectionParams[" << std::setw(2) << i << std::setw(10) <<
"]: " 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:" 391 << std::resetiosflags(std::ios_base::left)
411 =
" ACQUISITION DATE =";
432 =
"TYPE OF PROCESSING =";
438 =
"VOLUME #/# IN SET =";
441 =
" PIXELS PER LINE =";
444 =
" LINES PER BAND =";
450 =
" BLOCKING FACTOR =";
453 =
" RECORD LENGTH =";
459 =
"OUTPUT BITS PER PIXEL =";
461 const char AQUIRED_BITS_PER_PIXEL_DESC
471 =
"BIASES AND GAINS IN THE BAND ORDER AS ON THIS TAPE";
477 =
" MAP PROJECTION =";
486 =
"USGS PROJECTION PARAMETERS =";
507 =
" ORIENTATION ANGLE =";
510 =
"SUN ELEVATION ANGLE =";
513 =
" SUN AZIMUTH ANGLE =";
515 const char SPACE[] =
" ";
524 os.seekp(0, std::ios_base::beg);
530 os << std::setiosflags(std::ios_base::fixed)
542 for (i = 0; i < 4; i++)
556 << std::setw(1) <<
SPACE <<
"\n" 558 << SATELLITE_NAME_DESC
576 << std::setiosflags(std::ios_base::right)
577 << std::setprecision(2)
579 << std::resetiosflags(std::ios_base::right)
581 << std::setw(23) <<
SPACE;
584 os.seekp(640, std::ios_base::beg);
586 os << PRODUCT_TYPE_DESC
588 << std::setiosflags(std::ios_base::left)
598 << std::setw(22) <<
SPACE <<
"\n";
600 os.seekp(720, std::ios_base::beg);
602 os << PROCESSING_TYPE_DESC
607 << RESAMPLING_ALGO_DESC
612 << std::resetiosflags(std::ios_base::left)
614 << std::setw(33) <<
SPACE <<
"\n";
616 os.seekp(800, std::ios_base::beg);
618 os << TAPE_VOLUME_NUMBER_DESC
620 << std::setiosflags(std::ios_base::right)
627 << PIXELS_PER_LINE_DESC
632 << LINES_PER_IMAGE_DESC
642 << std::setw(4) <<
SPACE <<
"\n";
644 os.seekp(880, std::ios_base::beg);
646 os << std::setiosflags(std::ios_base::right)
653 << BLOCKING_FACTOR_DESC
658 << RECORD_LENGTH_DESC
667 << std::setprecision(2)
672 os.seekp(960, std::ios_base::beg);
674 os << BITS_PER_PIXEL_DESC
679 << AQUIRED_BITS_PER_PIXEL_DESC
684 << std::resetiosflags(std::ios_base::right)
686 << std::setw(26) <<
SPACE <<
"\n";
688 os.seekp(1040, std::ios_base::beg);
690 os << BANDS_PRESENT_DESC
695 << std::setw(31) <<
SPACE <<
"\n" 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";
702 os.seekp(1520, std::ios_base::beg);
717 os.seekp(1536, std::ios_base::beg);
721 << std::setw(29) <<
SPACE <<
"\n";
728 os << std::resetiosflags(std::ios_base::left) << std::setiosflags(std::ios_base::right);
730 for (i = 0; i < 8; i++)
734 os << std::setprecision(15)
744 << std::setw(30) <<
SPACE <<
"\n";
747 os << std::resetiosflags(std::ios_base::right);
749 os.seekp(2256, std::ios_base::beg);
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";
771 os.seekp(3072, std::ios_base::beg);
775 << MAP_PROJECTION_NAME_DESC
777 << std::setiosflags(std::ios_base::left)
792 << std::resetiosflags(std::ios_base::left)
796 << PROJECTION_PARAMETER_DESC
799 os.seekp(PROJ_PARAM_OFFSET[0], std::ios_base::beg);
800 os << std::setprecision(15)
801 << std::setiosflags(std::ios_base::right)
807 os.seekp(PROJ_PARAM_OFFSET[1], std::ios_base::beg);
810 << std::setw(1) <<
SPACE <<
"\n";
816 for (i = 0; i < 4; i++)
818 for (
int j = i * 3 + 2; j < (i * 3) + 5; j++)
820 os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
824 << std::setw(1) <<
SPACE;
826 os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
829 << std::setw(1) <<
SPACE;
831 os.seekp(PROJ_PARAM_OFFSET[j], std::ios_base::beg);
834 << std::setw(5) <<
SPACE <<
"\n";
838 os.seekp(PROJ_PARAM_OFFSET[14], std::ios_base::beg);
841 << std::setw(55) <<
SPACE <<
"\n" << std::resetiosflags(std::ios_base::right);
844 os.seekp(3632, std::ios_base::beg);
857 << std::setprecision(3)
859 << std::setw(
EASTING_SIZE) << std::setiosflags(std::ios_base::right)
867 << std::setw(20) <<
SPACE <<
"\n" << std::resetiosflags(std::ios_base::right);
870 os.seekp(3712, std::ios_base::beg);
883 << std::setw(
EASTING_SIZE) << std::setiosflags(std::ios_base::right)
891 << std::setw(20) <<
SPACE <<
"\n" << std::resetiosflags(std::ios_base::right);
894 os.seekp(3792, std::ios_base::beg);
907 << std::setw(
EASTING_SIZE) << std::setiosflags(std::ios_base::right)
915 << std::setw(20) <<
SPACE <<
"\n" << std::resetiosflags(std::ios_base::right);
918 os.seekp(3872, std::ios_base::beg);
931 << std::setw(
EASTING_SIZE) << std::setiosflags(std::ios_base::right)
939 << std::setw(20) <<
SPACE <<
"\n" << std::resetiosflags(std::ios_base::right);
941 os.seekp(3952, std::ios_base::beg);
956 << std::setw(
EASTING_SIZE) << std::setiosflags(std::ios_base::right)
974 << std::setw(4) <<
SPACE <<
"\n";
976 os.seekp(4032, std::ios_base::beg);
977 os << HORIZONTAL_OFFSET_DESC
982 << ORIENTATION_ANGLE_DESC
985 << std::setprecision(2)
988 << std::setw(39) <<
SPACE <<
"\n";
990 os.seekp(4112, std::ios_base::beg);
991 os << SUN_ELEVATION_DESC
994 << std::setprecision(1)
1000 << std::setprecision(1)
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;
1271 for(i = 0; i < 15; i++)
1273 is.seekg(PROJ_PARAM_OFFSET[i], std::ios_base::beg);
1531 <<
"Stream corrupted. Returning from method." 1557 theTapeVolumeNumber(1),
1558 theNumberVolumesPerTape(1),
1559 thePixelsPerLine(0),
1560 theLinesPerImage(0),
1561 the1stLineInVolume(1),
1562 theTapeBlockingFactor(1),
1565 theOutputBitsPerPixel(8),
1566 theAcquiredBitsPerPixel(6)
1568 const char tmpBuff[] =
"";
1576 for (
int i = 0; i < 4; i++)
1601 for (
int i = 0; i < 8; i++)
1624 theCenterEasting(0.0),
1625 theCenterNorthing(0.0),
1628 theHorizontalOffset(0),
1629 theOrientationAngle(0.0),
1630 theSunElevationAngle(0.0),
1633 for (
int i = 0; i < 15; i++)
1638 const char tmpBuff[] =
"";
double theProjectionParams[15]
void print(std::ostream &os) const
std::ostream & operator<<(std::ostream &os, const ossimFfRevc &head)
const int OFF_NADIR_ANGLE_OFFSET[4]
char theProductOrderNumber[PRODUCT_ORDER_NUMBER_SIZE+1]
int theAcquiredBitsPerPixel
RadiomRecord theRadiomRecord
char theProductType[PRODUCT_TYPE_SIZE+1]
int theOutputBitsPerPixel
char theLrLon[LON_SIZE+1]
ossimString subScene(int sceneNbr=0) const
char theUlLat[LAT_SIZE+1]
void loadFromStream(ossim::istream &is)
static StreamFactoryRegistry * instance()
char theUrLat[LAT_SIZE+1]
double theOrientationAngle
int checkStream(ossim::istream &is)
char theMapProjectionName[MAP_PROJECTION_NAME_SIZE+1]
AdminRecord theAdminRecord
const int SENSOR_MODE_OFFSET[4]
int row(int sceneNbr=0) const
int path(int sceneNbr=0) const
void write(std::ostream &os) const
const int LOCATION_OFFSET[4]
char theProcessingType[PROCESSING_TYPE_SIZE+1]
const int SENSOR_NAME_OFFSET[4]
ErrorStatus theErrorStatus
char theProductSize[PRODUCT_SIZE_SIZE+1]
char theResampAlgorithm[RESAMPLING_ALGO_SIZE+1]
char theLlLon[LON_SIZE+1]
int theNumberVolumesPerTape
char thePathRowNumber[NUMBER_OF_SCENES][PATH_ROW_NUMBER_SIZE+1]
int theTapeBlockingFactor
char theDatum[DATUM_SIZE+1]
double theOffNadirAngle[NUMBER_OF_SCENES]
char theUlLon[LON_SIZE+1]
double theSunElevationAngle
char theCenterLon[LON_SIZE+1]
char theEllipsoid[ELLIPSOID_SIZE+1]
char theLlLat[LAT_SIZE+1]
std::basic_istream< char > istream
Base class for char input streams.
char theUrLon[LON_SIZE+1]
char theLrLat[LAT_SIZE+1]
const int PATH_ROW_NUMBER_OFFSET[4]
char theSatName[NUMBER_OF_SCENES][SAT_NAME_SIZE+1]
ossimString pathRow(int sceneNbr=0) const
int fraction(int sceneNbr=0) const
ossimString & gsub(const ossimString &searchKey, const ossimString &replacementValue, bool replaceAll=false)
Substitutes searchKey string with replacementValue and returns a reference to *this.
std::basic_istringstream< char > istringstream
Class for char input memory streams.
char theSensorName[NUMBER_OF_SCENES][SENSOR_NAME_SIZE+1]
const int SAT_NAME_OFFSET[4]
char theFormatVersion[FORMAT_VERSION_SIZE+1]
char theCenterLat[LAT_SIZE+1]
char theAcquisitionDate[NUMBER_OF_SCENES][DATE_SIZE+1]
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
char theBandsPresentString[BANDS_PRESENT_SIZE+1]
char theSensorMode[NUMBER_OF_SCENES][SENSOR_MODE_SIZE+1]