Unverified Commit 31ee0d75 authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Update label generated by tgocassisrdrgen from additional feedback (#3137)

* Add 32-bit ISIS Special Pixel Constants to ProcessExportPds4

* Add ability to set title and version id in exported PDS4 produce in tgocassisrdrgen and ProcessExportPds4 API

* Fix bug that occurs when exporting mosaics with Archive groups and fixed min/max lat/lon to east/west bounding box positive east flip bug

* Added docs.

* Update schema to most recent versions and comment-out schema that isn't used (temporarily) in tgocassisrdrgen.

* Added reorder function to ProcessExportPds4 to reorder xml files generated in the wrong order for PDS4 and added cassis-specific schema

* Add StopTime to tgocassismos's Mosaic PVL group, as it is required for PDS4 export. Also, fix time formatting and east_azimuth units

* Remove comment
parent 963d7888
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ namespace Isis {
      QDomElement obsAreaNode = m_domDoc->documentElement().firstChildElement("Observation_Area");
      if ( !obsAreaNode.isNull() ) {

        // fix start/stop times, if needed
        // fix times
        QDomElement timeNode = obsAreaNode.firstChildElement("Time_Coordinates");
        if (!timeNode.isNull()) {
          QDomElement startTime = timeNode.firstChildElement("start_date_time");
@@ -316,7 +316,38 @@ namespace Isis {
            QString timeValue = stopTime.text();
            PvlToXmlTranslationManager::resetElementValue(stopTime, timeValue + "Z");
          }

          QStringList xmlPath;
          xmlPath << "Product_Observational"
            << "Observation_Area"
            << "Discipline_Area"
            << "geom:Geometry"
            << "geom:Geometry_Orbiter"
            << "geom:geometry_reference_time_utc";

          QDomElement baseElement = m_domDoc->documentElement();
          QDomElement geomRefTime = getElement(xmlPath, baseElement);
          if (geomRefTime.text() == "") {
            geomRefTime.setAttribute("xsi:nil", "true");
          }
          else {
            QString timeValue = geomRefTime.text();
            PvlToXmlTranslationManager::resetElementValue(geomRefTime, timeValue + "Z");
          }
        xmlPath.clear();
          xmlPath << "Product_Observational"
            << "Observation_Area"
            << "Discipline_Area"
            << "geom:Geometry"
            << "geom:Image_Display_Geometry"
            << "geom:Object_Orientation_North_East"
            << "geom:east_azimuth";
          QDomElement eastAzimuth = getElement(xmlPath, baseElement);
          if (eastAzimuth.text() != "") {
            PvlToXmlTranslationManager::resetElementValue(eastAzimuth, eastAzimuth.text(), "deg");
          }
        }

        QDomElement investigationAreaNode = obsAreaNode.firstChildElement("Investigation_Area");
        obsAreaNode.insertAfter(investigationAreaNode, obsAreaNode.firstChildElement("Time_Coordinates"));

+18 −5
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#include "ProgramLauncher.h"
#include "TProjection.h"
#include "UserInterface.h"

#include "iTime.h"

using namespace std;
using namespace Isis;
@@ -170,6 +170,8 @@ void IsisMain() {
    QString instrumentId;
    QString spacecraftName;
    QString observationId;
    QString stopTime;
    QString exposureDuration;

    for (int i = 0; i < (int)cubeList.size(); i++) {
      // himos used original label here.
@@ -184,16 +186,26 @@ void IsisMain() {
        observationId =  archiveGroup["ObservationId"][0];
        startTime =      instGroup["StartTime"][0];
        startClock =     instGroup["SpacecraftClockStartCount"][0];
        stopTime   =     instGroup["StartTime"][0]; 
        exposureDuration  = instGroup["ExposureDuration"][0]; 
      }
      else {
        QString testStartTime = instGroup["StartTime"][0];
        if (testStartTime < startTime) {
          startTime = testStartTime;
        iTime testStartTime = iTime(instGroup["StartTime"][0]);
        iTime testStopTime = iTime(instGroup["StartTime"][0]);
        if (testStartTime < iTime(startTime)) {
          startTime = testStartTime.UTC();
          startClock = instGroup["SpacecraftClockStartCount"][0];
        }
        if (testStopTime > iTime(stopTime)) {
          stopTime = testStopTime.UTC();
        }
      }
    }

   iTime stopTimeValue = iTime(stopTime);
   stopTimeValue = stopTimeValue + exposureDuration.toDouble(); 
   stopTime = stopTimeValue.UTC(); 

   // Get the blob of original labels from first image in list
   // Pvl *org = cubeList[0]->label();

@@ -230,6 +242,7 @@ void IsisMain() {
    mos += PvlKeyword("InstrumentId", instrumentId);
    mos += PvlKeyword("ObservationId ", observationId);
    mos += PvlKeyword("StartTime ", startTime);
    mos += PvlKeyword("StopTime ", stopTime);
    mos += PvlKeyword("SpacecraftClockStartCount ", startClock);
    mos += PvlKeyword("IncidenceAngle ", toString(incidenceAngle), "degrees");
    mos += PvlKeyword("EmissionAngle ", toString(emissionAngle), "degrees");
+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@
      Added the "tracking=true" parameter to tgocassismos' call to automos resulting in automatic
      tracking cube creation. 
    </change>
    <change name="Kristin Berry" date="2019-03-01">
      Added the StopTime keyword to the output Mosaic PVL group, as stop_date_time is required for 
      PDS4 export. 
    </change>
  </history>

  <groups>