51 static ossimTrace traceExec (
"ossimPleiadesDimapSupportData:exec");
52 static ossimTrace traceDebug (
"ossimPleiadesDimapSupportData:debug");
54 static std::string getVectorFloat64AsString(std::vector<ossim_float64> in)
56 std::vector<ossim_float64>::iterator it;
59 for ( it=in.begin() ; it < in.end(); it++ )
61 strTmp <<
" " << (*it);
67 static std::string getVectorDoubleAsString(std::vector<double> in)
69 std::vector<double>::iterator it;
72 for ( it=in.begin() ; it < in.end(); it++ )
74 strTmp <<
" " << (*it);
80 static std::string getVectorStringAsString(std::vector<ossimString> in)
82 std::vector<ossimString>::iterator it;
85 for ( it=in.begin() ; it < in.end(); it++ )
87 strTmp <<
" " << (*it);
102 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
104 xmlDocument->
findNodes(xpath, xml_nodes);
105 if (xml_nodes.size() == 0)
110 <<
"\nCould not find: " << xpath << std::endl;
114 if (xml_nodes.size() != 1)
119 <<
"\nMore than one node value with " << xpath << std::endl;
123 nodeValue = xml_nodes[0]->getText();
129 theDIMAPVersion(OSSIM_PLEIADES_UNKNOWN),
130 theMetadataSubProfile(OSSIM_PLEIADES_METADATA_SUBPROFILE_UNKNOWN),
131 theProductIsOk(false),
133 theXmlDocumentRoot(),
138 theAcquisitionDate(),
140 theInstrumentIndex(),
141 theProcessingLevelString(),
142 theSpectralProcessingString(),
149 theAlongTrackIncidenceAngle(),
150 theAcrossTrackIncidenceAngle(),
154 theNumberOfMegaTilesInRow(0),
155 theNumberOfMegaTilesInCol(0),
156 theNumberOfMegaTiles(0),
164 theSolarIrradiance(),
197 theRefGroundPoint(0.0, 0.0, 0.0),
198 theRefImagePoint(0.0, 0.0)
292 os <<
"\n----------------- Info on Pleiades Image -------------------" 303 <<
"\n Bands Display Order: " << getVectorStringAsString(
theBandOrder)
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)
316 <<
"\n Sun Azimuth (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(
theSunAzimuth)
317 <<
"\n Sun Elevation (TopCenter, Center, BottomCenter): " << getVectorFloat64AsString(
theSunElevation)
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)
326 <<
"\n Corner Points:" 333 <<
"\n RPC model parameters:" 355 <<
"\n Acquisition time parameters (only valid for SENSOR product):" 362 <<
"\n---------------------------------------------------------" 363 <<
"\n " << std::endl;
368 static const char MODULE[] =
"ossimPleiadesDimapSupportData::parseXmlFile";
384 std::vector<char> fullBuffer;
386 if(in.good()&&(fileSize > 0))
389 fullBuffer.resize(fileSize);
398 in.read(&fullBuffer.front(), (std::streamsize)fullBuffer.size());
402 fullBuffer.begin()+in.gcount());
416 if(bufferedIo.
empty())
424 if(!xmlDocument->
read(inStringStream))
434 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 435 <<
"\nUnable to parse xml file" << std::endl;
447 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 448 <<
"\nparseMetadataIdentification failed. Returning false" 465 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 466 <<
"\nparseDatasetdentification failed. Returning false" << std::endl;
474 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 475 <<
"\nparseDatasetContent failed. Returning false" << std::endl;
484 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 485 <<
"\nparseProductInformation failed. Returning false" << std::endl;
495 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 496 <<
"\nparseCoordinateReferenceSystem failed. Returning false" << std::endl;
506 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 507 <<
"\nparseGeoposition failed. Returning false" << std::endl;
517 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 518 <<
"\nparseProcessingInformation failed. Returning false" << std::endl;
528 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 529 <<
"\nparseRasterData failed. Returning false" << std::endl;
537 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 538 <<
"\nparseRadiometricData failed. Returning false" << std::endl;
545 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 546 <<
"\nparseGeometricData failed. Returning false" << std::endl;
553 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 554 <<
"\nparseQualityAssessment failed. Returning false" << std::endl;
561 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 562 <<
"\nparseDatasetSources failed. Returning false" << std::endl;
578 << MODULE <<
" DEBUG:" <<
"ossimPleiadesDimapSupportData::parseXmlFile:" 579 <<
"\nparseRPCMetadata initialization failed. Returning false" << std::endl;
713 const char* prefix)
const 720 "ossimPleiadesDimapSupportData",
735 "number_of_azimuth_angle",
751 "number_of_elevation_angle",
767 "reference_ground_point",
775 "reference_image_point",
838 "number_of_incident_angle",
854 "number_of_viewing_angle",
870 "number_of_scene_orientation",
881 "along_track_incidence_angle",
886 "number_of_along_track_incidence_angle",
897 "across_track_incidence_angle",
902 "number_of_across_track_incidence_angle",
1018 if(type !=
"ossimPleiadesDimapSupportData")
1023 total =
ossimString(kwl.
find(prefix,
"number_of_azimuth_angle")).toUInt32();
1026 if(tempString !=
"")
1032 in >> tempValue.
string();
1037 total =
ossimString(kwl.
find(prefix,
"number_of_elevation_angle")).toUInt32();
1040 if(tempString !=
"")
1046 in >> tempValue.
string();
1060 tempString = kwl.
find(prefix,
"band_name_list");
1061 if(tempString !=
"")
1067 in >> tempValue.
string();
1078 total =
ossimString(kwl.
find(prefix,
"number_of_incident_angle")).toUInt32();
1080 tempString = kwl.
find(prefix,
"incident_angle");
1081 if(tempString !=
"")
1087 in >> tempValue.
string();
1092 total =
ossimString(kwl.
find(prefix,
"number_of_viewing_angle")).toUInt32();
1094 tempString = kwl.
find(prefix,
"viewing_angle");
1095 if(tempString !=
"")
1101 in >> tempValue.
string();
1106 total =
ossimString(kwl.
find(prefix,
"number_of_scene_orientation")).toUInt32();
1108 tempString = kwl.
find(prefix,
"scene_orientation");
1109 if(tempString !=
"")
1115 in >> tempValue.
string();
1120 total =
ossimString(kwl.
find(prefix,
"number_of_along_track_incidence_angle")).toUInt32();
1122 tempString = kwl.
find(prefix,
"along_track_incidence_angle");
1123 if(tempString !=
"")
1129 in >> tempValue.
string();
1134 total =
ossimString(kwl.
find(prefix,
"number_of_across_track_incidence_angle")).toUInt32();
1136 tempString = kwl.
find(prefix,
"across_track_incidence_angle");
1137 if(tempString !=
"")
1143 in >> tempValue.
string();
1158 tempString = kwl.
find(prefix,
"physical_bias");
1159 if(tempString !=
"")
1165 in >> tempValue.
string();
1171 tempString = kwl.
find(prefix,
"physical_gain");
1172 if(tempString !=
"")
1178 in >> tempValue.
string();
1184 tempString = kwl.
find(prefix,
"solar_irradiance");
1185 if(tempString !=
"")
1191 in >> tempValue.
string();
1215 in >> lat.
string() >> lon.string() >> height.string() >> code.
string();
1230 in >>
x.string() >>
y.string();
1242 in >>
x.string() >>
y.string();
1252 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1259 xpath =
"/Production/JOB_ID";
1263 xpath =
"/Product_Information/Delivery_Identification/JOB_ID";
1266 if (!readOneXmlNode(xmlDocument, xpath,
theImageID))
1276 xpath =
"/Production/DATASET_PRODUCTION_DATE";
1280 xpath =
"/Product_Information/Delivery_Identification/PRODUCTION_DATE";
1295 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1303 xpath =
"/Product_Frame/Dataset_Frame/Vertex";
1307 xpath =
"/Dataset_Content/Dataset_Extent/Vertex";
1311 xmlDocument->
findNodes(xpath, xml_nodes);
1312 if (xml_nodes.size() != 4)
1317 std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
1318 while (node != xml_nodes.end())
1323 std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
1325 (*node)->findChildNodes(xpath, sub_nodes);
1326 if (sub_nodes.size() == 0)
1331 gpt.
lat = sub_nodes[0]->getText().toDouble();
1335 (*node)->findChildNodes(xpath, sub_nodes);
1336 if (sub_nodes.size() == 0)
1341 gpt.
lon = sub_nodes[0]->getText().toDouble();
1346 (*node)->findChildNodes(xpath, sub_nodes);
1347 if (sub_nodes.size() == 0)
1352 ipt.
line = sub_nodes[0]->getText().toDouble() - 1.0;
1356 (*node)->findChildNodes(xpath, sub_nodes);
1357 if (sub_nodes.size() == 0)
1362 ipt.
samp = sub_nodes[0]->getText().toDouble() - 1.0;
1385 if (!readOneXmlNode(xmlDocument,
1389 if (!readOneXmlNode(xmlDocument,
1398 if (!readOneXmlNode(xmlDocument,
theXmlDocumentRoot +
"/Dataset_Content/Dataset_Extent/Center/LAT", nodeValue))
1400 if (!readOneXmlNode(xmlDocument,
theXmlDocumentRoot +
"/Product_Frame/Dataset_Frame/Center/LAT", nodeValue))
1414 std::vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1415 std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
1416 std::vector<ossimRefPtr<ossimXmlNode> >::iterator node;
1427 xpath =
"/Image_Interpretation/Spectral_Band_Info";
1431 xpath =
"/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Radiance";
1434 xmlDocument->
findNodes(xpath, xml_nodes);
1436 node = xml_nodes.begin();
1437 while (node != xml_nodes.end())
1441 (*node)->findChildNodes(xpath, sub_nodes);
1442 if (sub_nodes.size() == 0)
1450 if ( (bandName ==
"B0") || (bandName ==
"P") ||
1455 else if ( (bandName ==
"B1") && (
theNumBands > 1) )
1459 else if ( (bandName ==
"B2") && (
theNumBands > 2) )
1463 else if ( (bandName ==
"B3") && (
theNumBands > 3) )
1470 <<
"ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
1476 <<
"ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range\n";
1482 (*node)->findChildNodes(xpath, sub_nodes);
1483 if (sub_nodes.size() == 0)
1492 (*node)->findChildNodes(xpath, sub_nodes);
1493 if (sub_nodes.size() == 0)
1508 xpath =
"/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Solar_Irradiance";
1510 xmlDocument->
findNodes(xpath, xml_nodes);
1512 node = xml_nodes.begin();
1513 while (node != xml_nodes.end())
1517 (*node)->findChildNodes(xpath, sub_nodes);
1518 if (sub_nodes.size() == 0)
1526 if ( (bandName ==
"B0") || (bandName ==
"P") ||
1531 else if ( (bandName ==
"B1") && (
theNumBands > 1) )
1535 else if ( (bandName ==
"B2") && (
theNumBands > 2) )
1539 else if ( (bandName ==
"B3") && (
theNumBands > 3) )
1546 <<
"ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
1552 <<
"ossimPleiadesDimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range 2\n";
1558 (*node)->findChildNodes(xpath, sub_nodes);
1559 if (sub_nodes.size() == 0)
1575 static const char MODULE[] =
"ossimPleiadesDimapSupportData::parseRPCMetadata";
1577 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1586 xpath =
"/Rational_Function_Model/Resource_Reference/RESOURCE_ID";
1588 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1602 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model";
1606 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model";
1609 xmlDocument->
findNodes(xpath, xml_nodes);
1610 if (xml_nodes.empty())
1622 std::vector<ossimString> coeffs;
1625 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/F_ROW";
1627 xmlDocument->
findNodes(xpath, xml_nodes);
1628 coeffs = xml_nodes[0]->getText().split(
" ",
true);
1630 const size_t nRow = coeffs.size() / 2;
1631 for (
size_t i = 0; i < nRow; i++)
1638 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/F_COL";
1640 xmlDocument->
findNodes(xpath, xml_nodes);
1641 coeffs = xml_nodes[0]->getText().split(
" ",
true);
1643 const size_t nCol = coeffs.size() / 2;
1644 for (
size_t i = 0; i < nCol; i++)
1659 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_NUM_COEFF_";
1661 xpath = xpath + valueStr.str();
1662 xmlDocument->
findNodes(xpath, xml_nodes);
1663 if (xml_nodes.size() == 0)
1675 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_DEN_COEFF_";
1677 xpath = xpath + valueStr.str();
1678 xmlDocument->
findNodes(xpath, xml_nodes);
1679 if (xml_nodes.size() == 0)
1691 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_NUM_COEFF_";
1693 xpath = xpath + valueStr.str();
1694 xmlDocument->
findNodes(xpath, xml_nodes);
1695 if (xml_nodes.size() == 0)
1707 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_DEN_COEFF_";
1709 xpath = xpath + valueStr.str();
1710 xmlDocument->
findNodes(xpath, xml_nodes);
1711 if (xml_nodes.size() == 0)
1728 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/MODEL_PRECISION_ROW";
1732 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_ROW";
1735 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1743 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/Inverse_Model/MODEL_PRECISION_COL";
1747 xpath =
"/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_COL";
1750 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1761 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lon/A";
1765 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_SCALE";
1768 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1776 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lon/B";
1780 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_OFF";
1783 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1791 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lat/A";
1795 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_SCALE";
1798 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1806 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Lat/B";
1810 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_OFF";
1813 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1821 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Alt/A";
1825 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_SCALE";
1828 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1836 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Alt/B";
1840 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_OFF";
1843 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1851 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Col/A";
1855 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_SCALE";
1858 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1866 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Col/B";
1870 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_OFF";
1873 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1884 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Row/A";
1888 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_SCALE";
1891 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1899 xpath =
"/Geoposition/Rational_Sensor_Model/Global_RFM/RFM_Validity/Row/B";
1903 xpath =
"/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_OFF";
1906 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1922 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1930 xpath =
"/Metadata_Identification/METADATA_FORMAT";
1933 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1937 if (nodeValue !=
"DIMAP_PHR")
1945 xpath =
"/Metadata_Identification/METADATA_PROFILE";
1947 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
1953 if ( nodeValue !=
"PHR_SYSTEM_RECTIFIED_PRODUCT" )
1958 <<
"DEBUG:\n Not a PLEIADES DIMAPv1 file: METADATA_PROFILE is incorrect!" << std::endl;
1974 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
1982 xpath =
"/Metadata_Identification/METADATA_FORMAT";
1984 xmlDocument->
findNodes(xpath, xml_nodes);
1985 if (xml_nodes.size() == 0)
1997 xpath =
"/Metadata_Identification/METADATA_FORMAT";
1999 xmlDocument->
findNodes(xpath, xml_nodes);
2000 if (xml_nodes.size() == 0)
2012 xpath =
"/Metadata_Identification/METADATA_FORMAT";
2014 xmlDocument->
findNodes(xpath, xml_nodes);
2015 if (xml_nodes.size() == 0)
2029 xml_nodes[0]->getAttributeValue(value, attribute);
2036 <<
"WARNING: DIMAP metadata version is not correct!" << std::endl;
2044 xpath =
"/Metadata_Identification/METADATA_PROFILE";
2046 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2052 if ( (nodeValue !=
"PHR_SENSOR")
2053 && (nodeValue !=
"PHR_ORTHO")
2054 && (nodeValue !=
"PHR_MOSAIC") )
2059 <<
"DEBUG:\n Not a PLEIADES DIMAPv2 file: metadata profile is incorrect!" << std::endl;
2064 metadataProfile = nodeValue;
2069 xpath =
"/Metadata_Identification/METADATA_SUBPROFILE";
2071 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2076 if ((nodeValue ==
"PRODUCT"))
2078 else if ( (nodeValue ==
"RPC") && (metadataProfile ==
"PHR_SENSOR") )
2086 <<
"DEBUG:\n Not a PLEIADES DIMAPv2 file: metadata subprofile is incorrect !" << std::endl;
2115 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2123 xpath =
"/Product_Characteristics/PROCESSING_LEVEL";
2127 xpath =
"/Processing_Information/Product_Settings/PROCESSING_LEVEL";
2140 xpath =
"/Product_Characteristics/Product_Image_Characteristics/SPECTRAL_PROCESSING";
2144 xpath =
"/Processing_Information/Product_Settings/SPECTRAL_PROCESSING";
2157 static const char MODULE[] =
"ossimPleiadesDimapSupportData::parseRasterData";
2158 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2165 xpath =
"/Product_Characteristics/Product_Image_Characteristics/Data_Access/Data_File/DATA_FILE_PATH";
2167 xmlDocument->
findNodes(xpath, xml_nodes);
2169 if (xml_nodes.size() > 1)
2176 xpath =
"/Raster_Data/Data_Access/DATA_FILE_TILES";
2178 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2190 xpath =
"/Raster_Dimensions/NCOLS";
2194 xpath =
"/Raster_Data/Raster_Dimensions/NCOLS";
2197 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2205 xpath =
"/Raster_Dimensions/NROWS";
2209 xpath =
"/Raster_Data/Raster_Dimensions/NROWS";
2212 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2225 xpath =
"/Raster_Dimensions/Raster_Tiles/NTILES";
2229 xpath =
"/Raster_Data/Raster_Dimensions/Tile_Set/NTILES";
2232 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2243 xpath =
"/Raster_Dimensions/Raster_Tiles/RX_NB_OF_TILES";
2245 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2251 xpath =
"/Raster_Dimensions/Raster_Tiles/CY_NB_OF_TILES";
2253 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2262 xpath =
"/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_COUNT";
2264 xmlDocument->
findNodes(xpath, xml_nodes);
2265 if (xml_nodes.size() == 0)
2277 if (!xml_nodes[0]->getAttributeValue(value, attribute))
2279 attribute =
"ntiles_R";
2280 xml_nodes[0]->getAttributeValue(value, attribute);
2284 attribute =
"ntiles_y";
2285 if (!xml_nodes[0]->getAttributeValue(value, attribute))
2287 attribute =
"ntiles_C";
2288 xml_nodes[0]->getAttributeValue(value, attribute);
2309 xpath =
"/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_SIZE";
2311 xmlDocument->
findNodes(xpath, xml_nodes);
2312 if (xml_nodes.size() == 0)
2325 attribute =
"nrows";
2326 xml_nodes[0]->getAttributeValue(value, attribute);
2329 attribute =
"ncols";
2330 xml_nodes[0]->getAttributeValue(value, attribute);
2351 xpath =
"/Raster_Dimensions/NBANDS";
2355 xpath =
"/Raster_Data/Raster_Dimensions/NBANDS";
2358 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2375 xpath =
"/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/RED_CHANNEL";
2379 xpath =
"/Raster_Data/Raster_Display/Band_Display_Order/RED_CHANNEL";
2382 xmlDocument->
findNodes(xpath, xml_nodes);
2383 if (xml_nodes.size() == 0)
2399 xpath =
"/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/GREEN_CHANNEL";
2403 xpath =
"/Raster_Data/Raster_Display/Band_Display_Order/GREEN_CHANNEL";
2406 xmlDocument->
findNodes(xpath, xml_nodes);
2407 if (xml_nodes.size() == 0)
2421 xpath =
"/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/BLUE_CHANNEL";
2425 xpath =
"/Raster_Data/Raster_Display/Band_Display_Order/BLUE_CHANNEL";
2428 xmlDocument->
findNodes(xpath, xml_nodes);
2429 if (xml_nodes.size() == 0)
2445 xpath =
"/Product_Characteristics/Product_Image_Characteristics/Image_Display_Order/ALPHA_CHANNEL";
2449 xpath =
"/Raster_Data/Raster_Display/Band_Display_Order/ALPHA_CHANNEL";
2452 xmlDocument->
findNodes(xpath, xml_nodes);
2453 if (xml_nodes.size() == 0)
2473 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2478 xpath =
"/Data_Strip/Geometric_Header_List/Located_Geometric_Header";
2482 xpath =
"/Geometric_Data/Use_Area/Located_Geometric_Values";
2485 xmlDocument->
findNodes(xpath, xml_nodes);
2486 if (xml_nodes.size() != 3 )
2496 std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
2497 while (node != xml_nodes.end())
2499 std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
2504 xpath =
"Solar_Incidences/SUN_AZIMUTH";
2505 (*node)->findChildNodes(xpath, sub_nodes);
2506 if (sub_nodes.size() == 0)
2515 theSunAzimuth.push_back(sub_nodes[0]->getText().toDouble());
2521 xpath =
"Solar_Incidences/SUN_ELEVATION";
2522 (*node)->findChildNodes(xpath, sub_nodes);
2523 if (sub_nodes.size() == 0)
2541 xpath =
"Incidences/GLOBAL_INCIDENCE";
2545 xpath =
"Acquisition_Angles/INCIDENCE_ANGLE";
2547 (*node)->findChildNodes(xpath, sub_nodes);
2548 if (sub_nodes.size() == 0)
2565 xpath =
"Pointing_Angles/PSI_XY";
2569 xpath =
"Acquisition_Angles/VIEWING_ANGLE";
2571 (*node)->findChildNodes(xpath, sub_nodes);
2572 if (sub_nodes.size() == 0)
2589 xpath =
"ORIENTATION";
2593 xpath =
"Acquisition_Angles/AZIMUTH_ANGLE";
2595 (*node)->findChildNodes(xpath, sub_nodes);
2596 if (sub_nodes.size() == 0)
2613 xpath =
"Incidences/ALONG_TRACK_INCIDENCE";
2617 xpath =
"Acquisition_Angles/INCIDENCE_ANGLE_ALONG_TRACK";
2619 (*node)->findChildNodes(xpath, sub_nodes);
2620 if (sub_nodes.size() == 0)
2637 xpath =
"Incidences/ORTHO_TRACK_INCIDENCE";
2641 xpath =
"Acquisition_Angles/INCIDENCE_ANGLE_ACROSS_TRACK";
2643 (*node)->findChildNodes(xpath, sub_nodes);
2644 if (sub_nodes.size() == 0)
2666 xpath =
"/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/START";
2670 xpath =
"/Geometric_Data/Refined_Model/Time/Time_Range/START";
2683 xpath =
"/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/END";
2687 xpath =
"/Geometric_Data/Refined_Model/Time/Time_Range/END";
2700 xpath =
"/Geometric_Data/Sensor_Model_Characteristics/SENSOR_LINE_PERIOD";
2704 xpath =
"/Geometric_Data/Refined_Model/Time/Time_Stamp/LINE_PERIOD";
2707 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2718 xpath =
"/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/FIRST_COL";
2722 xpath =
"/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/FIRST_COL";
2725 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2736 xpath =
"/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/LAST_COL";
2740 xpath =
"/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/LAST_COL";
2743 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2762 vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
2770 xpath =
"/Data_Strip/Data_Strip_Identification/PLATFORM_NAME";
2774 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/MISSION";
2777 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2782 if (nodeValue !=
"PHR")
2798 xpath =
"/Data_Strip/Data_Strip_Identification/PLATFORM_SERIAL_NUMBER";
2802 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/MISSION_INDEX";
2805 if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
2810 if (nodeValue ==
"1A")
2812 else if (nodeValue ==
"1B")
2829 xpath =
"/Data_Strip/Data_Strip_Identification/PLATFORM_NAME";
2833 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT";
2846 xpath =
"/Data_Strip/Data_Strip_Identification/PLATFORM_SERIAL_NUMBER";
2850 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT_INDEX";
2863 xpath =
"/Data_Strip/UTC_Acquisition_Range/START";
2879 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_DATE";
2881 if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingDate))
2890 xpath =
"/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_TIME";
2892 if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingTime))
virtual const ossimDatum * create(const ossimString &code) const
create method
void clear()
Erases the entire container.
ossimString theInstrumentIndex
std::vector< ossim_float64 > thePhysicalBias
Calibration information for radiometric corrections.
virtual bool setValue(const ossimString &value)
std::vector< ossim_float64 > theSunAzimuth
ossimString getImageID() const
std::vector< ossim_float64 > theIncidenceAngle
std::vector< ossim_float64 > theSunElevation
void getUrCorner(ossimGpt &pt) const
std::vector< ossim_float64 > theViewingAngle
ossimString getProcessingLevel() const
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
std::basic_stringstream< char > stringstream
Class for char mixed input and output memory streams.
static const char * IMAGE_DATE_KW
ossimString theTimeRangeEnd
double lond() const
Will convert the radian measure to degrees.
std::vector< double > theSampDenCoeff
std::vector< ossimString > theBandOrder
Represents serializable keyword/value map.
std::basic_ifstream< char > ifstream
Class for char input file streams.
const char * find(const char *key) const
ossim_int64 fileSize() const
bool contains(char aChar) const
ossimString theProcessingLevelString
virtual const ossimString & code() const
static ossimString toString(bool aValue)
Numeric to string methods.
bool parseXmlFile(const ossimFilename &file)
ossimDpt theRefImagePoint
Zero based center of frame.
bool parseQualityAssessment(ossimRefPtr< ossimXmlDocument > xmlDocument)
QualityAssessment:
ossim_float64 hgt
Height in meters above the ellipsiod.
ossim_uint32 toUInt32() const
ossim_int32 theSwathFirstCol
void getUlCorner(ossimGpt &pt) const
double latd() const
Will convert the radian measure to degrees.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of the object from a keyword list.
void getRefImagePoint(ossimDpt &rp) const
zero base center point
bool parseRadiometricData(ossimRefPtr< ossimXmlDocument > xmlDocument)
static const char * TYPE_KW
std::vector< double > theLineNumCoeff
ossimString getInstrumentIndex() const
ossim_uint32 theNumberOfMegaTilesInRow
ossimGpt createGround(const ossimString &s) const
const ossimDatum * datum() const
datum().
void getLrCorner(ossimGpt &pt) const
bool parseProductInformation(ossimRefPtr< ossimXmlDocument > xmlDocument)
Product Information:
ossim_int32 toInt32() const
ossimIpt createIpt(const ossimString &s) const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimDpt createDpt(const ossimString &s) const
ossimPleiadesDimapSupportData()
void getViewingAngle(std::vector< ossim_float64 > &va) const
ossimBooleanProperty theMultiDataFile
virtual void clearErrorStatus() const
ossim_int32 theSwathLastCol
ossimString theTimeRangeStart
unsigned int ossim_uint32
bool parseMetadataIdentificationDIMAPv1(ossimRefPtr< ossimXmlDocument > xmlDocument)
ossim_uint32 theNumberOfMegaTilesInCol
static ossimDatumFactory * instance()
std::vector< ossim_float64 > theAzimuthAngle
static const char * NUMBER_BANDS_KW
std::vector< ossim_float64 > theSolarIrradiance
bool parseDatasetIdentification(ossimRefPtr< ossimXmlDocument > xmlDocument)
Dataset Identification:
bool parseRPCMetadata(ossimRefPtr< ossimXmlDocument > xmlDocument)
static const char * AZIMUTH_ANGLE_KW
void getAlongTrackIncidenceAngle(std::vector< ossim_float64 > &alt) const
ossimString theSpectralProcessingString
void getImageRect(ossimDrect &rect) const
Zero based image rectangle, sub image if there is one.
bool setBooleanValue(bool value, ossimString &msg)
void printInfo(ostream &os) const
std::vector< ossim_float64 > theAcrossTrackIncidenceAngle
bool parseRasterData(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseDatasetContent(ossimRefPtr< ossimXmlDocument > xmlDocument)
Dataset Content:
ossimPleiadesDIMAPVersion theDIMAPVersion
std::vector< double > theSampNumCoeff
ossim_float64 theLinePeriod
virtual ossimErrorCode getErrorStatus() const
virtual ~ossimPleiadesDimapSupportData()
ossimPleiadesMetadataSubProfile theMetadataSubProfile
void getImageSize(ossimIpt &sz) const
bool parseCoordinateReferenceSystem(ossimRefPtr< ossimXmlDocument > xmlDocument)
Coordinate Reference System:
ossimString theProductionDate
virtual void setErrorStatus() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of the object to a keyword list.
ossimString getAcquisitionDate() const
ossimString getInstrument() const
ossim_uint32 theNumberOfMegaTiles
std::vector< ossim_float64 > thePhysicalGain
void getRefGroundPoint(ossimGpt &gp) const
Center of frame, sub image if there is one.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossimGpt theRefGroundPoint
Center of frame on ground, if sub image it's the center of that.
ossimString theXmlDocumentRoot
bool parseGeometricData(ossimRefPtr< ossimXmlDocument > xmlDocument)
ossimString getProductionDate() const
bool read(std::istream &in)
void getSunElevation(std::vector< ossim_float64 > &el) const
ossimString getSensorID() const
void findNodes(const ossimString &xpath, std::vector< ossimRefPtr< ossimXmlNode > > &nodelist) const
Appends any matching nodes to the list supplied (should be empty):
std::basic_istringstream< char > istringstream
Class for char input memory streams.
static const char * ELEVATION_ANGLE_KW
std::vector< ossim_float64 > theAlongTrackIncidenceAngle
bool parseDatasetSources(ossimRefPtr< ossimXmlDocument > xmlDocument)
ossimString theInstrument
void getLlCorner(ossimGpt &pt) const
std::vector< double > theLineDenCoeff
ossim_uint32 getNumberOfBands() const
void getAcrossTrackIncidenceAngle(std::vector< ossim_float64 > &act) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
bool parseMetadataIdentificationDIMAPv2(ossimRefPtr< ossimXmlDocument > xmlDocument)
bool parseProcessingInformation(ossimRefPtr< ossimXmlDocument > xmlDocument)
Processing Information:
void getSunAzimuth(std::vector< ossim_float64 > &az) const
void getIncidenceAngle(std::vector< ossim_float64 > &ia) const
bool parseGeoposition(ossimRefPtr< ossimXmlDocument > xmlDocument)
Geoposition:
const std::string & string() const
ossimString theAcquisitionDate