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

#include <ossimPleiadesDimapSupportData.h>

Inheritance diagram for ossimplugins::ossimPleiadesDimapSupportData:
ossimObject ossimErrorStatusInterface ossimReferenced

Public Types

enum  ossimPleiadesDIMAPVersion { OSSIM_PLEIADES_UNKNOWN, OSSIM_PLEIADES_DIMAPv1, OSSIM_PLEIADES_DIMAPv2 }
 
enum  ossimPleiadesMetadataSubProfile { OSSIM_PLEIADES_METADATA_SUBPROFILE_UNKNOWN = 0, OSSIM_PLEIADES_METADATA_SUBPROFILE_PRODUCT = 1, OSSIM_PLEIADES_METADATA_SUBPROFILE_RPC = 2 }
 metadata subprofile type More...
 

Public Member Functions

 ossimPleiadesDimapSupportData ()
 
virtual ~ossimPleiadesDimapSupportData ()
 
void clearFields ()
 
bool parseXmlFile (const ossimFilename &file)
 
void printInfo (ostream &os) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of the object to a keyword list. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of the object from a keyword list. More...
 
ossimString getSensorID () const
 
ossimString getProcessingLevel () const
 
ossimString getAcquisitionDate () const
 
ossimString getProductionDate () const
 
ossimString getImageID () const
 
ossimString getInstrument () const
 
ossimString getInstrumentIndex () const
 
ossim_uint32 getNumberOfBands () const
 
void getSunAzimuth (std::vector< ossim_float64 > &az) const
 
void getSunElevation (std::vector< ossim_float64 > &el) const
 
void getImageSize (ossimIpt &sz) const
 
void getIncidenceAngle (std::vector< ossim_float64 > &ia) const
 
void getViewingAngle (std::vector< ossim_float64 > &va) const
 
void getAcrossTrackIncidenceAngle (std::vector< ossim_float64 > &act) const
 
void getAlongTrackIncidenceAngle (std::vector< ossim_float64 > &alt) const
 
void getUlCorner (ossimGpt &pt) const
 
void getUrCorner (ossimGpt &pt) const
 
void getLrCorner (ossimGpt &pt) const
 
void getLlCorner (ossimGpt &pt) const
 
void getRefGroundPoint (ossimGpt &gp) const
 Center of frame, sub image if there is one. More...
 
void getRefImagePoint (ossimDpt &rp) const
 zero base center point More...
 
void getImageRect (ossimDrect &rect) const
 Zero based image rectangle, sub image if there is one. More...
 
bool allMetadataRead ()
 
std::vector< double > getLineNumCoeff () const
 
std::vector< double > getLineDenCoeff () const
 
std::vector< double > getSampNumCoeff () const
 
std::vector< double > getSampDenCoeff () const
 
ossim_int32 getLineOffset () const
 
ossim_int32 getSampOffset () const
 
double getLatOffset () const
 
double getLonOffset () const
 
double getHeightOffset () const
 
double getLineScale () const
 
double getSampScale () const
 
double getLatScale () const
 
double getLonScale () const
 
double getHeightScale () const
 
ossimString getTimeRangeStart () const
 
ossimString getTimeRangeEnd () const
 
ossim_float64 getLinePeriod () const
 
ossim_int32 getSwathFirstCol () const
 
ossim_int32 getSwathLastCol () const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 

Private Member Functions

ossimGpt createGround (const ossimString &s) const
 
ossimDpt createDpt (const ossimString &s) const
 
ossimIpt createIpt (const ossimString &s) const
 
