void ossimNitfTagInformation::parseStream(std::istream &in) { if(in) { clearFields(); theTagOffset = in.tellg(); in.read(theTagName, 6); in.read(theTagLength, 5); theTagDataOffset = in.tellg(); theTagData = ossimNitfTagFactoryRegistry::instance()->create(getTagName()); if (theTagData.valid()) { if (theTagData->getClassName() == "ossimNitfUnknownTag") { // Unknown tag doesn't know his tag name yet. theTagData->setTagName( getTagName() ); } //--- // Tags with dynamic tag length construct with 0 length. // Set if 0. //--- if ( theTagData->getTagLength() == 0 ) { theTagData->setTagLength( getTagLength() ); } // Sanity check fixed length in code with length from CEL field: else if ( theTagData->getTagLength() != getTagLength() ) { ossimNotify(ossimNotifyLevel_WARN) << "ossimNitfTagInformation::parseStream WARNING!" << "\nCEL field length does not match fixed tag length for tag: " << theTagData->getTagName().c_str() << "\nCEL: " << getTagLength() << "\nTag: " << theTagData->getTagLength() << std::endl; } theTagData->parseStream(in); } else { theTagData = (ossimNitfRegisteredTag*)NULL; } } }
std::ostream& ossimNitfStdidcTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "ACQDATE:" << theAcqDate << "\n" << pfx << std::setw(24) << "MISSION:" << theMission << "\n" << pfx << std::setw(24) << "PASS:"******"\n" << pfx << std::setw(24) << "OPNUM:" << theOpNum << "\n" << pfx << std::setw(24) << "STARTSEGMENT:" << theStartSegment << "\n" << pfx << std::setw(24) << "REPRONUM:" << theReproNum << "\n" << pfx << std::setw(24) << "REPLAYREGEN:" << theReplayRegen << "\n" << pfx << std::setw(24) << "STARTCOLUMN:" << theStartColumn << "\n" << pfx << std::setw(24) << "STARTROW:" << theStartRow << "\n" << pfx << std::setw(24) << "ENDSEGMENT:" << theEndSegment << "\n" << pfx << std::setw(24) << "ENDCOLUMN:" << theEndColumn << "\n" << pfx << std::setw(24) << "ENDROW:" << theEndRow << "\n" << pfx << std::setw(24) << "COUNTRY:" << theCountry << "\n" << pfx << std::setw(24) << "WAC:" << theWac << "\n" << pfx << std::setw(24) << "LOCATION:" << theLocation << "\n"; return out; }
std::ostream& ossimNitfCscrnaTag::print( std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "PREDICT_CORNERS:" << thePredictedCornerFlag << "\n" << pfx << std::setw(24) << "ULCRN_LAT:" << theUlLat << "\n" << pfx << std::setw(24) << "ULCRN_LON:" << theUlLon << "\n" << pfx << std::setw(24) << "ULCRN_HT:" << theUlHt << "\n" << pfx << std::setw(24) << "URCRN_LAT:" << theUrLat << "\n" << pfx << std::setw(24) << "URCRN_LON:" << theUrLon << "\n" << pfx << std::setw(24) << "URCRN_HT:" << theUrHt << "\n" << pfx << std::setw(24) << "LRCRN_LAT:" << theLrLat << "\n" << pfx << std::setw(24) << "LRCRN_LON:" << theLrLon << "\n" << pfx << std::setw(24) << "LRCRN_HT:" << theLrHt << "\n" << pfx << std::setw(24) << "LLCRN_LAT:" << theLlLat << "\n" << pfx << std::setw(24) << "LLCRN_LON:" << theLlLon << "\n" << pfx << std::setw(24) << "LLCRN_HT:" << theLlHt << "\n"; return out; }
std::ostream& ossimNitfJ2klraTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "ORIG:" << m_orig << "\n" << pfx << std::setw(24) << "NLEVELS_O:" << m_levels_o << "\n" << pfx << std::setw(24) << "NBANDS_O:" << m_bands_o << "\n" << pfx << std::setw(24) << "NLAYERS_O:" << m_layers_o << "\n"; ossim_uint32 size = m_layer.size(); for ( ossim_uint32 i = 0; i < size; ++i ) { out << pfx << "LAYER_ID[" << i << std::setw(14) << "]:" << m_layer[i].m_layer_id << "\n" << pfx << "BITRATE[" << i << std::setw(15) << "]:" << m_layer[i].m_bitrate << "\n"; } // Conditional: if ( isParsed() ) { out << pfx << std::setw(24) << "NLEVELS_I:" << m_nlevels_i << "\n" << pfx << std::setw(24) << "NBANDS_I_SIZE:" << m_nbands_i << "\n" << pfx << std::setw(24) << "NLAYERS_I:" << m_nlayers_i << "\n"; } return out; }
std::ostream& rspfNitfProjectionParameterTag::print( std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getRegisterTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getRegisterTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "PRN:" << theProjectionName << "\n" << pfx << std::setw(24) << "PCO:" << theProjectionCode << "\n" << pfx << std::setw(24) << "NUM_PRJ:" << theNumberOfParameters << "\n"; for (rspf_uint32 i = 0; i < theProjectionParameters.size(); ++i) { rspfString s = "PRJ"; s += rspfString::toString(i); s += ":"; out << pfx << std::setw(24) << s << theProjectionParameters[i] << "\n"; } out << pfx << std::setw(24) << "XOR:" <<theFalseXOrigin << "\n" << pfx << std::setw(24) << "YOR:" <<theFalseYOrigin << std::endl; return out; }
std::ostream& ossimNitfGeoPositioningTag::print( std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "TYP:" << theType << "\n" << pfx << std::setw(24) << "UNI:" << theCoordinateUnits << "\n" << pfx << std::setw(24) << "DAG:" << theGeodeticDatumName << "\n" << pfx << std::setw(24) << "DCD:" << theGeodeticDatumCode << "\n" << pfx << std::setw(24) << "ELL:" << theEllipsoidName << "\n" << pfx << std::setw(24) << "ELC:" << theEllipsoidCode << "\n" << pfx << std::setw(24) << "DVR:" << theVerticalDatumReference << "\n" << pfx << std::setw(24) << "VDCDVR:" << theVerticalReferenceCode << "\n" << pfx << std::setw(24) << "SDA:" << theSoundingDatumName << "\n" << pfx << std::setw(24) << "VDCSDA:" << theSoundingDatumCode << "\n" << pfx << std::setw(24) << "ZOR:" << theZFalseOrigin << "\n" << pfx << std::setw(24) << "GRD:" << theGridCode << "\n" << pfx << std::setw(24) << "GRN:" << theGridDescription << "\n" << pfx << std::setw(24) << "ZNA:" << theGridZoneNumber << "\n"; return out; }
std::ostream& ossimNitfCsproaTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagLength(); pfx += "."; out << setiosflags(ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "RESERVED1:" << m_reserved1 << "\n" << pfx << std::setw(24) << "RESERVED2:" << m_reserved2 << "\n" << pfx << std::setw(24) << "RESERVED3:" << m_reserved3 << "\n" << pfx << std::setw(24) << "RESERVED4:" << m_reserved4 << "\n" << pfx << std::setw(24) << "RESERVED5:" << m_reserved5 << "\n" << pfx << std::setw(24) << "RESERVED6:" << m_reserved6 << "\n" << pfx << std::setw(24) << "RESERVED7:" << m_reserved7 << "\n" << pfx << std::setw(24) << "RESERVED8:" << m_reserved8 << "\n" << pfx << std::setw(24) << "RESERVED9:" << m_reserved9 << "\n" << pfx << std::setw(24) << "BWC:" << m_bwc << "\n"; return out; }
std::ostream& ossimNitfCsccgaTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "CCG_SOURCE:" << m_ccgSource << "\n" << pfx << std::setw(24) << "CCG_SOURCE:" << m_regSensor << "\n" << pfx << std::setw(24) << "ORIGIN_LINE:" << m_originLine << "\n" << pfx << std::setw(24) << "ORIGIN_SAMPLE:" << m_originSample << "\n" << pfx << std::setw(24) << "AS_CELL_SIZE:" << m_asCellSize << "\n" << pfx << std::setw(24) << "CS_CELL_SIZE:" << m_csCellSize << "\n" << pfx << std::setw(24) << "CCG_MAX_LINE:" << m_ccgMaxLine << "\n" << pfx << std::setw(24) << "CCG_MAX_SAMPLE:" << m_ccgMaxSample << "\n"; return out; }
std::ostream& ossimNitfBlockaTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; // Grab the corners parsed into points. ossimDpt ulPt; ossimDpt urPt; ossimDpt lrPt; ossimDpt llPt; getFrfcLoc(ulPt); getFrlcLoc(urPt); getLrlcLoc(lrPt); getLrfcLoc(llPt); out << setiosflags(ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "BLOCK_INSTANCE:" << theBlockInstance << "\n" << pfx << std::setw(24) << "N_GRAY:" << theNGray << "\n" << pfx << std::setw(24) << "L_LINES:" << theLLines << "\n" << pfx << std::setw(24) << "LAYOVER_ANGLE:" << theLayoverAngle << "\n" << pfx << std::setw(24) << "SHADOW_ANGLE:" << theShadowAngle << "\n" << pfx << std::setw(24) << "FIELD_6:" << theField6 << "\n" << pfx << std::setw(24) << "FRLC_LOC:" << theFrlcLoc << "\n" << pfx << std::setw(24) << "LRLC_LOC:" << theLrlcLoc << "\n" << pfx << std::setw(24) << "LRFC_LOC:" << theLrfcLoc << "\n" << pfx << std::setw(24) << "FRFC_LOC:" << theFrfcLoc << "\n" << pfx << std::setw(24) << "FIELD_11:" << theField11 << "\n" << pfx << std::setw(24) << "upper left:" << ulPt << "\n" << pfx << std::setw(24) << "upper right:" << urPt << "\n" << pfx << std::setw(24) << "lower right:" << lrPt << "\n" << pfx << std::setw(24) << "lower left:" << llPt << "\n"; return out; }
std::ostream& rspfNitfIchipbTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "XFRM_FLAG:" << theXfrmFlag << "\n" << pfx << std::setw(24) << "SCALE_FACTOR:" << theScaleFactor << "\n" << pfx << std::setw(24) << "ANAMRPH_CORR:" << theAnamrphCorr << "\n" << pfx << std::setw(24) << "SCANBLK_NUM:" << theScanBlock << "\n" << pfx << std::setw(24) << "OP_ROW_11:" << theOpRow11 << "\n" << pfx << std::setw(24) << "OP_COL_11:" << theOpCol11 << "\n" << pfx << std::setw(24) << "OP_ROW_12:" << theOpRow12 << "\n" << pfx << std::setw(24) << "OP_COL_12:" << theOpCol12 << "\n" << pfx << std::setw(24) << "OP_ROW_21:" << theOpRow21 << "\n" << pfx << std::setw(24) << "OP_COL_21:" << theOpCol21 << "\n" << pfx << std::setw(24) << "OP_ROW_22:" << theOpRow22 << "\n" << pfx << std::setw(24) << "OP_COL_22:" << theOpCol22 << "\n" << pfx << std::setw(24) << "FI_ROW_11:" << theFiRow11 << "\n" << pfx << std::setw(24) << "FI_COL_11:" << theFiCol11 << "\n" << pfx << std::setw(24) << "FI_ROW_12:" << theFiRow12 << "\n" << pfx << std::setw(24) << "FI_COL_12:" << theFiCol12 << "\n" << pfx << std::setw(24) << "FI_ROW_21:" << theFiRow21 << "\n" << pfx << std::setw(24) << "FI_COL_21:" << theFiCol21 << "\n" << pfx << std::setw(24) << "FI_ROW_22:" << theFiRow22 << "\n" << pfx << std::setw(24) << "FI_COL_22:" << theFiCol22 << "\n" << pfx << std::setw(24) << "FI_ROW:" << theFullImageRow << "\n" << pfx << std::setw(24) << "FI_COL:" << theFullImageCol << std::endl; return out; }
std::ostream& ossimNitfSensraTag::print( std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << std::setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "REFROW:" << theRefRow << "\n" << pfx << std::setw(24) << "REFCOL:" << theRefCol << "\n" << pfx << std::setw(24) << "SENSORMODEL:" << theSensorModel<< "\n" << pfx << std::setw(24) << "SENSORMOUNT:" << theSensorMount << "\n" << pfx << std::setw(24) << "SENSORLOC:" << theSensorLoc << "\n" << pfx << std::setw(24) << "SENSORALTSRC:" << theSensorAltSrc<< "\n" << pfx << std::setw(24) << "SENSORALT:" << theSensorAlt << "\n" << pfx << std::setw(24) << "SENSORALTUNIT:" << theSensorAltUnit << "\n" << pfx << std::setw(24) << "SENSORAGL:" << theSensorAgl << "\n" << pfx << std::setw(24) << "SENSORPITCH:" << theSensorPitch << "\n" << pfx << std::setw(24) << "SENSORROLL:" << theSensorRoll<< "\n" << pfx << std::setw(24) << "SENSORYAW:" << theSensorYaw << "\n" << pfx << std::setw(24) << "PLATFORMPITCH:" << thePlatformPitch << "\n" << pfx << std::setw(24) << "PLATFORMROLL:" << thePlatformRoll << "\n" << pfx << std::setw(24) << "PLATFORMHDG:" << thePlatformHdg << "\n" << pfx << std::setw(24) << "GROUNDSPDSRC:" << theGroundSpdSrc << "\n" << pfx << std::setw(24) << "GROUNDSPEED:" << theGroundSpeed << "\n" << pfx << std::setw(24) << "GROUNDSPDUNIT:" << theGroundSpdUnit << "\n" << pfx << std::setw(24) << "GROUNDTRACK:" << theGroundTrack << "\n" << pfx << std::setw(24) << "VERTICALVEL:" << theVerticalVel<< "\n" << pfx << std::setw(24) << "VERTVELUNIT:" << theVertVelUnit << "\n" << pfx << std::setw(24) << "SWATHFRAMES:" << theSwathFrames<< "\n" << pfx << std::setw(24) << "NSWATHS:" << theNSwaths << "\n" << pfx << std::setw(24) << "SPOTNUM:" << theSpotNum << "\n"; return out; }
std::ostream& ossimNitfUnknownTag::print(std::ostream& out, const std::string& prefix) const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(std::ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "unformatted_tag_data: "; if (tagDataIsAscii()) { out << m_tagData << "\n"; } else { out << "binary not displayed\n"; } return out; }
std::ostream& ossimNitfExoptaTag::print(std::ostream& out, const std::string& prefix )const { std::string pfx = prefix; pfx += getTagName(); pfx += "."; out << setiosflags(ios::left) << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n" << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n" << pfx << std::setw(24) << "ANGLE_TO_NORTH:" << m_angleToNorth<< "\n" << pfx << std::setw(24) << "DYNAMIC_RANGE:" << m_dynamicRange<< "\n" << pfx << std::setw(24) << "OBL_ANG:" << m_oblAng<< "\n" << pfx << std::setw(24) << "ROLL_ANG:" << m_rollAng<< "\n" << pfx << std::setw(24) << "PRIME_ID:" << m_primeId<< "\n" << pfx << std::setw(24) << "PRIME_BE:" << m_primeBe<< "\n" << pfx << std::setw(24) << "N_SEC" << m_nSec<< "\n" << pfx << std::setw(24) << "N_SEG:" << m_nSeg<< "\n" << pfx << std::setw(24) << "MAX_LP_SEG:" << m_maxLpSeg<< "\n" << pfx << std::setw(24) << "SUN_EL:" << m_sunEl<< "\n" << pfx << std::setw(24) << "SUN_AZ:" << m_sunAz<< "\n"; return out; }
ossim_uint32 ossimNitfTagInformation::getTotalTagLength()const { return (getTagLength() + (ossim_uint32)11); }
ossim_uint32 ossimNitfRegisteredTag::getSizeInBytes() const { // Deprecated: return getTagLength(); }
rspf_uint32 rspfNitfTagInformation::getTotalTagLength()const { return (getTagLength() + (rspf_uint32)11); }