bool parseRPCMetadata (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseMetadataIdentificationDIMAPv1 (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseMetadataIdentificationDIMAPv2 (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseDatasetIdentification (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Dataset Identification: More...
 
bool parseDatasetContent (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Dataset Content: More...
 
bool parseProductInformation (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Product Information: More...
 
bool parseCoordinateReferenceSystem (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Coordinate Reference System: More...
 
bool parseGeoposition (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Geoposition: More...
 
bool parseProcessingInformation (ossimRefPtr< ossimXmlDocument > xmlDocument)
 Processing Information: More...
 
bool parseRasterData (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseRadiometricData (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseGeometricData (ossimRefPtr< ossimXmlDocument > xmlDocument)
 
bool parseQualityAssessment (ossimRefPtr< ossimXmlDocument > xmlDocument)
 QualityAssessment: More...
 
bool parseDatasetSources (ossimRefPtr< ossimXmlDocument > xmlDocument)
 

Private Attributes

ossimPleiadesDIMAPVersion theDIMAPVersion
 
ossimPleiadesMetadataSubProfile theMetadataSubProfile
 
bool theProductIsOk
 
bool theRpcIsOk
 
ossimString theXmlDocumentRoot
 
ossimString theSensorID
 
ossimString theImageID
 
ossimString theProductionDate
 
ossimString theAcquisitionDate
 
ossimString theInstrument
 
ossimString theInstrumentIndex
 
ossimString theProcessingLevelString
 
ossimString theSpectralProcessingString
 
std::vector< ossim_float64theSunAzimuth
 
std::vector< ossim_float64theSunElevation
 
std::vector< ossim_float64theIncidenceAngle
 
std::vector< ossim_float64theViewingAngle
 
std::vector< ossim_float64theAzimuthAngle
 
std::vector< ossim_float64theAlongTrackIncidenceAngle
 
std::vector< ossim_float64theAcrossTrackIncidenceAngle
 
ossimIpt theImageSize
 
ossimIpt theTileSize
 
ossim_uint32 theNumberOfMegaTilesInRow
 
ossim_uint32 theNumberOfMegaTilesInCol
 
ossim_uint32 theNumberOfMegaTiles
 
ossimBooleanProperty theMultiDataFile
 
ossim_uint32 theNumBands
 
std::vector< ossimStringtheBandOrder
 
std::vector< ossim_float64thePhysicalBias
 Calibration information for radiometric corrections. More...
 
std::vector< ossim_float64thePhysicalGain
 
std::vector< ossim_float64theSolarIrradiance
 
ossimGpt theUlCorner
 
ossimGpt theUrCorner
 
ossimGpt theLrCorner
 
ossimGpt theLlCorner
 
ossimString theSpecId
 
double theErrBias
 
double theErrBiasX
 
double theErrBiasY
 
double theErrRand
 
double theLineOffset
 
double theSampOffset
 
double theLatOffset
 
double theLonOffset
 
double theHeightOffset
 
double theLineScale
 
double theSampScale
 
double theLatScale
 
double theLonScale
 
double theHeightScale
 
std::vector< double > theLineNumCoeff
 
std::vector< double > theLineDenCoeff
 
std::vector< double > theSampNumCoeff
 
std::vector< double > theSampDenCoeff
 
ossimString theTimeRangeStart
 
ossimString theTimeRangeEnd
 
ossim_float64 theLinePeriod
 
ossim_int32 theSwathFirstCol
 
ossim_int32 theSwathLastCol
 
ossimGpt theRefGroundPoint
 Center of frame on ground, if sub image it's the center of that. More...
 
ossimDpt theRefImagePoint
 Zero based center of frame. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 56 of file ossimPleiadesDimapSupportData.h.

Member Enumeration Documentation

◆ ossimPleiadesDIMAPVersion

◆ ossimPleiadesMetadataSubProfile

Constructor & Destructor Documentation

◆ ossimPleiadesDimapSupportData()

ossimplugins::ossimPleiadesDimapSupportData::ossimPleiadesDimapSupportData ( )

Definition at line 127 of file ossimPleiadesDimapSupportData.cpp.

131  theProductIsOk(false),
132  theRpcIsOk(false),
134 
135  theSensorID(),
136  theImageID(),
139  theInstrument(),
143 
144  theSunAzimuth(),
145  theSunElevation(),
147  theViewingAngle(),
148  theAzimuthAngle(),
151 
152  theImageSize(0, 0),
153  theTileSize(0, 0),
158 
159  theNumBands(0),
160  theBandOrder(),
161 
162  thePhysicalBias(),
163  thePhysicalGain(),
165 
166  theUlCorner(),
167  theUrCorner(),
168  theLrCorner(),
169  theLlCorner(),
170 
171  theSpecId(),
172  theErrBias(0),
173  theErrBiasX(0),
174  theErrBiasY(0),
175  theErrRand(0),
176  theLineOffset(0),
177  theSampOffset(0),
178  theLatOffset(0),
179  theLonOffset(0),
180  theHeightOffset(0),
181  theLineScale(0),
182  theSampScale(0),
183  theLatScale(0),
184  theLonScale(0),
185  theHeightScale(0),
186  theLineNumCoeff(),
187  theLineDenCoeff(),
188  theSampNumCoeff(),
189  theSampDenCoeff(),
190 
192  theTimeRangeEnd(),
193  theLinePeriod(0.0),
194  theSwathFirstCol(0),
195  theSwathLastCol(0),
196 
197  theRefGroundPoint(0.0, 0.0, 0.0),
198  theRefImagePoint(0.0, 0.0)
199  {
200  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
ossimDpt theRefImagePoint
Zero based center of frame.
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.

◆ ~ossimPleiadesDimapSupportData()

ossimplugins::ossimPleiadesDimapSupportData::~ossimPleiadesDimapSupportData ( )
virtual

Definition at line 202 of file ossimPleiadesDimapSupportData.cpp.

203  {
204  }

Member Function Documentation

◆ allMetadataRead()

bool ossimplugins::ossimPleiadesDimapSupportData::allMetadataRead ( )
inline

◆ clearFields()

void ossimplugins::ossimPleiadesDimapSupportData::clearFields ( )

Definition at line 207 of file ossimPleiadesDimapSupportData.cpp.

References ossimErrorStatusInterface::clearErrorStatus(), ossimIpt::makeNan(), ossimDpt::makeNan(), ossimGpt::makeNan(), OSSIM_PLEIADES_METADATA_SUBPROFILE_UNKNOWN, OSSIM_PLEIADES_UNKNOWN, ossimBooleanProperty::setBooleanValue(), theAcquisitionDate, theAcrossTrackIncidenceAngle, theAlongTrackIncidenceAngle, theAzimuthAngle, theBandOrder, theDIMAPVersion, theErrBias, theErrBiasX, theErrBiasY, theErrRand, theHeightOffset, theHeightScale, theImageID, theImageSize, theIncidenceAngle, theInstrument, theInstrumentIndex, theLatOffset, theLatScale, theLineDenCoeff, theLineNumCoeff, theLineOffset, theLinePeriod, theLineScale, theLlCorner, theLonOffset, theLonScale, theLrCorner, theMetadataSubProfile, theMultiDataFile, theNumBands, theNumberOfMegaTiles, theNumberOfMegaTilesInCol, theNumberOfMegaTilesInRow, thePhysicalBias, thePhysicalGain, theProcessingLevelString, theProductionDate, theProductIsOk, theRefGroundPoint, theRefImagePoint, theRpcIsOk, theSampDenCoeff, theSampNumCoeff, theSampOffset, theSampScale, theSensorID, theSolarIrradiance, theSpecId, theSpectralProcessingString, theSunAzimuth, theSunElevation, theSwathFirstCol, theSwathLastCol, theTileSize, theTimeRangeEnd, theTimeRangeStart, theUlCorner, theUrCorner, theViewingAngle, and theXmlDocumentRoot.

Referenced by loadState(), and parseXmlFile().

208  {
212  theProductIsOk = false;
213  theRpcIsOk = false;
214  theXmlDocumentRoot = "";
215  theImageID = "";
216  theSensorID="";
217  theProductionDate = "";
218  theAcquisitionDate = "";
219  theInstrument = "";
220  theInstrumentIndex = "";
223 
224  theSunAzimuth.clear();
225  theSunElevation.clear();
226  theIncidenceAngle.clear();
227  theViewingAngle.clear();
228  theAzimuthAngle.clear();
229 
232 
238  ossimString msg = "";
239  theMultiDataFile.setBooleanValue(false, msg);
240 
241  theNumBands = 0;
242  theBandOrder.clear();
243 
244  thePhysicalBias.clear();
245  thePhysicalGain.clear();
246  theSolarIrradiance.clear();
247 
248  //---
249  // Corner points:
250  //---
255 
258 
259  //---
260  // RPC model parameters
261  //---
262  theErrBias = 0.0;
263  theErrBiasX = 0.0;
264  theErrBiasY = 0.0;
265  theErrRand = 0.0;
266  theLineOffset = 0.0;
267  theSampOffset = 0.0;
268  theLatOffset = 0.0;
269  theLonOffset = 0.0;
270  theHeightOffset = 0.0;
271  theLineScale = 0.0;
272  theSampScale = 0.0;
273  theLatScale = 0.0;
274  theLonScale = 0.0;
275  theHeightScale = 0.0;
276  theLineNumCoeff.clear();
277  theLineDenCoeff.clear();
278  theSampNumCoeff.clear();
279  theSampDenCoeff.clear();
280  theSpecId = "";
281 
282  theTimeRangeStart = "";
283  theTimeRangeEnd = "";
284  theLinePeriod = 0.0;
285  theSwathFirstCol = 0;
286  theSwathLastCol = 0;
287  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
void makeNan()
Definition: ossimIpt.h:56
void makeNan()
Definition: ossimGpt.h:130
ossimDpt theRefImagePoint
Zero based center of frame.
bool setBooleanValue(bool value, ossimString &msg)
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.
void makeNan()
Definition: ossimDpt.h:65

◆ createDpt()

ossimDpt ossimplugins::ossimPleiadesDimapSupportData::createDpt ( const ossimString s) const
private

Definition at line 1224 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::string(), x, and y.

Referenced by loadState().

1225  {
1226  std::istringstream in(s.string());
1227  ossimString x, y;
1228  ossimString code;
1229 
1230  in >> x.string() >> y.string();
1231 
1232  return ossimDpt(x.toDouble(), y.toDouble());
1233 
1234  }
ossim_uint32 x
ossim_uint32 y
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
const std::string & string() const
Definition: ossimString.h:414

◆ createGround()

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::createGround ( const ossimString s) const
private

Definition at line 1209 of file ossimPleiadesDimapSupportData.cpp.

References ossimDatumFactory::create(), ossimDatumFactory::instance(), and ossimString::string().

Referenced by loadState().

1210  {
1211  std::istringstream in(s.string());
1212  ossimString lat, lon, height;
1213  ossimString code;
1214 
1215  in >> lat.string() >> lon.string() >> height.string() >> code.string();
1216 
1217  return ossimGpt(lat.toDouble(),
1218  lon.toDouble(),
1219  height.toDouble(),
1221 
1222  }
virtual const ossimDatum * create(const ossimString &code) const
create method
static ossimDatumFactory * instance()
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
const std::string & string() const
Definition: ossimString.h:414

◆ createIpt()

ossimIpt ossimplugins::ossimPleiadesDimapSupportData::createIpt ( const ossimString s) const
private

Definition at line 1236 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::string(), x, and y.

Referenced by loadState().

1237  {
1238  std::istringstream in(s.string());
1239  ossimString x, y;
1240  ossimString code;
1241 
1242  in >> x.string() >> y.string();
1243 
1244  return ossimIpt(x.toInt(), y.toInt());
1245 
1246  }
ossim_uint32 x
ossim_uint32 y
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
const std::string & string() const
Definition: ossimString.h:414

◆ getAcquisitionDate()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getAcquisitionDate ( ) const

Definition at line 610 of file ossimPleiadesDimapSupportData.cpp.

References theAcquisitionDate.

◆ getAcrossTrackIncidenceAngle()

void ossimplugins::ossimPleiadesDimapSupportData::getAcrossTrackIncidenceAngle ( std::vector< ossim_float64 > &  act) const

Definition at line 665 of file ossimPleiadesDimapSupportData.cpp.

References theAcrossTrackIncidenceAngle.

666  {
668  }

◆ getAlongTrackIncidenceAngle()

void ossimplugins::ossimPleiadesDimapSupportData::getAlongTrackIncidenceAngle ( std::vector< ossim_float64 > &  alt) const

Definition at line 670 of file ossimPleiadesDimapSupportData.cpp.

References theAlongTrackIncidenceAngle.

671  {
673  }

◆ getHeightOffset()

double ossimplugins::ossimPleiadesDimapSupportData::getHeightOffset ( ) const
inline

◆ getHeightScale()

double ossimplugins::ossimPleiadesDimapSupportData::getHeightScale ( ) const
inline

◆ getImageID()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getImageID ( ) const

Definition at line 620 of file ossimPleiadesDimapSupportData.cpp.

References theImageID.

◆ getImageRect()

void ossimplugins::ossimPleiadesDimapSupportData::getImageRect ( ossimDrect rect) const

Zero based image rectangle, sub image if there is one.

Definition at line 706 of file ossimPleiadesDimapSupportData.cpp.

References theImageSize, ossimIpt::x, and ossimIpt::y.

707  {
708  rect = ossimDrect(0.0, 0.0, theImageSize.x-1.0, theImageSize.y-1.0);
709  }
ossim_int32 y
Definition: ossimIpt.h:142
ossim_int32 x
Definition: ossimIpt.h:141

◆ getImageSize()

void ossimplugins::ossimPleiadesDimapSupportData::getImageSize ( ossimIpt sz) const

Definition at line 645 of file ossimPleiadesDimapSupportData.cpp.

References theImageSize.

◆ getIncidenceAngle()

void ossimplugins::ossimPleiadesDimapSupportData::getIncidenceAngle ( std::vector< ossim_float64 > &  ia) const

Definition at line 655 of file ossimPleiadesDimapSupportData.cpp.

References theIncidenceAngle.

656  {
657  ia = theIncidenceAngle;
658  }

◆ getInstrument()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getInstrument ( ) const

Definition at line 625 of file ossimPleiadesDimapSupportData.cpp.

References theInstrument.

◆ getInstrumentIndex()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getInstrumentIndex ( ) const

Definition at line 630 of file ossimPleiadesDimapSupportData.cpp.

References theInstrumentIndex.

◆ getLatOffset()

double ossimplugins::ossimPleiadesDimapSupportData::getLatOffset ( ) const
inline

◆ getLatScale()

double ossimplugins::ossimPleiadesDimapSupportData::getLatScale ( ) const
inline

◆ getLineDenCoeff()

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::getLineDenCoeff ( ) const
inline

Definition at line 145 of file ossimPleiadesDimapSupportData.h.

◆ getLineNumCoeff()

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::getLineNumCoeff ( ) const
inline

Definition at line 144 of file ossimPleiadesDimapSupportData.h.

◆ getLineOffset()

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::getLineOffset ( ) const
inline

◆ getLinePeriod()

ossim_float64 ossimplugins::ossimPleiadesDimapSupportData::getLinePeriod ( ) const
inline

◆ getLineScale()

double ossimplugins::ossimPleiadesDimapSupportData::getLineScale ( ) const
inline

◆ getLlCorner()

void ossimplugins::ossimPleiadesDimapSupportData::getLlCorner ( ossimGpt pt) const

Definition at line 701 of file ossimPleiadesDimapSupportData.cpp.

References theLlCorner.

◆ getLonOffset()

double ossimplugins::ossimPleiadesDimapSupportData::getLonOffset ( ) const
inline

◆ getLonScale()

double ossimplugins::ossimPleiadesDimapSupportData::getLonScale ( ) const
inline

◆ getLrCorner()

void ossimplugins::ossimPleiadesDimapSupportData::getLrCorner ( ossimGpt pt) const

Definition at line 696 of file ossimPleiadesDimapSupportData.cpp.

References theLrCorner.

◆ getNumberOfBands()

ossim_uint32 ossimplugins::ossimPleiadesDimapSupportData::getNumberOfBands ( ) const

Definition at line 650 of file ossimPleiadesDimapSupportData.cpp.

References theNumBands.

651  {
652  return theNumBands;
653  }

◆ getProcessingLevel()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getProcessingLevel ( ) const

◆ getProductionDate()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getProductionDate ( ) const

Definition at line 615 of file ossimPleiadesDimapSupportData.cpp.

References theProductionDate.

◆ getRefGroundPoint()

void ossimplugins::ossimPleiadesDimapSupportData::getRefGroundPoint ( ossimGpt gp) const

Center of frame, sub image if there is one.

Definition at line 676 of file ossimPleiadesDimapSupportData.cpp.

References theRefGroundPoint.

677  {
678  gp = theRefGroundPoint;
679  }
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.

◆ getRefImagePoint()

void ossimplugins::ossimPleiadesDimapSupportData::getRefImagePoint ( ossimDpt rp) const

zero base center point

Definition at line 681 of file ossimPleiadesDimapSupportData.cpp.

References theRefImagePoint.

682  {
683  rp = theRefImagePoint;
684  }
ossimDpt theRefImagePoint
Zero based center of frame.

◆ getSampDenCoeff()

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::getSampDenCoeff ( ) const
inline

Definition at line 147 of file ossimPleiadesDimapSupportData.h.

◆ getSampNumCoeff()

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::getSampNumCoeff ( ) const
inline

Definition at line 146 of file ossimPleiadesDimapSupportData.h.

◆ getSampOffset()

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::getSampOffset ( ) const
inline

◆ getSampScale()

double ossimplugins::ossimPleiadesDimapSupportData::getSampScale ( ) const
inline

◆ getSensorID()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getSensorID ( ) const

Definition at line 605 of file ossimPleiadesDimapSupportData.cpp.

References theSensorID.

◆ getSunAzimuth()

void ossimplugins::ossimPleiadesDimapSupportData::getSunAzimuth ( std::vector< ossim_float64 > &  az) const

Definition at line 635 of file ossimPleiadesDimapSupportData.cpp.

References theSunAzimuth.

636  {
637  az = theSunAzimuth;
638  }

◆ getSunElevation()

void ossimplugins::ossimPleiadesDimapSupportData::getSunElevation ( std::vector< ossim_float64 > &  el) const

Definition at line 640 of file ossimPleiadesDimapSupportData.cpp.

References theSunElevation.

641  {
642  el = theSunElevation;
643  }

◆ getSwathFirstCol()

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::getSwathFirstCol ( ) const
inline

◆ getSwathLastCol()

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::getSwathLastCol ( ) const
inline

◆ getTimeRangeEnd()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getTimeRangeEnd ( ) const
inline

◆ getTimeRangeStart()

ossimString ossimplugins::ossimPleiadesDimapSupportData::getTimeRangeStart ( ) const
inline

◆ getUlCorner()

void ossimplugins::ossimPleiadesDimapSupportData::getUlCorner ( ossimGpt pt) const

Definition at line 686 of file ossimPleiadesDimapSupportData.cpp.

References theUlCorner.

◆ getUrCorner()

void ossimplugins::ossimPleiadesDimapSupportData::getUrCorner ( ossimGpt pt) const

Definition at line 691 of file ossimPleiadesDimapSupportData.cpp.

References theUrCorner.

◆ getViewingAngle()

void ossimplugins::ossimPleiadesDimapSupportData::getViewingAngle ( std::vector< ossim_float64 > &  va) const

Definition at line 660 of file ossimPleiadesDimapSupportData.cpp.

References theViewingAngle.

661  {
662  va = theViewingAngle;
663  }

◆ loadState()

bool ossimplugins::ossimPleiadesDimapSupportData::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of the object from a keyword list.

Return true if ok or false on error.

Reimplemented from ossimObject.

Definition at line 1006 of file ossimPleiadesDimapSupportData.cpp.

References ossimKeywordNames::AZIMUTH_ANGLE_KW, clearFields(), createDpt(), createGround(), createIpt(), ossimKeywordNames::ELEVATION_ANGLE_KW, ossimKeywordlist::find(), ossimKeywordNames::IMAGE_DATE_KW, ossimKeywordNames::NUMBER_BANDS_KW, ossimString::string(), theAcquisitionDate, theAcrossTrackIncidenceAngle, theAlongTrackIncidenceAngle, theAzimuthAngle, theBandOrder, theImageID, theImageSize, theIncidenceAngle, theInstrument, theInstrumentIndex, theLinePeriod, theLlCorner, theLrCorner, theNumBands, thePhysicalBias, thePhysicalGain, theProcessingLevelString, theProductionDate, theRefGroundPoint, theRefImagePoint, theSensorID, theSolarIrradiance, theSunAzimuth, theSunElevation, theSwathFirstCol, theSwathLastCol, theTimeRangeEnd, theTimeRangeStart, theUlCorner, theUrCorner, theViewingAngle, and ossimKeywordNames::TYPE_KW.

1008  {
1009  ossim_uint32 idx = 0;
1010  ossim_uint32 total;
1011  ossimString tempString;
1012 
1013  clearFields();
1014 
1015 
1016  ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
1017 
1018  if(type != "ossimPleiadesDimapSupportData")
1019  {
1020  return false;
1021  }
1022 
1023  total = ossimString(kwl.find(prefix,"number_of_azimuth_angle")).toUInt32();
1024  theSunAzimuth.resize(total);
1025  tempString = kwl.find(prefix,ossimKeywordNames::AZIMUTH_ANGLE_KW);
1026  if(tempString != "")
1027  {
1028  std::istringstream in(tempString.string());
1029  ossimString tempValue;
1030  for(idx = 0; idx < theSunAzimuth.size();++idx)
1031  {
1032  in >> tempValue.string();
1033  theSunAzimuth[idx] = tempValue.toDouble();
1034  }
1035  }
1036 
1037  total = ossimString(kwl.find(prefix,"number_of_elevation_angle")).toUInt32();
1038  theSunElevation.resize(total);
1039  tempString = kwl.find(prefix,ossimKeywordNames::ELEVATION_ANGLE_KW);
1040  if(tempString != "")
1041  {
1042  std::istringstream in(tempString.string());
1043  ossimString tempValue;
1044  for(idx = 0; idx < theSunElevation.size();++idx)
1045  {
1046  in >> tempValue.string();
1047  theSunElevation[idx] = tempValue.toDouble();
1048  }
1049  }
1050 
1051  // const char* lookup;
1052 
1053  theImageSize = createIpt(kwl.find(prefix, "image_size"));
1054  theRefGroundPoint = createGround(kwl.find(prefix, "reference_ground_point"));
1055  theRefImagePoint = createDpt(kwl.find(prefix, "reference_image_point"));
1056 
1058 
1059  theBandOrder.resize(theNumBands);
1060  tempString = kwl.find(prefix,"band_name_list");
1061  if(tempString != "")
1062  {
1063  std::istringstream in(tempString.string());
1064  ossimString tempValue;
1065  for(idx = 0; idx < theBandOrder.size();++idx)
1066  {
1067  in >> tempValue.string();
1068  theBandOrder[idx] = tempValue;
1069  }
1070  }
1071 
1073  theProductionDate = kwl.find(prefix, "production_date");
1074  theImageID = kwl.find(prefix, "image_id");
1075  theInstrument = kwl.find(prefix, "instrument");
1076  theInstrumentIndex = kwl.find(prefix, "instrument_index");
1077 
1078  total = ossimString(kwl.find(prefix,"number_of_incident_angle")).toUInt32();
1079  theIncidenceAngle.resize(total);
1080  tempString = kwl.find(prefix,"incident_angle");
1081  if(tempString != "")
1082  {
1083  std::istringstream in(tempString.string());
1084  ossimString tempValue;
1085  for(idx = 0; idx < theIncidenceAngle.size();++idx)
1086  {
1087  in >> tempValue.string();
1088  theIncidenceAngle[idx] = tempValue.toDouble();
1089  }
1090  }
1091 
1092  total = ossimString(kwl.find(prefix,"number_of_viewing_angle")).toUInt32();
1093  theViewingAngle.resize(total);
1094  tempString = kwl.find(prefix,"viewing_angle");
1095  if(tempString != "")
1096  {
1097  std::istringstream in(tempString.string());
1098  ossimString tempValue;
1099  for(idx = 0; idx < theViewingAngle.size();++idx)
1100  {
1101  in >> tempValue.string();
1102  theViewingAngle[idx] = tempValue.toDouble();
1103  }
1104  }
1105 
1106  total = ossimString(kwl.find(prefix,"number_of_scene_orientation")).toUInt32();
1107  theAzimuthAngle.resize(total);
1108  tempString = kwl.find(prefix,"scene_orientation");
1109  if(tempString != "")
1110  {
1111  std::istringstream in(tempString.string());
1112  ossimString tempValue;
1113  for(idx = 0; idx < theAzimuthAngle.size();++idx)
1114  {
1115  in >> tempValue.string();
1116  theAzimuthAngle[idx] = tempValue.toDouble();
1117  }
1118  }
1119 
1120  total = ossimString(kwl.find(prefix,"number_of_along_track_incidence_angle")).toUInt32();
1121  theAlongTrackIncidenceAngle.resize(total);
1122  tempString = kwl.find(prefix,"along_track_incidence_angle");
1123  if(tempString != "")
1124  {
1125  std::istringstream in(tempString.string());
1126  ossimString tempValue;
1127  for(idx = 0; idx < theAlongTrackIncidenceAngle.size();++idx)
1128  {
1129  in >> tempValue.string();
1130  theAlongTrackIncidenceAngle[idx] = tempValue.toDouble();
1131  }
1132  }
1133 
1134  total = ossimString(kwl.find(prefix,"number_of_across_track_incidence_angle")).toUInt32();
1135  theAcrossTrackIncidenceAngle.resize(total);
1136  tempString = kwl.find(prefix,"across_track_incidence_angle");
1137  if(tempString != "")
1138  {
1139  std::istringstream in(tempString.string());
1140  ossimString tempValue;
1141  for(idx = 0; idx < theAcrossTrackIncidenceAngle.size();++idx)
1142  {
1143  in >> tempValue.string();
1144  theAcrossTrackIncidenceAngle[idx] = tempValue.toDouble();
1145  }
1146  }
1147 
1148  theUlCorner =createGround( kwl.find(prefix, "ul_ground_point"));
1149  theUrCorner =createGround( kwl.find(prefix, "ur_ground_point"));
1150  theLrCorner =createGround( kwl.find(prefix, "lr_ground_point"));
1151  theLlCorner =createGround( kwl.find(prefix, "ll_ground_point"));
1152 
1153  theSensorID = ossimString(kwl.find(prefix, "sensorID"));
1154 
1155  theProcessingLevelString = ossimString(kwl.find(prefix, "processing_level"));
1156 
1157  thePhysicalBias.resize(theNumBands);
1158  tempString = kwl.find(prefix,"physical_bias");
1159  if(tempString != "")
1160  {
1161  std::istringstream in(tempString.string());
1162  ossimString tempValue;
1163  for(idx = 0; idx < thePhysicalBias.size();++idx)
1164  {
1165  in >> tempValue.string();
1166  thePhysicalBias[idx] = tempValue.toDouble();
1167  }
1168  }
1169 
1170  thePhysicalGain.resize(theNumBands);
1171  tempString = kwl.find(prefix,"physical_gain");
1172  if(tempString != "")
1173  {
1174  std::istringstream in(tempString.string());
1175  ossimString tempValue;
1176  for(idx = 0; idx < thePhysicalGain.size();++idx)
1177  {
1178  in >> tempValue.string();
1179  thePhysicalGain[idx] = tempValue.toDouble();
1180  }
1181  }
1182 
1184  tempString = kwl.find(prefix,"solar_irradiance");
1185  if(tempString != "")
1186  {
1187  std::istringstream in(tempString.string());
1188  ossimString tempValue;
1189  for(idx = 0; idx < theSolarIrradiance.size();++idx)
1190  {
1191  in >> tempValue.string();
1192  theSolarIrradiance[idx] = tempValue.toDouble();
1193  }
1194  }
1195 
1196  // Some geometric parameters exist only in the case of a SENSOR image
1197  if (theProcessingLevelString == "SENSOR")
1198  {
1199  theTimeRangeStart = ossimString(kwl.find(prefix,"time_range_start"));
1200  theTimeRangeEnd = ossimString(kwl.find(prefix,"time_range_end"));
1201  theLinePeriod = ossimString(kwl.find(prefix,"line_period")).toDouble();
1202  theSwathFirstCol = ossimString(kwl.find(prefix,"swath_first_col")).toInt32();
1203  theSwathLastCol = ossimString(kwl.find(prefix,"swath_last_col")).toInt32();
1204  }
1205 
1206  return true;
1207  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
static const char * IMAGE_DATE_KW
const char * find(const char *key) const
ossimDpt theRefImagePoint
Zero based center of frame.
static const char * TYPE_KW
unsigned int ossim_uint32
static const char * NUMBER_BANDS_KW
static const char * AZIMUTH_ANGLE_KW
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
static const char * ELEVATION_ANGLE_KW
const std::string & string() const
Definition: ossimString.h:414

◆ parseCoordinateReferenceSystem()

bool ossimplugins::ossimPleiadesDimapSupportData::parseCoordinateReferenceSystem ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Coordinate Reference System:

From xml section: /Dimap_Document/Coordinate_Reference_System/

NOT YET USED

Returns
true.

Definition at line 2101 of file ossimPleiadesDimapSupportData.cpp.

Referenced by parseXmlFile().

2102  {
2103  return true;
2104  }

◆ parseDatasetContent()

bool ossimplugins::ossimPleiadesDimapSupportData::parseDatasetContent ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Dataset Content:

From xml section: /Dimap_Document/Dataset_Content/

Initializes: theRefGroundPoint theUlCorner theUrCorner theLrCorner theLlCorner

Note that the theRefGroundPoint will be the zero based center of the whole mega image. Note that the corners will be the corners of the whole mega image.

Returns
true on success, false if not found.

Definition at line 1291 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::clear(), ossimXmlDocument::findNodes(), ossimGpt::hgt, ossimGpt::lat, ossimDpt::line, ossimGpt::lon, OSSIM_PLEIADES_DIMAPv1, ossimDpt::samp, ossimErrorStatusInterface::setErrorStatus(), theDIMAPVersion, theLlCorner, theLrCorner, theRefGroundPoint, theUlCorner, theUrCorner, theXmlDocumentRoot, and ossimString::toDouble().

Referenced by parseXmlFile().

1293  {
1294  ossimString xpath, nodeValue;
1295  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1296 
1297  //---
1298  // Corner points:
1299  //---
1300  xml_nodes.clear();
1302  {
1303  xpath = "/Product_Frame/Dataset_Frame/Vertex";
1304  }
1305  else
1306  {
1307  xpath = "/Dataset_Content/Dataset_Extent/Vertex";
1308  }
1309 
1310  xpath = theXmlDocumentRoot + xpath;
1311  xmlDocument->findNodes(xpath, xml_nodes);
1312  if (xml_nodes.size() != 4)
1313  {
1314  setErrorStatus();
1315  return false;
1316  }
1317  std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
1318  while (node != xml_nodes.end())
1319  {
1320  ossimGpt gpt;
1321  ossimDpt ipt;
1322 
1323  std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
1324  xpath = "LAT";
1325  (*node)->findChildNodes(xpath, sub_nodes);
1326  if (sub_nodes.size() == 0)
1327  {
1328  setErrorStatus();
1329  return false;
1330  }
1331  gpt.lat = sub_nodes[0]->getText().toDouble();
1332 
1333  sub_nodes.clear();
1334  xpath = "LON";
1335  (*node)->findChildNodes(xpath, sub_nodes);
1336  if (sub_nodes.size() == 0)
1337  {
1338  setErrorStatus();
1339  return false;
1340  }
1341  gpt.lon = sub_nodes[0]->getText().toDouble();
1342  gpt.hgt = 0.0; // assumed
1343 
1344  sub_nodes.clear();
1345  xpath = "ROW";
1346  (*node)->findChildNodes(xpath, sub_nodes);
1347  if (sub_nodes.size() == 0)
1348  {
1349  setErrorStatus();
1350  return false;
1351  }
1352  ipt.line = sub_nodes[0]->getText().toDouble() - 1.0;
1353 
1354  sub_nodes.clear();
1355  xpath = "COL";
1356  (*node)->findChildNodes(xpath, sub_nodes);
1357  if (sub_nodes.size() == 0)
1358  {
1359  setErrorStatus();
1360  return false;
1361  }
1362  ipt.samp = sub_nodes[0]->getText().toDouble() - 1.0;
1363 
1364  if (ipt.line < 1.0)
1365  if (ipt.samp < 1.0)
1366  theUlCorner = gpt;
1367  else
1368  theUrCorner = gpt;
1369  else
1370  if (ipt.samp < 1.0)
1371  theLlCorner = gpt;
1372  else
1373  theLrCorner = gpt;
1374 
1375  ++node;
1376  }
1377 
1378 
1379 
1380  //---
1381  // Center of frame.
1382  //---
1383  theRefGroundPoint.hgt = 0.0; // TODO needs to be looked up
1384 
1385  if (!readOneXmlNode(xmlDocument,
1386  theXmlDocumentRoot + "/Product_Frame/Dataset_Frame/Center/LON", // DIMAPv1
1387  nodeValue))
1388  {
1389  if (!readOneXmlNode(xmlDocument,
1390  theXmlDocumentRoot + "/Dataset_Content/Dataset_Extent/Center/LON", // DIMAPv2
1391  nodeValue))
1392  {
1393  return false;
1394  }
1395  }
1396  theRefGroundPoint.lon = nodeValue.toDouble();
1397 
1398  if (!readOneXmlNode(xmlDocument, theXmlDocumentRoot + "/Dataset_Content/Dataset_Extent/Center/LAT", nodeValue))
1399  {
1400  if (!readOneXmlNode(xmlDocument, theXmlDocumentRoot + "/Product_Frame/Dataset_Frame/Center/LAT", nodeValue))
1401  {
1402  return false;
1403  }
1404  }
1405  theRefGroundPoint.lat = nodeValue.toDouble();
1406 
1407  return true;
1408  }
void clear()
Erases the entire container.
Definition: ossimString.h:432
double samp
Definition: ossimDpt.h:164
ossim_float64 hgt
Height in meters above the ellipsiod.
Definition: ossimGpt.h:274
double line
Definition: ossimDpt.h:165
ossim_float64 lon
Definition: ossimGpt.h:266
double toDouble() const
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.
ossim_float64 lat
Definition: ossimGpt.h:265
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):

◆ parseDatasetIdentification()

bool ossimplugins::ossimPleiadesDimapSupportData::parseDatasetIdentification ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Dataset Identification:

From xml section: /Dimap_Document/Dataset_Identification/

NOT YET USED

Returns
true.

Definition at line 2096 of file ossimPleiadesDimapSupportData.cpp.

Referenced by parseXmlFile().

2097  {
2098  return true;
2099  }

◆ parseDatasetSources()

bool ossimplugins::ossimPleiadesDimapSupportData::parseDatasetSources ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 2758 of file ossimPleiadesDimapSupportData.cpp.

References OSSIM_PLEIADES_DIMAPv1, ossimNotify(), ossimNotifyLevel_DEBUG, ossimErrorStatusInterface::setErrorStatus(), theAcquisitionDate, theDIMAPVersion, theInstrument, theInstrumentIndex, theSensorID, and theXmlDocumentRoot.

Referenced by parseXmlFile().

2759  {
2760  // static const char MODULE[] = "ossimPleiadesDimapSupportData::parseDatasetSources";
2761  ossimString xpath, nodeValue;
2762  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2763 
2764  //---
2765  // Fetch the mission index (1A ou 1B) ?
2766  // and generate theSensorID
2767  //---
2769  {
2770  xpath = "/Data_Strip/Data_Strip_Identification/PLATFORM_NAME";
2771  }
2772  else
2773  {
2774  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/MISSION";
2775  }
2776  xpath = theXmlDocumentRoot + xpath;
2777  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2778  {
2779  return false;
2780  }
2781 
2782  if (nodeValue != "PHR")
2783  {
2784  setErrorStatus();
2785  if (traceDebug())
2786  {
2787  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nNot a PHR mission!"<< std::endl;
2788  }
2789  return false;
2790  }
2791 
2792  //---
2793  // Fetch the mission index (1A ou 1B) ?
2794  // and generate theSensorID
2795  //---
2797  {
2798  xpath = "/Data_Strip/Data_Strip_Identification/PLATFORM_SERIAL_NUMBER";
2799  }
2800  else
2801  {
2802  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/MISSION_INDEX";
2803  }
2804  xpath = theXmlDocumentRoot + xpath;
2805  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2806  {
2807  return false;
2808  }
2809 
2810  if (nodeValue == "1A")
2811  theSensorID = "PHR 1A";
2812  else if (nodeValue == "1B")
2813  theSensorID = "PHR 1B";
2814  else
2815  {
2816  setErrorStatus();
2817  if (traceDebug())
2818  {
2819  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nNot a valid sensorID!"<< std::endl;
2820  }
2821  return false;
2822  }
2823 
2824  //---
2825  // Fetch the Instrument:
2826  //---
2828  {
2829  xpath = "/Data_Strip/Data_Strip_Identification/PLATFORM_NAME";
2830  }
2831  else
2832  {
2833  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT";
2834  }
2835  xpath = theXmlDocumentRoot + xpath;
2836  if (!readOneXmlNode(xmlDocument, xpath, theInstrument))
2837  {
2838  return false;
2839  }
2840 
2841  //---
2842  // Fetch the Instrument Index:
2843  //---
2845  {
2846  xpath = "/Data_Strip/Data_Strip_Identification/PLATFORM_SERIAL_NUMBER";
2847  }
2848  else
2849  {
2850  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT_INDEX";
2851  }
2852  xpath = theXmlDocumentRoot + xpath;
2853  if (!readOneXmlNode(xmlDocument, xpath, theInstrumentIndex))
2854  {
2855  return false;
2856  }
2857 
2859  {
2860  //---
2861  // Fetch the Imaging Date:
2862  //---
2863  xpath = "/Data_Strip/UTC_Acquisition_Range/START";
2864  xpath = theXmlDocumentRoot + xpath;
2865  if (!readOneXmlNode(xmlDocument, xpath, theAcquisitionDate))
2866  {
2867  return false;
2868  }
2869 
2870  // TODO : fetch (if any in v1) the other acquisition time parameters
2871 
2872  }
2873  else
2874  {
2875  //---
2876  // Fetch the Imaging Date:
2877  //---
2878  ossimString firstLineImagingDate;
2879  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_DATE";
2880  xpath = theXmlDocumentRoot + xpath;
2881  if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingDate))
2882  {
2883  return false;
2884  }
2885 
2886  //---
2887  // Fetch the Imaging Time:
2888  //---
2889  ossimString firstLineImagingTime;
2890  xpath = "/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_TIME";
2891  xpath = theXmlDocumentRoot + xpath;
2892  if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingTime))
2893  {
2894  return false;
2895  }
2896 
2897  theAcquisitionDate = firstLineImagingDate + "T" + firstLineImagingTime;
2898 
2899  }
2900 
2901  return true;
2902  }
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseGeometricData()

bool ossimplugins::ossimPleiadesDimapSupportData::parseGeometricData ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 2470 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::clear(), ossimXmlDocument::findNodes(), OSSIM_PLEIADES_DIMAPv1, ossimNotify(), ossimNotifyLevel_DEBUG, ossimErrorStatusInterface::setErrorStatus(), theAcrossTrackIncidenceAngle, theAlongTrackIncidenceAngle, theAzimuthAngle, theDIMAPVersion, theIncidenceAngle, theLinePeriod, theProcessingLevelString, theSunAzimuth, theSunElevation, theSwathFirstCol, theSwathLastCol, theTimeRangeEnd, theTimeRangeStart, theViewingAngle, theXmlDocumentRoot, ossimString::toDouble(), and ossimString::toInt32().

Referenced by parseXmlFile().

2471  {
2472  ossimString xpath, nodeValue;
2473  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2474 
2475  xml_nodes.clear();
2477  {
2478  xpath = "/Data_Strip/Geometric_Header_List/Located_Geometric_Header";
2479  }
2480  else
2481  {
2482  xpath = "/Geometric_Data/Use_Area/Located_Geometric_Values";
2483  }
2484  xpath = theXmlDocumentRoot + xpath;
2485  xmlDocument->findNodes(xpath, xml_nodes);
2486  if (xml_nodes.size() != 3 )
2487  {
2488  setErrorStatus();
2489  if(traceDebug())
2490  {
2491  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2492  }
2493  return false;
2494  }
2495 
2496  std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
2497  while (node != xml_nodes.end())
2498  {
2499  std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
2500 
2501  //---
2502  // Fetch the Sun Azimuth:
2503  //---
2504  xpath = "Solar_Incidences/SUN_AZIMUTH";
2505  (*node)->findChildNodes(xpath, sub_nodes);
2506  if (sub_nodes.size() == 0)
2507  {
2508  setErrorStatus();
2509  if(traceDebug())
2510  {
2511  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2512  }
2513  return false;
2514  }
2515  theSunAzimuth.push_back(sub_nodes[0]->getText().toDouble());
2516 
2517  //---
2518  // Fetch the Sun Elevation:
2519  //---
2520  sub_nodes.clear();
2521  xpath = "Solar_Incidences/SUN_ELEVATION";
2522  (*node)->findChildNodes(xpath, sub_nodes);
2523  if (sub_nodes.size() == 0)
2524  {
2525  setErrorStatus();
2526  if(traceDebug())
2527  {
2528  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2529  }
2530  return false;
2531  }
2532  theSunElevation.push_back(sub_nodes[0]->getText().toDouble());
2533 
2534  //---
2535  // Fetch the Incidence Angle:
2536  //---
2537  sub_nodes.clear();
2538 
2540  {
2541  xpath = "Incidences/GLOBAL_INCIDENCE";
2542  }
2543  else
2544  {
2545  xpath = "Acquisition_Angles/INCIDENCE_ANGLE";
2546  }
2547  (*node)->findChildNodes(xpath, sub_nodes);
2548  if (sub_nodes.size() == 0)
2549  {
2550  setErrorStatus();
2551  if(traceDebug())
2552  {
2553  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2554  }
2555  return false;
2556  }
2557  theIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
2558 
2559  //---
2560  // Fetch the Viewing Angle:
2561  //---
2562  sub_nodes.clear();
2564  {
2565  xpath = "Pointing_Angles/PSI_XY";
2566  }
2567  else
2568  {
2569  xpath = "Acquisition_Angles/VIEWING_ANGLE";
2570  }
2571  (*node)->findChildNodes(xpath, sub_nodes);
2572  if (sub_nodes.size() == 0)
2573  {
2574  setErrorStatus();
2575  if(traceDebug())
2576  {
2577  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2578  }
2579  return false;
2580  }
2581  theViewingAngle.push_back(sub_nodes[0]->getText().toDouble());
2582 
2583  //---
2584  // Fetch the Azimuth Angle:
2585  //---
2586  sub_nodes.clear();
2588  {
2589  xpath = "ORIENTATION";
2590  }
2591  else
2592  {
2593  xpath = "Acquisition_Angles/AZIMUTH_ANGLE";
2594  }
2595  (*node)->findChildNodes(xpath, sub_nodes);
2596  if (sub_nodes.size() == 0)
2597  {
2598  setErrorStatus();
2599  if(traceDebug())
2600  {
2601  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2602  }
2603  return false;
2604  }
2605  theAzimuthAngle.push_back(sub_nodes[0]->getText().toDouble());
2606 
2607  //---
2608  // Fetch the along track incidence angle :
2609  //---
2610  sub_nodes.clear();
2612  {
2613  xpath = "Incidences/ALONG_TRACK_INCIDENCE";
2614  }
2615  else
2616  {
2617  xpath = "Acquisition_Angles/INCIDENCE_ANGLE_ALONG_TRACK";
2618  }
2619  (*node)->findChildNodes(xpath, sub_nodes);
2620  if (sub_nodes.size() == 0)
2621  {
2622  setErrorStatus();
2623  if(traceDebug())
2624  {
2625  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2626  }
2627  return false;
2628  }
2629  theAlongTrackIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
2630 
2631  //---
2632  // Fetch the across track incidence angle :
2633  //---
2634  sub_nodes.clear();
2636  {
2637  xpath = "Incidences/ORTHO_TRACK_INCIDENCE";
2638  }
2639  else
2640  {
2641  xpath = "Acquisition_Angles/INCIDENCE_ANGLE_ACROSS_TRACK";
2642  }
2643  (*node)->findChildNodes(xpath, sub_nodes);
2644  if (sub_nodes.size() == 0)
2645  {
2646  setErrorStatus();
2647  if(traceDebug())
2648  {
2649  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
2650  }
2651  return false;
2652  }
2653  theAcrossTrackIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
2654 
2655  ++node;
2656  }
2657 
2658  if (theProcessingLevelString == "SENSOR")
2659  {
2660  // check that this product is SENSOR (some tags are not present in ORTHO)
2661  //---
2662  // Fetch the time stamp of the first line:
2663  //---
2665  {
2666  xpath = "/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/START";
2667  }
2668  else
2669  {
2670  xpath = "/Geometric_Data/Refined_Model/Time/Time_Range/START";
2671  }
2672  xpath = theXmlDocumentRoot + xpath;
2673  if (!readOneXmlNode(xmlDocument, xpath, theTimeRangeStart))
2674  {
2675  return false;
2676  }
2677 
2678  //---
2679  // Fetch the time stamp of the last line:
2680  //---
2682  {
2683  xpath = "/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/END";
2684  }
2685  else
2686  {
2687  xpath = "/Geometric_Data/Refined_Model/Time/Time_Range/END";
2688  }
2689  xpath = theXmlDocumentRoot + xpath;
2690  if (!readOneXmlNode(xmlDocument, xpath, theTimeRangeEnd))
2691  {
2692  return false;
2693  }
2694 
2695  //---
2696  // Fetch the line period:
2697  //---
2699  {
2700  xpath = "/Geometric_Data/Sensor_Model_Characteristics/SENSOR_LINE_PERIOD";
2701  }
2702  else
2703  {
2704  xpath = "/Geometric_Data/Refined_Model/Time/Time_Stamp/LINE_PERIOD";
2705  }
2706  xpath = theXmlDocumentRoot + xpath;
2707  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2708  {
2709  return false;
2710  }
2711  theLinePeriod = nodeValue.toDouble();
2712 
2713  //---
2714  // Fetch the swath first col:
2715  //---
2717  {
2718  xpath = "/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/FIRST_COL";
2719  }
2720  else
2721  {
2722  xpath = "/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/FIRST_COL";
2723  }
2724  xpath = theXmlDocumentRoot + xpath;
2725  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2726  {
2727  return false;
2728  }
2729  theSwathFirstCol = nodeValue.toInt32();
2730 
2731  //---
2732  // Fetch the swath last col:
2733  //---
2735  {
2736  xpath = "/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/LAST_COL";
2737  }
2738  else
2739  {
2740  xpath = "/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/LAST_COL";
2741  }
2742  xpath = theXmlDocumentRoot + xpath;
2743  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2744  {
2745  return false;
2746  }
2747  theSwathLastCol = nodeValue.toInt32();
2748  }
2749 
2750  return true;
2751  }
void clear()
Erases the entire container.
Definition: ossimString.h:432
ossim_int32 toInt32() const
double toDouble() const
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseGeoposition()

bool ossimplugins::ossimPleiadesDimapSupportData::parseGeoposition ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Geoposition:

From xml section: /Dimap_Document/Geoposition/

NOT YET USED

Returns
true.

Definition at line 2106 of file ossimPleiadesDimapSupportData.cpp.

Referenced by parseXmlFile().

2107  {
2108  return true;
2109  }

◆ parseMetadataIdentificationDIMAPv1()

bool ossimplugins::ossimPleiadesDimapSupportData::parseMetadataIdentificationDIMAPv1 ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 1918 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::clear(), OSSIM_PLEIADES_DIMAPv1, OSSIM_PLEIADES_METADATA_SUBPROFILE_UNKNOWN, ossimNotify(), ossimNotifyLevel_DEBUG, theDIMAPVersion, theMetadataSubProfile, and theXmlDocumentRoot.

Referenced by parseXmlFile().

1919  {
1920  // static const char MODULE[] = "ossimPleiadesDimapSupportData::parseMetadataIdentification";
1921 
1922  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1923  ossimString xpath, nodeValue;
1924  theXmlDocumentRoot = "/PHR_Dimap_Document";
1925 
1926  //---
1927  // Get the version string which can be used as a key for parsing.
1928  //---
1929  xml_nodes.clear();
1930  xpath = "/Metadata_Identification/METADATA_FORMAT";
1931  xpath = theXmlDocumentRoot + xpath;
1932 
1933  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1934  {
1935  return false;
1936  }
1937  if (nodeValue != "DIMAP_PHR")
1938  {
1939  return false;
1940  }
1941 
1942  //---
1943  // Check that it is a valid PHR DIMAPv2 file
1944  //---
1945  xpath = "/Metadata_Identification/METADATA_PROFILE";
1946  xpath = theXmlDocumentRoot + xpath;
1947  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1948  {
1949  return false;
1950  }
1951 
1952  ossimString metadataProfile;
1953  if ( nodeValue != "PHR_SYSTEM_RECTIFIED_PRODUCT" )
1954  {
1955  if (traceDebug())
1956  {
1958  << "DEBUG:\n Not a PLEIADES DIMAPv1 file: METADATA_PROFILE is incorrect!" << std::endl;
1959  }
1960  return false;
1961  }
1962 
1963  // DIMAPv1 -> no subprofile
1965 
1967 
1968  return true;
1969  }
void clear()
Erases the entire container.
Definition: ossimString.h:432
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseMetadataIdentificationDIMAPv2()

bool ossimplugins::ossimPleiadesDimapSupportData::parseMetadataIdentificationDIMAPv2 ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 1970 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::clear(), ossimXmlDocument::findNodes(), OSSIM_PLEIADES_DIMAPv2, OSSIM_PLEIADES_METADATA_SUBPROFILE_PRODUCT, OSSIM_PLEIADES_METADATA_SUBPROFILE_RPC, OSSIM_PLEIADES_METADATA_SUBPROFILE_UNKNOWN, ossimNotify(), ossimNotifyLevel_DEBUG, ossimNotifyLevel_WARN, ossimErrorStatusInterface::setErrorStatus(), theDIMAPVersion, theMetadataSubProfile, and theXmlDocumentRoot.

Referenced by parseXmlFile().

1971  {
1972  // static const char MODULE[] = "ossimPleiadesDimapSupportData::parseMetadataIdentification";
1973 
1974  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1975  ossimString xpath, nodeValue;
1976  theXmlDocumentRoot = "/DIMAP_Document";
1977 
1978  //---
1979  // Get the version string which can be used as a key for parsing.
1980  //---
1981  xml_nodes.clear();
1982  xpath = "/Metadata_Identification/METADATA_FORMAT";
1983  xpath = theXmlDocumentRoot + xpath;
1984  xmlDocument->findNodes(xpath, xml_nodes);
1985  if (xml_nodes.size() == 0)
1986  {
1987  // FIXME MSD: used to support Pleiades samples from SPOT-IMAGES website which are not coherent
1988  // with the specification (28/09/2012). Should be remove when first data will be available and sample
1989  // replaced.
1990  theXmlDocumentRoot = "/PHR_DIMAP_Document";
1991  if (traceDebug())
1992  {
1993  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nTry to use the old root: " << theXmlDocumentRoot << endl;
1994  }
1995 
1996  xml_nodes.clear();
1997  xpath = "/Metadata_Identification/METADATA_FORMAT";
1998  xpath = theXmlDocumentRoot + xpath;
1999  xmlDocument->findNodes(xpath, xml_nodes);
2000  if (xml_nodes.size() == 0)
2001  {
2002  // FIXME MSD: used to support peiades samples from SPOT-IMAGES website which are not coherent
2003  // with the specification (28/09/2012). Should be remove when first data will be available and sample
2004  // replaced.
2005  theXmlDocumentRoot = "/Dimap_Document";
2006  if (traceDebug())
2007  {
2008  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nTry to use the new root: " << theXmlDocumentRoot << endl;
2009  }
2010 
2011  xml_nodes.clear();
2012  xpath = "/Metadata_Identification/METADATA_FORMAT";
2013  xpath = theXmlDocumentRoot + xpath;
2014  xmlDocument->findNodes(xpath, xml_nodes);
2015  if (xml_nodes.size() == 0)
2016  {
2017  setErrorStatus();
2018  if (traceDebug())
2019  {
2020  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << endl;
2021  }
2022  return false;
2023  }
2024  }
2025  }
2026 
2027  ossimString attribute = "version";
2028  ossimString value;
2029  xml_nodes[0]->getAttributeValue(value, attribute);
2030  if (value != "2.0")
2031  {
2032  setErrorStatus();
2033  if (traceDebug())
2034  {
2036  << "WARNING: DIMAP metadata version is not correct!" << std::endl;
2037  }
2038  return false;
2039  }
2040 
2041  //---
2042  // Check that it is a valid PHR DIMAPv2 file
2043  //---
2044  xpath = "/Metadata_Identification/METADATA_PROFILE";
2045  xpath = theXmlDocumentRoot + xpath;
2046  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2047  {
2048  return false;
2049  }
2050 
2051  ossimString metadataProfile;
2052  if ( (nodeValue != "PHR_SENSOR")
2053  && (nodeValue != "PHR_ORTHO")
2054  && (nodeValue != "PHR_MOSAIC") )
2055  {
2056  if (traceDebug())
2057  {
2059  << "DEBUG:\n Not a PLEIADES DIMAPv2 file: metadata profile is incorrect!" << std::endl;
2060  }
2061  return false;
2062  }
2063  else
2064  metadataProfile = nodeValue;
2065 
2066  //---
2067  // Get the subprofile
2068  //---
2069  xpath = "/Metadata_Identification/METADATA_SUBPROFILE";
2070  xpath = theXmlDocumentRoot + xpath;
2071  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2072  {
2073  return false;
2074  }
2075 
2076  if ((nodeValue == "PRODUCT"))
2078  else if ( (nodeValue == "RPC") && (metadataProfile == "PHR_SENSOR") )
2080  else
2081  {
2083  if (traceDebug())
2084  {
2086  << "DEBUG:\n Not a PLEIADES DIMAPv2 file: metadata subprofile is incorrect !" << std::endl;
2087  }
2088  return false;
2089  }
2090 
2092 
2093  return true;
2094  }
void clear()
Erases the entire container.
Definition: ossimString.h:432
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseProcessingInformation()

bool ossimplugins::ossimPleiadesDimapSupportData::parseProcessingInformation ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Processing Information:

From xml section: /Dimap_Document/Processing_Information/

Initializes: theProcessingLevel theSpectralProcessing

Returns
true on success, false if not found.

Definition at line 2111 of file ossimPleiadesDimapSupportData.cpp.

References OSSIM_PLEIADES_DIMAPv1, theDIMAPVersion, theProcessingLevelString, theSpectralProcessingString, and theXmlDocumentRoot.

Referenced by parseXmlFile().

2112  {
2113  // static const char MODULE[] = "ossimPleiadesDimapSupportData::parseProcessingInformation";
2114 
2115  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2116  ossimString xpath, nodeValue;
2117 
2118  //---
2119  // Fetch the Processing Level:
2120  //---
2122  {
2123  xpath = "/Product_Characteristics/PROCESSING_LEVEL";
2124  }
2125  else
2126  {
2127  xpath = "/Processing_Information/Product_Settings/PROCESSING_LEVEL";
2128  }
2129  xpath = theXmlDocumentRoot + xpath;
2130  if (!readOneXmlNode(xmlDocument, xpath, theProcessingLevelString))
2131  {
2132  return false;
2133  }
2134 
2135  //---
2136  // Fetch the Spectral Processing:
2137  //---
2139  {
2140  xpath = "/Product_Characteristics/Product_Image_Characteristics/SPECTRAL_PROCESSING";
2141  }
2142  else
2143  {
2144  xpath = "/Processing_Information/Product_Settings/SPECTRAL_PROCESSING";
2145  }
2146  xpath = theXmlDocumentRoot + xpath;
2147  if (!readOneXmlNode(xmlDocument, xpath, theSpectralProcessingString))
2148  {
2149  return false;
2150  }
2151 
2152  return true;
2153  }

◆ parseProductInformation()

bool ossimplugins::ossimPleiadesDimapSupportData::parseProductInformation ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Product Information:

From xml section: /Dimap_Document/Product_Information/

Initializes: theImageID theProductionDate

Returns
true on success, false if not found.

Definition at line 1248 of file ossimPleiadesDimapSupportData.cpp.

References OSSIM_PLEIADES_DIMAPv1, theDIMAPVersion, theImageID, theProductionDate, and theXmlDocumentRoot.

Referenced by parseXmlFile().

1250  {
1251  ossimString xpath;
1252  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1253 
1254  //---
1255  // Fetch the Image ID:
1256  //---
1258  {
1259  xpath = "/Production/JOB_ID";
1260  }
1261  else
1262  {
1263  xpath = "/Product_Information/Delivery_Identification/JOB_ID";
1264  }
1265  xpath = theXmlDocumentRoot + xpath;
1266  if (!readOneXmlNode(xmlDocument, xpath, theImageID))
1267  {
1268  return false;
1269  }
1270 
1271  //---
1272  // Fetch the ProductionDate:
1273  //---
1275  {
1276  xpath = "/Production/DATASET_PRODUCTION_DATE";
1277  }
1278  else
1279  {
1280  xpath = "/Product_Information/Delivery_Identification/PRODUCTION_DATE";
1281  }
1282  xpath = theXmlDocumentRoot + xpath;
1283  if (!readOneXmlNode(xmlDocument, xpath, theProductionDate))
1284  {
1285  return false;
1286  }
1287 
1288  return true;
1289  }

◆ parseQualityAssessment()

bool ossimplugins::ossimPleiadesDimapSupportData::parseQualityAssessment ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

QualityAssessment:

From xml section: /Dimap_Document/Quality_Assessment/

NOT YET USED

Returns
true.

Definition at line 2753 of file ossimPleiadesDimapSupportData.cpp.

Referenced by parseXmlFile().

2754  {
2755  return true;
2756  }

◆ parseRadiometricData()

bool ossimplugins::ossimPleiadesDimapSupportData::parseRadiometricData ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 1410 of file ossimPleiadesDimapSupportData.cpp.

References ossimXmlDocument::findNodes(), OSSIM_PLEIADES_DIMAPv1, ossimNotify(), ossimNotifyLevel_WARN, ossimErrorStatusInterface::setErrorStatus(), theDIMAPVersion, theNumBands, thePhysicalBias, thePhysicalGain, theSolarIrradiance, and theXmlDocumentRoot.

Referenced by parseXmlFile().

1412  {
1413  ossimString xpath;
1414  std::vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1415  std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
1416  std::vector<ossimRefPtr<ossimXmlNode> >::iterator node;
1417 
1418  //---
1419  // Fetch the gain and bias for each spectral band:
1420  //---
1421  thePhysicalGain.assign(theNumBands, 1.000);
1422  thePhysicalBias.assign(theNumBands, 0.000);
1423 
1424  xml_nodes.clear();
1426  {
1427  xpath = "/Image_Interpretation/Spectral_Band_Info";
1428  }
1429  else
1430  {
1431  xpath = "/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Radiance";
1432  }
1433  xpath = theXmlDocumentRoot + xpath;
1434  xmlDocument->findNodes(xpath, xml_nodes);
1435 
1436  node = xml_nodes.begin();
1437  while (node != xml_nodes.end())
1438  {
1439  sub_nodes.clear();
1440  xpath = "BAND_ID";
1441  (*node)->findChildNodes(xpath, sub_nodes);
1442  if (sub_nodes.size() == 0)
1443  {
1444  setErrorStatus();
1445  return false;
1446  }
1447 
1448  ossimString bandName = sub_nodes[0]->getText();
1449  ossim_uint32 bandIndex = 99999; // Bogus index...
1450  if ( (bandName == "B0") || (bandName == "P") ||
1451  (bandName == "PA") || (theNumBands == 1) )
1452  {
1453  bandIndex = 0;
1454  }
1455  else if ( (bandName == "B1") && (theNumBands > 1) )
1456  {
1457  bandIndex = 1;
1458  }
1459  else if ( (bandName == "B2") && (theNumBands > 2) )
1460  {
1461  bandIndex = 2;
1462  }
1463  else if ( (bandName == "B3") && (theNumBands > 3) )
1464  {
1465  bandIndex = 3;
1466  }
1467  else
1468  {
1470  << "ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
1471  }
1472 
1473  if (bandIndex >= theNumBands )
1474  {
1476  << "ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range\n";
1477  return false;
1478  }
1479 
1480  sub_nodes.clear();
1481  xpath = (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1 ? "PHYSICAL_BIAS" : "BIAS");
1482  (*node)->findChildNodes(xpath, sub_nodes);
1483  if (sub_nodes.size() == 0)
1484  {
1485  setErrorStatus();
1486  return false;
1487  }
1488  thePhysicalBias[bandIndex] = sub_nodes[0]->getText().toDouble();
1489 
1490  sub_nodes.clear();
1491  xpath = (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1 ? "PHYSICAL_GAIN" : "GAIN");
1492  (*node)->findChildNodes(xpath, sub_nodes);
1493  if (sub_nodes.size() == 0)
1494  {
1495  setErrorStatus();
1496  return false;
1497  }
1498  thePhysicalGain[bandIndex] = sub_nodes[0]->getText().toDouble();
1499 
1500  ++node;
1501  }
1502 
1503  // Initialize to 999 : we find this value in some DIMAPv2 file
1504  // and there is no such tag in DIMAPv1 file
1505  theSolarIrradiance.assign(theNumBands, 999.000);
1506 
1507  xml_nodes.clear();
1508  xpath = "/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Solar_Irradiance";
1509  xpath = theXmlDocumentRoot + xpath;
1510  xmlDocument->findNodes(xpath, xml_nodes);
1511 
1512  node = xml_nodes.begin();
1513  while (node != xml_nodes.end())
1514  {
1515  sub_nodes.clear();
1516  xpath = "BAND_ID";
1517  (*node)->findChildNodes(xpath, sub_nodes);
1518  if (sub_nodes.size() == 0)
1519  {
1520  setErrorStatus();
1521  return false;
1522  }
1523 
1524  ossimString bandName = sub_nodes[0]->getText();
1525  ossim_uint32 bandIndex = 99999; // Bogus index...
1526  if ( (bandName == "B0") || (bandName == "P") ||
1527  (bandName == "PA") || (theNumBands == 1) )
1528  {
1529  bandIndex = 0;
1530  }
1531  else if ( (bandName == "B1") && (theNumBands > 1) )
1532  {
1533  bandIndex = 1;
1534  }
1535  else if ( (bandName == "B2") && (theNumBands > 2) )
1536  {
1537  bandIndex = 2;
1538  }
1539  else if ( (bandName == "B3") && (theNumBands > 3) )
1540  {
1541  bandIndex = 3;
1542  }
1543  else
1544  {
1546  << "ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
1547  }
1548 
1549  if ((bandIndex >= theNumBands))
1550  {
1552  << "ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range 2\n";
1553  return false;
1554  }
1555 
1556  sub_nodes.clear();
1557  xpath = "VALUE";
1558  (*node)->findChildNodes(xpath, sub_nodes);
1559  if (sub_nodes.size() == 0)
1560  {
1561  setErrorStatus();
1562  return false;
1563  }
1564  theSolarIrradiance[bandIndex] = sub_nodes[0]->getText().toDouble();
1565 
1566  ++node;
1567  }
1568 
1569  return true;
1570  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
unsigned int ossim_uint32
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseRasterData()

bool ossimplugins::ossimPleiadesDimapSupportData::parseRasterData ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 2155 of file ossimPleiadesDimapSupportData.cpp.

References ossimXmlDocument::findNodes(), ossimBooleanProperty::getBoolean(), ossimIpt::line, ossimDpt::line, OSSIM_PLEIADES_DIMAPv1, OSSIM_PLEIADES_DIMAPv2, ossimNotify(), ossimNotifyLevel_DEBUG, ossimIpt::samp, ossimDpt::samp, ossimErrorStatusInterface::setErrorStatus(), ossimBooleanProperty::setValue(), theBandOrder, theDIMAPVersion, theImageSize, theMultiDataFile, theNumBands, theNumberOfMegaTiles, theNumberOfMegaTilesInCol, theNumberOfMegaTilesInRow, theRefImagePoint, theTileSize, theXmlDocumentRoot, ossimString::toInt(), and ossimString::toUInt32().

Referenced by parseXmlFile().

2156  {
2157  static const char MODULE[] = "ossimPleiadesDimapSupportData::parseRasterData";
2158  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2159  ossimString xpath, nodeValue;
2160  //---
2161  // Fetch if the product file is linked to one or many JP2 files:
2162  //---
2164  {
2165  xpath = "/Product_Characteristics/Product_Image_Characteristics/Data_Access/Data_File/DATA_FILE_PATH";
2166  xpath = theXmlDocumentRoot + xpath;
2167  xmlDocument->findNodes(xpath, xml_nodes);
2168 
2169  if (xml_nodes.size() > 1)
2170  {
2171  theMultiDataFile.setValue(true);
2172  }
2173  }
2174  else
2175  {
2176  xpath = "/Raster_Data/Data_Access/DATA_FILE_TILES";
2177  xpath = theXmlDocumentRoot + xpath;
2178  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2179  {
2180  return false;
2181  }
2182  theMultiDataFile.setValue(nodeValue);
2183  }
2184 
2185  //---
2186  // Fetch the MegaImageSize:
2187  //---
2189  {
2190  xpath = "/Raster_Dimensions/NCOLS";
2191  }
2192  else
2193  {
2194  xpath = "/Raster_Data/Raster_Dimensions/NCOLS";
2195  }
2196  xpath = theXmlDocumentRoot + xpath;
2197  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2198  {
2199  return false;
2200  }
2201  theImageSize.samp = nodeValue.toInt();
2202 
2204  {
2205  xpath = "/Raster_Dimensions/NROWS";
2206  }
2207  else
2208  {
2209  xpath = "/Raster_Data/Raster_Dimensions/NROWS";
2210  }
2211  xpath = theXmlDocumentRoot + xpath;
2212  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2213  {
2214  return false;
2215  }
2216  theImageSize.line = nodeValue.toInt();
2217 
2219  {
2220  //---
2221  // Fetch the Number of MegaTiles:
2222  //---
2224  {
2225  xpath = "/Raster_Dimensions/Raster_Tiles/NTILES";
2226  }
2227  else
2228  {
2229  xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/NTILES";
2230  }
2231  xpath = theXmlDocumentRoot + xpath;
2232  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2233  {
2234  return false;
2235  }
2236  theNumberOfMegaTiles = nodeValue.toUInt32();
2237 
2238  //---
2239  // Fetch the Number of MegaTiles in X and Y:
2240  //---
2242  {
2243  xpath = "/Raster_Dimensions/Raster_Tiles/RX_NB_OF_TILES";
2244  xpath = theXmlDocumentRoot + xpath;
2245  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2246  {
2247  return false;
2248  }
2249  theNumberOfMegaTilesInRow = nodeValue.toUInt32();
2250 
2251  xpath = "/Raster_Dimensions/Raster_Tiles/CY_NB_OF_TILES";
2252  xpath = theXmlDocumentRoot + xpath;
2253  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2254  {
2255  return false;
2256  }
2257  theNumberOfMegaTilesInCol = nodeValue.toUInt32();
2258  }
2259  else
2260  {
2261  xml_nodes.clear();
2262  xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_COUNT";
2263  xpath = theXmlDocumentRoot + xpath;
2264  xmlDocument->findNodes(xpath, xml_nodes);
2265  if (xml_nodes.size() == 0)
2266  {
2267  setErrorStatus();
2268  if (traceDebug())
2269  {
2270  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: \nCould not find: " << xpath << std::endl;
2271  }
2272  return false;
2273  }
2274 
2275  ossimString value;
2276  ossimString attribute = "ntiles_x";
2277  if (!xml_nodes[0]->getAttributeValue(value, attribute))
2278  {
2279  attribute = "ntiles_R";
2280  xml_nodes[0]->getAttributeValue(value, attribute);
2281  }
2283 
2284  attribute = "ntiles_y";
2285  if (!xml_nodes[0]->getAttributeValue(value, attribute))
2286  {
2287  attribute = "ntiles_C";
2288  xml_nodes[0]->getAttributeValue(value, attribute);
2289  }
2291  }
2292 
2294  {
2295  setErrorStatus();
2296  if (traceDebug())
2297  {
2298  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: \nIncoherent number of tiles: " << xpath << std::endl;
2299  }
2300  return false;
2301  }
2302 
2304  {
2305  //---
2306  // Fetch the size of MegaTiles:
2307  //---
2308  xml_nodes.clear();
2309  xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_SIZE";
2310  xpath = theXmlDocumentRoot + xpath;
2311  xmlDocument->findNodes(xpath, xml_nodes);
2312  if (xml_nodes.size() == 0)
2313  {
2314  setErrorStatus();
2315  if (traceDebug())
2316  {
2317  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
2318  }
2319  return false;
2320  }
2321 
2322  ossimString attribute;
2323  ossimString value;
2324 
2325  attribute = "nrows";
2326  xml_nodes[0]->getAttributeValue(value, attribute);
2327  theTileSize.line = value.toUInt32();
2328 
2329  attribute = "ncols";
2330  xml_nodes[0]->getAttributeValue(value, attribute);
2331  theTileSize.samp = value.toUInt32();
2332  }
2333 
2334  }
2335 
2336  //--- TODO_MSD is it useful in the case of RPC model ???
2337  // We will make the RefImagePoint the zero base center of the image. This
2338  // is used by the ossimSensorModel::worldToLineSample iterative loop as
2339  // the starting point. Since the ossimSensorModel does not know of the
2340  // sub image we make it zero base. (comments from spot)
2341  //---
2344 
2345  //---
2346  // Fetch number of bands
2347  //---
2348 
2350  {
2351  xpath = "/Raster_Dimensions/NBANDS";
2352  }
2353  else
2354  {
2355  xpath = "/Raster_Data/Raster_Dimensions/NBANDS";
2356  }
2357  xpath = theXmlDocumentRoot + xpath;
2358  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2359  {
2360  return false;
2361  }
2362  theNumBands = nodeValue.toUInt32();
2363 
2364  if (traceDebug())
2365  {
2366  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nNumber of bands: " << theNumBands << std::endl;
2367  }
2368 
2369  //---
2370  // Fetch Band Display Order
2371  //---
2372  xml_nodes.clear();
2374  {
2375  xpath = "/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/RED_CHANNEL";
2376  }
2377  else
2378  {
2379  xpath = "/Raster_Data/Raster_Display/Band_Display_Order/RED_CHANNEL";
2380  }
2381  xpath = theXmlDocumentRoot + xpath;
2382  xmlDocument->findNodes(xpath, xml_nodes);
2383  if (xml_nodes.size() == 0)
2384  {
2385  setErrorStatus();
2386  if (traceDebug())
2387  {
2388  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
2389  }
2390  return false;
2391  }
2392  theBandOrder.push_back(xml_nodes[0]->getText());
2393 
2394  if (theNumBands > 1)
2395  {
2396  xml_nodes.clear();
2398  {
2399  xpath = "/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/GREEN_CHANNEL";
2400  }
2401  else
2402  {
2403  xpath = "/Raster_Data/Raster_Display/Band_Display_Order/GREEN_CHANNEL";
2404  }
2405  xpath = theXmlDocumentRoot + xpath;
2406  xmlDocument->findNodes(xpath, xml_nodes);
2407  if (xml_nodes.size() == 0)
2408  {
2409  setErrorStatus();
2410  if (traceDebug())
2411  {
2412  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
2413  }
2414  return false;
2415  }
2416  theBandOrder.push_back(xml_nodes[0]->getText());
2417 
2418  xml_nodes.clear();
2420  {
2421  xpath = "/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/BLUE_CHANNEL";
2422  }
2423  else
2424  {
2425  xpath = "/Raster_Data/Raster_Display/Band_Display_Order/BLUE_CHANNEL";
2426  }
2427  xpath = theXmlDocumentRoot + xpath;
2428  xmlDocument->findNodes(xpath, xml_nodes);
2429  if (xml_nodes.size() == 0)
2430  {
2431  setErrorStatus();
2432  if (traceDebug())
2433  {
2434  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
2435  }
2436  return false;
2437  }
2438  theBandOrder.push_back(xml_nodes[0]->getText());
2439 
2440  if (theNumBands > 3)
2441  {
2442  xml_nodes.clear();
2444  {
2445  xpath = "/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/ALPHA_CHANNEL";
2446  }
2447  else
2448  {
2449  xpath = "/Raster_Data/Raster_Display/Band_Display_Order/ALPHA_CHANNEL";
2450  }
2451  xpath = theXmlDocumentRoot + xpath;
2452  xmlDocument->findNodes(xpath, xml_nodes);
2453  if (xml_nodes.size() == 0)
2454  {
2455  setErrorStatus();
2456  if (traceDebug())
2457  {
2458  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
2459  }
2460  return false;
2461  }
2462 
2463  theBandOrder.push_back(xml_nodes[0]->getText());
2464  }
2465  }
2466 
2467  return true;
2468  }
virtual bool setValue(const ossimString &value)
double samp
Definition: ossimDpt.h:164
ossimDpt theRefImagePoint
Zero based center of frame.
ossim_uint32 toUInt32() const
double line
Definition: ossimDpt.h:165
ossim_int32 samp
Definition: ossimIpt.h:141
ossim_int32 line
Definition: ossimIpt.h:142
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
int toInt() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseRPCMetadata()

bool ossimplugins::ossimPleiadesDimapSupportData::parseRPCMetadata ( ossimRefPtr< ossimXmlDocument xmlDocument)
private

Definition at line 1572 of file ossimPleiadesDimapSupportData.cpp.

References ossimString::clear(), ossimXmlDocument::findNodes(), OSSIM_PLEIADES_DIMAPv1, OSSIM_PLEIADES_DIMAPv2, ossimNotify(), ossimNotifyLevel_DEBUG, ossimErrorStatusInterface::setErrorStatus(), theDIMAPVersion, theErrBiasX, theErrBiasY, theHeightOffset, theHeightScale, theLatOffset, theLatScale, theLineDenCoeff, theLineNumCoeff, theLineOffset, theLineScale, theLonOffset, theLonScale, theSampDenCoeff, theSampNumCoeff, theSampOffset, theSampScale, theSpecId, theXmlDocumentRoot, and ossimString::toDouble().

Referenced by parseXmlFile().

1574  {
1575  static const char MODULE[] = "ossimPleiadesDimapSupportData::parseRPCMetadata";
1576  ossimString xpath, nodeValue;
1577  vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1578 
1579  //---
1580  // Fetch the Global RFM - Direct Model - Bias:
1581  //---
1582 
1583  // RESOURCE_ID does not exists in DIMAPv1 file
1585  {
1586  xpath = "/Rational_Function_Model/Resource_Reference/RESOURCE_ID";
1587  xpath = theXmlDocumentRoot + xpath;
1588  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1589  {
1590  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: Could not find: " << xpath << std::endl;
1591  return false;
1592  }
1593  theSpecId = nodeValue;
1594  }
1595 
1596  //---
1597  // Fetch the Global RFM - Inverse Model:
1598  //---
1599  xml_nodes.clear();
1601  {
1602  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model";
1603  }
1604  else
1605  {
1606  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model";
1607  }
1608  xpath = theXmlDocumentRoot + xpath;
1609  xmlDocument->findNodes(xpath, xml_nodes);
1610  if (xml_nodes.empty())
1611  {
1612  setErrorStatus();
1613  if(traceDebug())
1614  {
1615  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: Could not find: " << xpath << std::endl;
1616  }
1617  return false;
1618  }
1619 
1621  {
1622  std::vector<ossimString> coeffs;
1623 
1624  xml_nodes.clear();
1625  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/F_ROW";
1626  xpath = theXmlDocumentRoot + xpath;
1627  xmlDocument->findNodes(xpath, xml_nodes);
1628  coeffs = xml_nodes[0]->getText().split(" ", true);
1629 
1630  const size_t nRow = coeffs.size() / 2;
1631  for (size_t i = 0; i < nRow; i++)
1632  {
1633  theLineNumCoeff.push_back(coeffs[i].toDouble());
1634  theLineDenCoeff.push_back(coeffs[i + nRow].toDouble());
1635  }
1636 
1637  xml_nodes.clear();
1638  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/F_COL";
1639  xpath = theXmlDocumentRoot + xpath;
1640  xmlDocument->findNodes(xpath, xml_nodes);
1641  coeffs = xml_nodes[0]->getText().split(" ", true);
1642 
1643  const size_t nCol = coeffs.size() / 2;
1644  for (size_t i = 0; i < nCol; i++)
1645  {
1646  theSampNumCoeff.push_back(coeffs[i].toDouble());
1647  theSampDenCoeff.push_back(coeffs[i + nCol].toDouble());
1648  }
1649 
1650  }
1651  else
1652  {
1653  for (ossim_uint32 it = 1; it < 21; it ++)
1654  {
1655  std::ostringstream valueStr;
1656  valueStr << it;
1657 
1658  xml_nodes.clear();
1659  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_NUM_COEFF_";
1660  xpath = theXmlDocumentRoot + xpath;
1661  xpath = xpath + valueStr.str();
1662  xmlDocument->findNodes(xpath, xml_nodes);
1663  if (xml_nodes.size() == 0)
1664  {
1665  setErrorStatus();
1666  if(traceDebug())
1667  {
1668  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
1669  }
1670  return false;
1671  }
1672  theLineNumCoeff.push_back(xml_nodes[0]->getText().toDouble());
1673 
1674  xml_nodes.clear();
1675  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_DEN_COEFF_";
1676  xpath = theXmlDocumentRoot + xpath;
1677  xpath = xpath + valueStr.str();
1678  xmlDocument->findNodes(xpath, xml_nodes);
1679  if (xml_nodes.size() == 0)
1680  {
1681  setErrorStatus();
1682  if(traceDebug())
1683  {
1684  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
1685  }
1686  return false;
1687  }
1688  theLineDenCoeff.push_back(xml_nodes[0]->getText().toDouble());
1689 
1690  xml_nodes.clear();
1691  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_NUM_COEFF_";
1692  xpath = theXmlDocumentRoot + xpath;
1693  xpath = xpath + valueStr.str();
1694  xmlDocument->findNodes(xpath, xml_nodes);
1695  if (xml_nodes.size() == 0)
1696  {
1697  setErrorStatus();
1698  if(traceDebug())
1699  {
1700  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
1701  }
1702  return false;
1703  }
1704  theSampNumCoeff.push_back(xml_nodes[0]->getText().toDouble());
1705 
1706  xml_nodes.clear();
1707  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_DEN_COEFF_";
1708  xpath = theXmlDocumentRoot + xpath;
1709  xpath = xpath + valueStr.str();
1710  xmlDocument->findNodes(xpath, xml_nodes);
1711  if (xml_nodes.size() == 0)
1712  {
1713  setErrorStatus();
1714  if(traceDebug())
1715  {
1716  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
1717  }
1718  return false;
1719  }
1720  theSampDenCoeff.push_back(xml_nodes[0]->getText().toDouble());
1721  }
1722  }
1723  //---
1724  // Fetch the Global RFM - Inverse Model - Bias:
1725  //---
1727  {
1728  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/MODEL_PRECISION_ROW";
1729  }
1730  else
1731  {
1732  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_ROW";
1733  }
1734  xpath = theXmlDocumentRoot + xpath;
1735  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1736  {
1737  return false;
1738  }
1739  theErrBiasX = nodeValue.toDouble();
1740 
1742  {
1743  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/MODEL_PRECISION_COL";
1744  }
1745  else
1746  {
1747  xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_COL";
1748  }
1749  xpath = theXmlDocumentRoot + xpath;
1750  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1751  {
1752  return false;
1753  }
1754  theErrBiasY = nodeValue.toDouble();
1755 
1756  //---
1757  // Fetch the Global RFM validity parameters :
1758  //---
1760  {
1761  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lon/A";
1762  }
1763  else
1764  {
1765  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_SCALE";
1766  }
1767  xpath = theXmlDocumentRoot + xpath;
1768  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1769  {
1770  return false;
1771  }
1772  theLonScale = nodeValue.toDouble();
1773 
1775  {
1776  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lon/B";
1777  }
1778  else
1779  {
1780  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_OFF";
1781  }
1782  xpath = theXmlDocumentRoot + xpath;
1783  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1784  {
1785  return false;
1786  }
1787  theLonOffset = nodeValue.toDouble();
1788 
1790  {
1791  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lat/A";
1792  }
1793  else
1794  {
1795  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_SCALE";
1796  }
1797  xpath = theXmlDocumentRoot + xpath;
1798  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1799  {
1800  return false;
1801  }
1802  theLatScale = nodeValue.toDouble();
1803 
1805  {
1806  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lat/B";
1807  }
1808  else
1809  {
1810  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_OFF";
1811  }
1812  xpath = theXmlDocumentRoot + xpath;
1813  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1814  {
1815  return false;
1816  }
1817  theLatOffset = nodeValue.toDouble();
1818 
1820  {
1821  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Alt/A";
1822  }
1823  else
1824  {
1825  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_SCALE";
1826  }
1827  xpath = theXmlDocumentRoot + xpath;
1828  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1829  {
1830  return false;
1831  }
1832  theHeightScale = nodeValue.toDouble();
1833 
1835  {
1836  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Alt/B";
1837  }
1838  else
1839  {
1840  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_OFF";
1841  }
1842  xpath = theXmlDocumentRoot + xpath;
1843  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1844  {
1845  return false;
1846  }
1847  theHeightOffset = nodeValue.toDouble();
1848 
1850  {
1851  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Col/A";
1852  }
1853  else
1854  {
1855  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_SCALE";
1856  }
1857  xpath = theXmlDocumentRoot + xpath;
1858  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1859  {
1860  return false;
1861  }
1862  theSampScale = nodeValue.toDouble();
1863 
1865  {
1866  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Col/B";
1867  }
1868  else
1869  {
1870  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_OFF";
1871  }
1872  xpath = theXmlDocumentRoot + xpath;
1873  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1874  {
1875  return false;
1876  }
1877  // Pleiades metadata assume that the coordinate of the center of
1878  // the upper-left pixel is (1,1), so we remove 1 to get back to
1879  // OSSIM convention.
1880  theSampOffset = nodeValue.toDouble()-1;
1881 
1883  {
1884  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Row/A";
1885  }
1886  else
1887  {
1888  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_SCALE";
1889  }
1890  xpath = theXmlDocumentRoot + xpath;
1891  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1892  {
1893  return false;
1894  }
1895  theLineScale = nodeValue.toDouble();
1896 
1898  {
1899  xpath = "/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Row/B";
1900  }
1901  else
1902  {
1903  xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_OFF";
1904  }
1905  xpath = theXmlDocumentRoot + xpath;
1906  if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1907  {
1908  return false;
1909  }
1910  // Pleiades metadata assume that the coordinate of the center of
1911  // the upper-left pixel is (1,1), so we remove 1 to get back to
1912  // OSSIM convention.
1913  theLineOffset = nodeValue.toDouble()-1;
1914 
1915  return true;
1916  }
void clear()
Erases the entire container.
Definition: ossimString.h:432
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
unsigned int ossim_uint32
double toDouble() const
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ parseXmlFile()

bool ossimplugins::ossimPleiadesDimapSupportData::parseXmlFile ( const ossimFilename file)

Definition at line 366 of file ossimPleiadesDimapSupportData.cpp.

References allMetadataRead(), ossimString::c_str(), clearFields(), ossimString::contains(), ossimString::empty(), ossimFilename::fileSize(), ossimErrorStatusInterface::getErrorStatus(), min, OSSIM_PLEIADES_DIMAPv1, OSSIM_PLEIADES_METADATA_SUBPROFILE_PRODUCT, OSSIM_PLEIADES_METADATA_SUBPROFILE_RPC, ossimNotify(), ossimNotifyLevel_DEBUG, ossimNotifyLevel_FATAL, parseCoordinateReferenceSystem(), parseDatasetContent(), parseDatasetIdentification(), parseDatasetSources(), parseGeometricData(), parseGeoposition(), parseMetadataIdentificationDIMAPv1(), parseMetadataIdentificationDIMAPv2(), parseProcessingInformation(), parseProductInformation(), parseQualityAssessment(), parseRadiometricData(), parseRasterData(), parseRPCMetadata(), printInfo(), ossimXmlDocument::read(), ossimErrorStatusInterface::setErrorStatus(), ossimString::string(), theDIMAPVersion, theMetadataSubProfile, theProcessingLevelString, theProductIsOk, and theRpcIsOk.

367  {
368  static const char MODULE[] = "ossimPleiadesDimapSupportData::parseXmlFile";
369  //traceDebug.setTraceFlag(true);
370 
371  if(traceDebug())
372  {
373  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nFile: " << file << std::endl;
374  }
375 
376  if (allMetadataRead())
377  clearFields();
378 
379  //---
380  // Instantiate the file reading:
381  //---
382  ossim_int64 fileSize = file.fileSize();
383  std::ifstream in(file.c_str(), std::ios::binary|std::ios::in);
384  std::vector<char> fullBuffer;
385  ossimString bufferedIo;
386  if(in.good()&&(fileSize > 0))
387  {
388  char buf[100];
389  fullBuffer.resize(fileSize);
390  in.read(buf, std::min((ossim_int64)100, fileSize));
391  if(!in.fail())
392  {
393  ossimString testString = ossimString(buf,
394  buf + in.gcount());
395  if(testString.contains("xml"))
396  {
397  in.seekg(0);
398  in.read(&fullBuffer.front(), (std::streamsize)fullBuffer.size());
399  if(!in.fail())
400  {
401  bufferedIo = ossimString(fullBuffer.begin(),
402  fullBuffer.begin()+in.gcount());
403  }
404  }
405  }
406  }
407  else
408  {
409  return false;
410  }
411  //---
412  // Instantiate the XML parser:
413  //---
414  ossimRefPtr<ossimXmlDocument> xmlDocument;
415 
416  if(bufferedIo.empty())
417  {
418  xmlDocument = new ossimXmlDocument(file);
419  }
420  else
421  {
422  xmlDocument = new ossimXmlDocument;
423  std::istringstream inStringStream(bufferedIo.string());
424  if(!xmlDocument->read(inStringStream))
425  {
426  return false;
427  }
428  }
429  if (xmlDocument->getErrorStatus())
430  {
431  if(traceDebug())
432  {
434  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
435  << "\nUnable to parse xml file" << std::endl;
436  }
437  setErrorStatus();
438  return false;
439  }
440 
441  if (!parseMetadataIdentificationDIMAPv2(xmlDocument)
442  && !parseMetadataIdentificationDIMAPv1(xmlDocument))
443  {
444  if (traceDebug())
445  {
447  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
448  << "\nparseMetadataIdentification failed. Returning false"
449  << std::endl;
450  }
451  return false;
452  }
453 
456  {
457  if (theProductIsOk)
458  clearFields();
459 
460  if (!parseDatasetIdentification(xmlDocument))
461  {
462  if (traceDebug())
463  {
465  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
466  << "\nparseDatasetdentification failed. Returning false" << std::endl;
467  }
468  return false;
469  }
470 
471  if (!parseDatasetContent(xmlDocument))
472  {
474  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
475  << "\nparseDatasetContent failed. Returning false" << std::endl;
476  return false;
477  }
478 
479  if (!parseProductInformation(xmlDocument))
480  {
481  if (traceDebug())
482  {
484  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
485  << "\nparseProductInformation failed. Returning false" << std::endl;
486  }
487  return false;
488  }
489 
490  if (!parseCoordinateReferenceSystem(xmlDocument))
491  {
492  if (traceDebug())
493  {
495  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
496  << "\nparseCoordinateReferenceSystem failed. Returning false" << std::endl;
497  }
498  return false;
499  }
500 
501  if (!parseGeoposition(xmlDocument))
502  {
503  if (traceDebug())
504  {
506  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
507  << "\nparseGeoposition failed. Returning false" << std::endl;
508  }
509  return false;
510  }
511 
512  if (!parseProcessingInformation(xmlDocument))
513  {
514  if (traceDebug())
515  {
517  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
518  << "\nparseProcessingInformation failed. Returning false" << std::endl;
519  }
520  return false;
521  }
522 
523  if (!parseRasterData(xmlDocument))
524  {
525  if (traceDebug())
526  {
528  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
529  << "\nparseRasterData failed. Returning false" << std::endl;
530  }
531  return false;
532  }
533 
534  if (!parseRadiometricData(xmlDocument))
535  {
537  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
538  << "\nparseRadiometricData failed. Returning false" << std::endl;
539  return false;
540  }
541 
542  if (!parseGeometricData(xmlDocument))
543  {
545  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
546  << "\nparseGeometricData failed. Returning false" << std::endl;
547  return false;
548  }
549 
550  if (!parseQualityAssessment(xmlDocument))
551  {
553  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
554  << "\nparseQualityAssessment failed. Returning false" << std::endl;
555  return false;
556  }
557 
558  if (!parseDatasetSources(xmlDocument))
559  {
561  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
562  << "\nparseDatasetSources failed. Returning false" << std::endl;
563  return false;
564  }
565 
566  theProductIsOk = true;
567  }
568 
571  {
572  // Parse RPC file
573  if (theProcessingLevelString == "SENSOR")
574  {
575  if (parseRPCMetadata(xmlDocument) == false)
576  {
578  << MODULE << " DEBUG:" << "ossimPleiadesDimapSupportData::parseXmlFile:"
579  << "\nparseRPCMetadata initialization failed. Returning false" << std::endl;
580  return false;
581  }
582  theRpcIsOk = true;
583  }
584  else
585  theRpcIsOk = true;
586  }
587 
588  if (theProcessingLevelString != "SENSOR")
589  theRpcIsOk = true;
590 
591  if (traceDebug() && allMetadataRead())
592  {
594  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: exited..." << std::endl;
595  }
596 
597  return true;
598  }
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
ossim_int64 fileSize() const
bool contains(char aChar) const
Definition: ossimString.h:58
bool parseQualityAssessment(ossimRefPtr< ossimXmlDocument > xmlDocument)
QualityAssessment:
bool parseRadiometricData(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseProductInformation(ossimRefPtr< ossimXmlDocument > xmlDocument)
Product Information:
bool parseMetadataIdentificationDIMAPv1(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseDatasetIdentification(ossimRefPtr< ossimXmlDocument > xmlDocument)
Dataset Identification:
bool parseRPCMetadata(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseRasterData(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseDatasetContent(ossimRefPtr< ossimXmlDocument > xmlDocument)
Dataset Content:
virtual ossimErrorCode getErrorStatus() const
bool parseCoordinateReferenceSystem(ossimRefPtr< ossimXmlDocument > xmlDocument)
Coordinate Reference System:
long long ossim_int64
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
bool empty() const
Definition: ossimString.h:411
bool parseGeometricData(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool read(std::istream &in)
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
bool parseDatasetSources(ossimRefPtr< ossimXmlDocument > xmlDocument)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
bool parseMetadataIdentificationDIMAPv2(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseProcessingInformation(ossimRefPtr< ossimXmlDocument > xmlDocument)
Processing Information:
#define min(a, b)
Definition: auxiliary.h:75
bool parseGeoposition(ossimRefPtr< ossimXmlDocument > xmlDocument)
Geoposition:
const std::string & string() const
Definition: ossimString.h:414

◆ printInfo()

void ossimplugins::ossimPleiadesDimapSupportData::printInfo ( ostream &  os) const

Definition at line 289 of file ossimPleiadesDimapSupportData.cpp.

References theAcquisitionDate, theImageID, theInstrument, theInstrumentIndex, theNumBands, theProcessingLevelString, theProductionDate, and theSpectralProcessingString.

Referenced by parseXmlFile().

290  {
291 
292  os << "\n----------------- Info on Pleiades Image -------------------"
293  << "\n "
294  << "\n Job Number (ID): " << theImageID
295  << "\n Acquisition Date: " << theAcquisitionDate
296  << "\n Instrument: " << theInstrument
297  << "\n Instrument Index: " << theInstrumentIndex
298  << "\n Production Date: " << theProductionDate
299  << "\n Processing Level: " << theProcessingLevelString
300  << "\n Spectral Processing: " << theSpectralProcessingString
301 
302  << "\n Number of Bands: " << theNumBands
303  << "\n Bands Display Order: " << getVectorStringAsString(theBandOrder)
304 
305  << "\n Image Size: " << theImageSize
306  << "\n Tile Size: " << theTileSize
307  << "\n Number Of Tiles (Row, Col): " << theNumberOfMegaTiles << " ("
308  << theNumberOfMegaTilesInRow << ", "
309  << theNumberOfMegaTilesInCol << ")"
310 
311  << "\n Incidence Angle (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theIncidenceAngle)
312  << "\n Viewing Angle (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theViewingAngle)
313  << "\n Azimuth Angle (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theAzimuthAngle)
314  << "\n Along track incidence angle (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theAlongTrackIncidenceAngle)
315  << "\n Across track incidence angle (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theAcrossTrackIncidenceAngle)
316  << "\n Sun Azimuth (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theSunAzimuth)
317  << "\n Sun Elevation (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(theSunElevation)
318 
319  << "\n Physical Bias (for each band): " << getVectorFloat64AsString(thePhysicalBias)
320  << "\n Physical Gain (for each band): " << getVectorFloat64AsString(thePhysicalGain)
321  << "\n Solar Irradiance (for each band): " << getVectorFloat64AsString(theSolarIrradiance)
322 
323  << "\n Geo Center Point: " << theRefGroundPoint
324  // TODO add RefImagePoint if necessary
325 
326  << "\n Corner Points:"
327  << "\n UL: " << theUlCorner
328  << "\n UR: " << theUrCorner
329  << "\n LR: " << theLrCorner
330  << "\n LL: " << theLlCorner
331  << "\n"
332 
333  << "\n RPC model parameters:"
334  << "\n RPC ID: " << theSpecId
335  << "\n SampNumCoeff: " << getVectorDoubleAsString(theSampNumCoeff)
336  << "\n SampDenCoeff: " << getVectorDoubleAsString(theSampDenCoeff)
337  << "\n LineNumCoeff: " << getVectorDoubleAsString(theLineNumCoeff)
338  << "\n LineDenCoeff: " << getVectorDoubleAsString(theLineDenCoeff)
339  << "\n LonScale: " << theLonScale
340  << "\n LonOffset: " << theLonOffset
341  << "\n LatScale: " << theLatScale
342  << "\n LonScale: " << theLonScale
343  << "\n HeightScale: " << theHeightScale
344  << "\n HeightOffset: " << theHeightOffset
345  << "\n SampScale: " << theSampScale
346  << "\n SampOffset: " << theSampOffset
347  << "\n LineScale: " << theLineScale
348  << "\n LineOffset: " << theLineOffset
349  << "\n theErrBias: " << theErrBias
350  << "\n theErrBiasX: " << theErrBiasX
351  << "\n theErrBiasY: " << theErrBiasY
352  << "\n theErrRand: " << theErrRand
353  << "\n"
354 
355  << "\n Acquisition time parameters (only valid for SENSOR product):"
356  << "\n TimeRangeStart: "<< theTimeRangeStart
357  << "\n TimeRangeEnd: "<< theTimeRangeEnd
358  << "\n LinePeriod: "<< theLinePeriod
359  << "\n SwathFirstCol: "<< theSwathFirstCol
360  << "\n SwathLastCol: "<< theSwathLastCol
361  << "\n"
362  << "\n---------------------------------------------------------"
363  << "\n " << std::endl;
364  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.

◆ saveState()

bool ossimplugins::ossimPleiadesDimapSupportData::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of the object to a keyword list.

Return true if ok or false on error.

Reimplemented from ossimObject.

Definition at line 712 of file ossimPleiadesDimapSupportData.cpp.

References ossimKeywordlist::add(), ossimKeywordNames::AZIMUTH_ANGLE_KW, ossimDatum::code(), ossimGpt::datum(), ossimKeywordNames::ELEVATION_ANGLE_KW, ossimGpt::height(), ossimKeywordNames::IMAGE_DATE_KW, ossimGpt::latd(), ossimGpt::lond(), ossimKeywordNames::NUMBER_BANDS_KW, theAcquisitionDate, theAcrossTrackIncidenceAngle, theAlongTrackIncidenceAngle, theAzimuthAngle, theBandOrder, theImageID, theImageSize, theIncidenceAngle, theInstrument, theInstrumentIndex, theLinePeriod, theLlCorner, theLrCorner, theNumBands, thePhysicalBias, thePhysicalGain, theProcessingLevelString, theProductionDate, theRefGroundPoint, theRefImagePoint, theSensorID, theSolarIrradiance, theSunAzimuth, theSunElevation, theSwathFirstCol, theSwathLastCol, theTimeRangeEnd, theTimeRangeStart, theUlCorner, theUrCorner, theViewingAngle, ossimString::toString(), ossimKeywordNames::TYPE_KW, ossimIpt::x, ossimDpt::x, ossimIpt::y, and ossimDpt::y.

714  {
715  ossimString tempString;
716  ossim_uint32 idx = 0;
717 
718  kwl.add(prefix,
720  "ossimPleiadesDimapSupportData",
721  true);
722 
723  tempString = "";
724  for(idx = 0; idx < theSunAzimuth.size(); ++idx)
725  {
726  tempString += (ossimString::toString(theSunAzimuth[idx]) + " ");
727  }
728 
729  kwl.add(prefix,
731  tempString,
732  true);
733 
734  kwl.add(prefix,
735  "number_of_azimuth_angle",
736  static_cast<ossim_uint32>(theSunAzimuth.size()),
737  true);
738 
739  tempString = "";
740  for(idx = 0; idx < theSunElevation.size(); ++idx)
741  {
742  tempString += (ossimString::toString(theSunElevation[idx]) + " ");
743  }
744 
745  kwl.add(prefix,
747  tempString,
748  true);
749 
750  kwl.add(prefix,
751  "number_of_elevation_angle",
752  static_cast<ossim_uint32>(theSunElevation.size()),
753  true);
754 
755  //---
756  // Note: since this is a new keyword, use the point.toString as there is
757  // no backwards compatibility issues.
758  //---
759 
760  kwl.add(prefix,
761  "image_size",
764  true);
765 
766  kwl.add(prefix,
767  "reference_ground_point",
772  true);
773 
774  kwl.add(prefix,
775  "reference_image_point",
778  true);
779 
780  kwl.add(prefix,
782  theNumBands,
783  true);
784 
785  tempString = "";
786  for(idx = 0; idx < theBandOrder.size(); ++idx)
787  {
788  tempString += (theBandOrder[idx] + " ");
789  }
790 
791  kwl.add(prefix,
792  "band_name_list",
793  tempString,
794  true);
795 
796  kwl.add(prefix,
797  "image_id",
798  theImageID,
799  true);
800 
801  kwl.add(prefix,
802  "processing_level",
804  true);
805 
806  kwl.add(prefix,
807  "instrument",
809  true);
810 
811  kwl.add(prefix,
812  "instrument_index",
814  true);
815 
816  kwl.add(prefix,
819  true);
820 
821  kwl.add(prefix,
822  "production_date",
824  true);
825 
826  tempString = "";
827  for(idx = 0; idx < theIncidenceAngle.size(); ++idx)
828  {
829  tempString += (ossimString::toString(theIncidenceAngle[idx]) + " ");
830  }
831 
832  kwl.add(prefix,
833  "incident_angle",
834  tempString,
835  true);
836 
837  kwl.add(prefix,
838  "number_of_incident_angle",
839  static_cast<ossim_uint32>(theIncidenceAngle.size()),
840  true);
841 
842  tempString = "";
843  for(idx = 0; idx < theViewingAngle.size(); ++idx)
844  {
845  tempString += (ossimString::toString(theViewingAngle[idx]) + " ");
846  }
847 
848  kwl.add(prefix,
849  "viewing_angle",
850  tempString,
851  true);
852 
853  kwl.add(prefix,
854  "number_of_viewing_angle",
855  static_cast<ossim_uint32>(theViewingAngle.size()),
856  true);
857 
858  tempString = "";
859  for(idx = 0; idx < theAzimuthAngle.size(); ++idx)
860  {
861  tempString += (ossimString::toString(theAzimuthAngle[idx]) + " ");
862  }
863 
864  kwl.add(prefix,
865  "scene_orientation",
866  tempString,
867  true);
868 
869  kwl.add(prefix,
870  "number_of_scene_orientation",
871  static_cast<ossim_uint32>(theAzimuthAngle.size()),
872  true);
873 
874 
875  tempString = "";
876  for(idx = 0; idx < theAlongTrackIncidenceAngle.size(); ++idx)
877  {
878  tempString += (ossimString::toString(theAlongTrackIncidenceAngle[idx]) + " ");
879  }
880  kwl.add(prefix,
881  "along_track_incidence_angle",
882  tempString,
883  true);
884 
885  kwl.add(prefix,
886  "number_of_along_track_incidence_angle",
887  static_cast<ossim_uint32>(theAlongTrackIncidenceAngle.size()),
888  true);
889 
890 
891  tempString = "";
892  for(idx = 0; idx < theAcrossTrackIncidenceAngle.size(); ++idx)
893  {
894  tempString += (ossimString::toString(theAcrossTrackIncidenceAngle[idx]) + " ");
895  }
896  kwl.add(prefix,
897  "across_track_incidence_angle",
898  tempString,
899  true);
900 
901  kwl.add(prefix,
902  "number_of_across_track_incidence_angle",
903  static_cast<ossim_uint32>(theAcrossTrackIncidenceAngle.size()),
904  true);
905 
906  kwl.add(prefix,
907  "ul_ground_point",
911  theUlCorner.datum()->code(),
912  true);
913 
914  kwl.add(prefix,
915  "ur_ground_point",
919  theUrCorner.datum()->code(),
920  true);
921 
922  kwl.add(prefix,
923  "lr_ground_point",
927  theLrCorner.datum()->code(),
928  true);
929 
930  kwl.add(prefix,
931  "ll_ground_point",
935  theLlCorner.datum()->code(),
936  true);
937 
938  kwl.add(prefix,
939  "sensorID",
940  theSensorID,
941  true);
942 
943 
944  tempString = "";
945  for(idx = 0; idx < thePhysicalBias.size(); ++idx)
946  {
947  tempString += (ossimString::toString(thePhysicalBias[idx]) + " ");
948  }
949  kwl.add(prefix,
950  "physical_bias",
951  tempString,
952  true);
953 
954  tempString = "";
955  for(idx = 0; idx < thePhysicalGain.size(); ++idx)
956  {
957  tempString += (ossimString::toString(thePhysicalGain[idx]) + " ");
958  }
959  kwl.add(prefix,
960  "physical_gain",
961  tempString,
962  true);
963 
964  tempString = "";
965  for(idx = 0; idx < theSolarIrradiance.size(); ++idx)
966  {
967  tempString += (ossimString::toString(theSolarIrradiance[idx]) + " ");
968  }
969 
970  kwl.add(prefix,
971  "solar_irradiance",
972  tempString,
973  true);
974 
975  // Some geometric parameters exist only in the case of a SENSOR image
976  if (theProcessingLevelString == "SENSOR")
977  {
978  kwl.add(prefix,
979  "time_range_start",
981  true);
982 
983  kwl.add(prefix,
984  "time_range_end",
986  true);
987 
988  kwl.add(prefix,
989  "line_period",
991  true);
992 
993  kwl.add(prefix,
994  "swath_first_col",
996  true);
997  kwl.add(prefix,
998  "swath_last_col",
1000  true);
1001  }
1002 
1003  return true;
1004  }
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
static const char * IMAGE_DATE_KW
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
double y
Definition: ossimDpt.h:165
virtual const ossimString & code() const
Definition: ossimDatum.h:57
static ossimString toString(bool aValue)
Numeric to string methods.
ossimDpt theRefImagePoint
Zero based center of frame.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
static const char * TYPE_KW
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
unsigned int ossim_uint32
double height() const
Definition: ossimGpt.h:107
static const char * NUMBER_BANDS_KW
static const char * AZIMUTH_ANGLE_KW
ossim_int32 y
Definition: ossimIpt.h:142
double x
Definition: ossimDpt.h:164
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it&#39;s the center of that.
ossim_int32 x
Definition: ossimIpt.h:141
static const char * ELEVATION_ANGLE_KW

Member Data Documentation

◆ theAcquisitionDate

ossimString ossimplugins::ossimPleiadesDimapSupportData::theAcquisitionDate
private

◆ theAcrossTrackIncidenceAngle

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theAcrossTrackIncidenceAngle
private

◆ theAlongTrackIncidenceAngle

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theAlongTrackIncidenceAngle
private

◆ theAzimuthAngle

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theAzimuthAngle
private

◆ theBandOrder

std::vector<ossimString> ossimplugins::ossimPleiadesDimapSupportData::theBandOrder
private

◆ theDIMAPVersion

ossimPleiadesDIMAPVersion ossimplugins::ossimPleiadesDimapSupportData::theDIMAPVersion
private

◆ theErrBias

double ossimplugins::ossimPleiadesDimapSupportData::theErrBias
private

Definition at line 218 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields().

◆ theErrBiasX

double ossimplugins::ossimPleiadesDimapSupportData::theErrBiasX
private

Definition at line 219 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theErrBiasY

double ossimplugins::ossimPleiadesDimapSupportData::theErrBiasY
private

Definition at line 220 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theErrRand

double ossimplugins::ossimPleiadesDimapSupportData::theErrRand
private

Definition at line 221 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields().

◆ theHeightOffset

double ossimplugins::ossimPleiadesDimapSupportData::theHeightOffset
private

Definition at line 226 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theHeightScale

double ossimplugins::ossimPleiadesDimapSupportData::theHeightScale
private

Definition at line 231 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theImageID

ossimString ossimplugins::ossimPleiadesDimapSupportData::theImageID
private

◆ theImageSize

ossimIpt ossimplugins::ossimPleiadesDimapSupportData::theImageSize
private

◆ theIncidenceAngle

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theIncidenceAngle
private

◆ theInstrument

ossimString ossimplugins::ossimPleiadesDimapSupportData::theInstrument
private

◆ theInstrumentIndex

ossimString ossimplugins::ossimPleiadesDimapSupportData::theInstrumentIndex
private

◆ theLatOffset

double ossimplugins::ossimPleiadesDimapSupportData::theLatOffset
private

Definition at line 224 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLatScale

double ossimplugins::ossimPleiadesDimapSupportData::theLatScale
private

Definition at line 229 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLineDenCoeff

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::theLineDenCoeff
private

Definition at line 234 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLineNumCoeff

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::theLineNumCoeff
private

Definition at line 233 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLineOffset

double ossimplugins::ossimPleiadesDimapSupportData::theLineOffset
private

Definition at line 222 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLinePeriod

ossim_float64 ossimplugins::ossimPleiadesDimapSupportData::theLinePeriod
private

◆ theLineScale

double ossimplugins::ossimPleiadesDimapSupportData::theLineScale
private

Definition at line 227 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLlCorner

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::theLlCorner
private

◆ theLonOffset

double ossimplugins::ossimPleiadesDimapSupportData::theLonOffset
private

Definition at line 225 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLonScale

double ossimplugins::ossimPleiadesDimapSupportData::theLonScale
private

Definition at line 230 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theLrCorner

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::theLrCorner
private

◆ theMetadataSubProfile

ossimPleiadesMetadataSubProfile ossimplugins::ossimPleiadesDimapSupportData::theMetadataSubProfile
private

◆ theMultiDataFile

ossimBooleanProperty ossimplugins::ossimPleiadesDimapSupportData::theMultiDataFile
private

Definition at line 198 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRasterData().

◆ theNumBands

ossim_uint32 ossimplugins::ossimPleiadesDimapSupportData::theNumBands
private

◆ theNumberOfMegaTiles

ossim_uint32 ossimplugins::ossimPleiadesDimapSupportData::theNumberOfMegaTiles
private

Definition at line 197 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRasterData().

◆ theNumberOfMegaTilesInCol

ossim_uint32 ossimplugins::ossimPleiadesDimapSupportData::theNumberOfMegaTilesInCol
private

Definition at line 196 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRasterData().

◆ theNumberOfMegaTilesInRow

ossim_uint32 ossimplugins::ossimPleiadesDimapSupportData::theNumberOfMegaTilesInRow
private

Definition at line 195 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRasterData().

◆ thePhysicalBias

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::thePhysicalBias
private

Calibration information for radiometric corrections.

Definition at line 204 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), loadState(), parseRadiometricData(), and saveState().

◆ thePhysicalGain

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::thePhysicalGain
private

◆ theProcessingLevelString

ossimString ossimplugins::ossimPleiadesDimapSupportData::theProcessingLevelString
private

◆ theProductionDate

ossimString ossimplugins::ossimPleiadesDimapSupportData::theProductionDate
private

◆ theProductIsOk

bool ossimplugins::ossimPleiadesDimapSupportData::theProductIsOk
private

Definition at line 171 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseXmlFile().

◆ theRefGroundPoint

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::theRefGroundPoint
private

Center of frame on ground, if sub image it's the center of that.

Definition at line 249 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), getRefGroundPoint(), loadState(), parseDatasetContent(), and saveState().

◆ theRefImagePoint

ossimDpt ossimplugins::ossimPleiadesDimapSupportData::theRefImagePoint
private

Zero based center of frame.

Definition at line 252 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), getRefImagePoint(), loadState(), parseRasterData(), and saveState().

◆ theRpcIsOk

bool ossimplugins::ossimPleiadesDimapSupportData::theRpcIsOk
private

Definition at line 172 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseXmlFile().

◆ theSampDenCoeff

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::theSampDenCoeff
private

Definition at line 236 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theSampNumCoeff

std::vector<double> ossimplugins::ossimPleiadesDimapSupportData::theSampNumCoeff
private

Definition at line 235 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theSampOffset

double ossimplugins::ossimPleiadesDimapSupportData::theSampOffset
private

Definition at line 223 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theSampScale

double ossimplugins::ossimPleiadesDimapSupportData::theSampScale
private

Definition at line 228 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theSensorID

ossimString ossimplugins::ossimPleiadesDimapSupportData::theSensorID
private

◆ theSolarIrradiance

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theSolarIrradiance
private

◆ theSpecId

ossimString ossimplugins::ossimPleiadesDimapSupportData::theSpecId
private

Definition at line 217 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRPCMetadata().

◆ theSpectralProcessingString

ossimString ossimplugins::ossimPleiadesDimapSupportData::theSpectralProcessingString
private

◆ theSunAzimuth

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theSunAzimuth
private

◆ theSunElevation

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theSunElevation
private

◆ theSwathFirstCol

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::theSwathFirstCol
private

◆ theSwathLastCol

ossim_int32 ossimplugins::ossimPleiadesDimapSupportData::theSwathLastCol
private

◆ theTileSize

ossimIpt ossimplugins::ossimPleiadesDimapSupportData::theTileSize
private

Definition at line 194 of file ossimPleiadesDimapSupportData.h.

Referenced by clearFields(), and parseRasterData().

◆ theTimeRangeEnd

ossimString ossimplugins::ossimPleiadesDimapSupportData::theTimeRangeEnd
private

◆ theTimeRangeStart

ossimString ossimplugins::ossimPleiadesDimapSupportData::theTimeRangeStart
private

◆ theUlCorner

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::theUlCorner
private

◆ theUrCorner

ossimGpt ossimplugins::ossimPleiadesDimapSupportData::theUrCorner
private

◆ theViewingAngle

std::vector<ossim_float64> ossimplugins::ossimPleiadesDimapSupportData::theViewingAngle
private

◆ theXmlDocumentRoot

ossimString ossimplugins::ossimPleiadesDimapSupportData::theXmlDocumentRoot
private

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