From b92ad99908536d81afd121ef290eee584df1f2a1 Mon Sep 17 00:00:00 2001 From: Austin Sanders Date: Fri, 20 Nov 2020 13:17:32 -0700 Subject: [PATCH 1/2] Initial hidtmgen conversion + gtests --- isis/src/mro/apps/hidtmgen/hidtmgen.cpp | 826 ++++++++++++++++++ isis/src/mro/apps/hidtmgen/hidtmgen.h | 11 + isis/src/mro/apps/hidtmgen/main.cpp | 824 +---------------- isis/src/mro/apps/hidtmgen/tsts/Makefile | 4 - .../src/mro/apps/hidtmgen/tsts/color/Makefile | 62 -- .../mro/apps/hidtmgen/tsts/dtmOnly/Makefile | 30 - isis/src/mro/apps/hidtmgen/tsts/equi/Makefile | 62 -- .../mro/apps/hidtmgen/tsts/errors/Makefile | 198 ----- .../hidtmgen/tsts/nonDefaultNames/Makefile | 69 -- .../mro/apps/hidtmgen/tsts/orthoOnly/Makefile | 57 -- .../apps/hidtmgen/tsts/outputTypes/Makefile | 133 --- .../src/mro/apps/hidtmgen/tsts/polar/Makefile | 61 -- .../data/hidtmgen/color/orthoInputList.txt | 2 + isis/tests/data/hidtmgen/color/params.pvl | 12 + .../data/hidtmgen/color/sequenceNumbers.txt | 2 + ...arth_Crater_3557E_126N_ngate_03_lowres.cub | Bin 0 -> 70813 bytes ..._3557E_126N_ngate_03_lowres_sinusoidal.cub | Bin 0 -> 72174 bytes .../data/hidtmgen/dtm/DTM_2Bands_cropped.cub | Bin 0 -> 76214 bytes .../dtm/DTM_Zumba_1m_forPDS_lowres.cub | Bin 0 -> 71659 bytes ...rater_1_1m_ngate_edited2_forPDS_lowres.cub | Bin 0 -> 71435 bytes isis/tests/data/hidtmgen/dtmOnly/params.pvl | 12 + .../data/hidtmgen/equi/orthoInputList.txt | 2 + isis/tests/data/hidtmgen/equi/params.pvl | 11 + .../data/hidtmgen/equi/sequenceNumbers.txt | 2 + .../hidtmgen/error/invalidProducingInst.pvl | 12 + .../data/hidtmgen/error/invalidVersionId.pvl | 14 + .../hidtmgen/error/orthoInputList2Bands.txt | 1 + .../hidtmgen/error/orthoInputList2Item.txt | 2 + .../hidtmgen/error/orthoInputListEmpty.txt | 0 .../data/hidtmgen/error/orthoOutputFiles.lis | 2 + .../hidtmgen/error/orthoProdList3Item.txt | 3 + .../data/hidtmgen/error/orthoToList1Item.txt | 1 + isis/tests/data/hidtmgen/error/params.pvl | 12 + .../hidtmgen/error/sequenceNumbers1item.txt | 1 + .../hidtmgen/error/sequenceNumbers2item.txt | 2 + .../nonDefaultNames/orthoInputList.txt | 2 + .../nonDefaultNames/orthoOutputFiles.lis | 2 + .../nonDefaultNames/orthoOutputProductIds.lis | 2 + .../data/hidtmgen/nonDefaultNames/params.pvl | 11 + isis/tests/data/hidtmgen/ortho/2BandImage.cub | Bin 0 -> 75593 bytes ..._042252_1930_3-BAND_COLOR_2m_o_cropped.cub | Bin 0 -> 76610 bytes ...42252_1930_3-BAND_COLOR_50cm_o_cropped.cub | Bin 0 -> 76645 bytes .../PSP_002118_1510_1m_o_forPDS_cropped.cub | Bin 0 -> 73731 bytes .../PSP_002118_1510_25cm_o_forPDS_cropped.cub | Bin 0 -> 73770 bytes ...2635_RED_NLstretch_1m_o_forPDS_cropped.cub | Bin 0 -> 73337 bytes ...35_RED_NLstretch_25cm_o_forPDS_cropped.cub | Bin 0 -> 73373 bytes .../hidtmgen/orthoOnly/orthoInputList.txt | 2 + isis/tests/data/hidtmgen/orthoOnly/params.pvl | 14 + .../hidtmgen/orthoOnly/sequenceNumbers.txt | 2 + .../hidtmgen/outputTypes/orthoInputList.txt | 2 + .../data/hidtmgen/outputTypes/params.pvl | 12 + .../data/hidtmgen/outputTypes/params2.pvl | 12 + .../hidtmgen/outputTypes/sequenceNumbers.txt | 2 + .../data/hidtmgen/polar/orthoInputList.txt | 2 + .../polar/orthosequencenumberlist.txt | 2 + isis/tests/data/hidtmgen/polar/params.pvl | 11 + isis/tests/data/hidtmgen/print.prt | 89 ++ 57 files changed, 1102 insertions(+), 1495 deletions(-) create mode 100644 isis/src/mro/apps/hidtmgen/hidtmgen.cpp create mode 100644 isis/src/mro/apps/hidtmgen/hidtmgen.h delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/color/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/dtmOnly/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/equi/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/errors/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/nonDefaultNames/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/orthoOnly/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/outputTypes/Makefile delete mode 100644 isis/src/mro/apps/hidtmgen/tsts/polar/Makefile create mode 100644 isis/tests/data/hidtmgen/color/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/color/params.pvl create mode 100644 isis/tests/data/hidtmgen/color/sequenceNumbers.txt create mode 100644 isis/tests/data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub create mode 100644 isis/tests/data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres_sinusoidal.cub create mode 100644 isis/tests/data/hidtmgen/dtm/DTM_2Bands_cropped.cub create mode 100644 isis/tests/data/hidtmgen/dtm/DTM_Zumba_1m_forPDS_lowres.cub create mode 100644 isis/tests/data/hidtmgen/dtm/Polar_Crater_1_1m_ngate_edited2_forPDS_lowres.cub create mode 100644 isis/tests/data/hidtmgen/dtmOnly/params.pvl create mode 100644 isis/tests/data/hidtmgen/equi/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/equi/params.pvl create mode 100644 isis/tests/data/hidtmgen/equi/sequenceNumbers.txt create mode 100644 isis/tests/data/hidtmgen/error/invalidProducingInst.pvl create mode 100644 isis/tests/data/hidtmgen/error/invalidVersionId.pvl create mode 100644 isis/tests/data/hidtmgen/error/orthoInputList2Bands.txt create mode 100644 isis/tests/data/hidtmgen/error/orthoInputList2Item.txt create mode 100644 isis/tests/data/hidtmgen/error/orthoInputListEmpty.txt create mode 100644 isis/tests/data/hidtmgen/error/orthoOutputFiles.lis create mode 100644 isis/tests/data/hidtmgen/error/orthoProdList3Item.txt create mode 100644 isis/tests/data/hidtmgen/error/orthoToList1Item.txt create mode 100644 isis/tests/data/hidtmgen/error/params.pvl create mode 100644 isis/tests/data/hidtmgen/error/sequenceNumbers1item.txt create mode 100644 isis/tests/data/hidtmgen/error/sequenceNumbers2item.txt create mode 100644 isis/tests/data/hidtmgen/nonDefaultNames/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputFiles.lis create mode 100644 isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputProductIds.lis create mode 100644 isis/tests/data/hidtmgen/nonDefaultNames/params.pvl create mode 100644 isis/tests/data/hidtmgen/ortho/2BandImage.cub create mode 100644 isis/tests/data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub create mode 100644 isis/tests/data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_50cm_o_cropped.cub create mode 100644 isis/tests/data/hidtmgen/ortho/PSP_002118_1510_1m_o_forPDS_cropped.cub create mode 100644 isis/tests/data/hidtmgen/ortho/PSP_002118_1510_25cm_o_forPDS_cropped.cub create mode 100644 isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_1m_o_forPDS_cropped.cub create mode 100644 isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_25cm_o_forPDS_cropped.cub create mode 100644 isis/tests/data/hidtmgen/orthoOnly/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/orthoOnly/params.pvl create mode 100644 isis/tests/data/hidtmgen/orthoOnly/sequenceNumbers.txt create mode 100644 isis/tests/data/hidtmgen/outputTypes/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/outputTypes/params.pvl create mode 100644 isis/tests/data/hidtmgen/outputTypes/params2.pvl create mode 100644 isis/tests/data/hidtmgen/outputTypes/sequenceNumbers.txt create mode 100644 isis/tests/data/hidtmgen/polar/orthoInputList.txt create mode 100644 isis/tests/data/hidtmgen/polar/orthosequencenumberlist.txt create mode 100644 isis/tests/data/hidtmgen/polar/params.pvl create mode 100644 isis/tests/data/hidtmgen/print.prt diff --git a/isis/src/mro/apps/hidtmgen/hidtmgen.cpp b/isis/src/mro/apps/hidtmgen/hidtmgen.cpp new file mode 100644 index 0000000000..5a8d145cb5 --- /dev/null +++ b/isis/src/mro/apps/hidtmgen/hidtmgen.cpp @@ -0,0 +1,826 @@ +#include +#include +#include + +#include "hidtmgen.h" +#include "Cube.h" +#include "CubeAttribute.h" +#include "FileName.h" +#include "FileList.h" +#include "IString.h" +#include "ProcessExportPds.h" +#include "TProjection.h" +#include "ProjectionFactory.h" +#include "Pvl.h" +#include "PvlFormatPds.h" +#include "PvlKeyword.h" +#include "PvlObject.h" +#include "SpecialPixel.h" +#include "Statistics.h" +#include "UserInterface.h" + +using namespace std; + + +namespace Isis{ + /** + * Indicates the type of file currently being processed for export to PDS. + */ + enum FileType { DTM, /**< The output file for the current process is a DTM.*/ + Orthorectified /**< The output file for the current process is an Ortho.*/ + }; + + + /** + * This enumeration is used to determine how to set the special pixel types + * selected by the user. + * + * If the output data is non-negative, then Both is set. This means that Null, + * Lrs, and Lis (if selected) will be given the values of the lower boundary + * (i.e. beginning at 0) and that His and Hrs (if selected) will be given the + * values of the upper boundary (i.e. for 8bit, values near 255 and for 16bit, + * values near 65535). + * + * If the output data is signed integer data, then Negative is set. This means + * that all special pixels (if selected) will be given values of the lower + * boundary (i.e. beginning -32768). + * + * If the output data is real-valued, then Default is set. This means that the + * special pixels defined in Isis::SpecialPixel will be used. + * + */ + enum SpecialPixelBoundary { Both, /**< Both the upper and lower boundaries may be used to save + off special pixel values. This option is used for + unsigned bit integer valued output data types + (i.e. 8bit and unsigned 16bit)*/ + Negative, /**< Only the lower (negative) boundary may be used to save + off special pixel values. This option is used for signed + 16 bit integer valued output data.*/ + Default /**< This option is used for real valued output data types + (i.e. 32bit). In this case pre-defined + Isis::SpecialPixel values are dedicated to the selected + pixel types.*/ + }; + + + // -------------------------Function Prototypes ------------------------------------ + // cube processing + void setUpProcessPixels(const UserInterface &ui, + ProcessExportPds &pdsExportProcess, + FileType fileType); + void setRangeAndPixels(const UserInterface &ui, + ProcessExportPds &pdsExportProcess, + double &min, + double &max, + SpecialPixelBoundary ptype); + void processCube(ProcessExportPds &pdsExportProcess, + const FileName &outputPdsFile); + // projection information and viewing parameters + void setProjectionInformation(Cube *inCube, + Pvl &pdsLabel, + PvlObject &mappingObject, + const QString &projectionType); + void setEquirectangularRadii(Cube *inCube, + PvlObject &mappingObject); + double polarStereoGraphicNorthAzimuth(const PvlObject &mappingObject); + // find codes needed for product id + char mapScaleCode(double scale); + QString dtmSourceOrbitAndTargetCodes(const PvlKeyword &sourceKeyword); + QString versionNumber(const Pvl ¶msPvl, + const UserInterface &ui); + QString producingInstitution(const Pvl ¶msPvl, + const UserInterface &ui); + QString orthoContentColorCode(const FileName &orthoFileName); + // find/set values needed for output labels + void setIdentificationInformation(Pvl &pdsLabel, + const QString &productId, + PvlKeyword sourceProductId, + const Pvl ¶msPvl, + const UserInterface &ui); + // dtm specific calls + void verifyDTM(Cube *inCube, + const FileName &inputCubeFile); + void customizeDtmLabels(Cube *inCube, + Pvl &dtmPdsLabel, + PvlObject &mappingObject); + // ------------------------- end Function Prototypes --------------------------------- + + + // Main + void hidtmgen(UserInterface &ui) { + try { + // -------------------------------------------------------------------------// + // Get required global ui... + // -------------------------------------------------------------------------// + Pvl paramsPvl(ui.GetFileName("PARAMSPVL")); + bool defaultNames = ui.GetBoolean("DEFAULTNAMES"); + + // parameters: + // * DTM (not required) if entered, set as input cube in process + // * ORTHOFROMLIST (not required) if entered, set as input cubes in process + // + // * DEFAULTNAMES (required) if true, generates output file names and product ids + // * OUTPUTDIR (not required) only used (still not required) if defaultnames=true + // * DTMTO (not required) required when defaultnames=false and dtm was given. + // * ORTHOTOLIST (not required) required when DEFAULTNAMES=false and ORTHOFROMLIST was given. + // if entered, size must match ORTHOFROMLIST + // + // * PARAMSPVL (required) + // * DTM_PRODUCT_ID (not required) required if DTM given and DEFAULTNAMES=false + // * ORTHOPRODUCTIDLIST (not required) required if DTM given and DEFAULTNAMES=false + // if entered, size must match ORTHOFROMLIST + // * ORTHOSEQUENCENUMBERLIST (not required) required if DTM given and DEFAULTNAMES=false + // if entered, size must match ORTHOFROMLIST + // + // * ENDIAN (required) + // + // * DTMBITTYPE required if DTM + // * ORTHOBITTYPE required if ORTHOFROMLIST + // * NULL (not required) + // * LRS (not required) + // * LIS (not required) + // * HIS (not required) + // * HRS (not required) + + + // -------------------------------------------------------------------------// + // Set up Process... + // -------------------------------------------------------------------------// + ProcessExportPds pdsExportProcess; + // Set ExportType and Endian for all output + pdsExportProcess.SetExportType(ProcessExportPds::Fixed); + if (ui.GetString("ENDIAN") == "MSB") { + pdsExportProcess.SetOutputEndian(Isis::Msb); + } + else if (ui.GetString("ENDIAN") == "LSB") { + pdsExportProcess.SetOutputEndian(Isis::Lsb); + } + // -------------------------------------------------------------------------// + // -------------------------------------------------------------------------// + + // The output directory will be used for DTM and ortho images when defaultNames=true + // this directory won't be used if defaultNames=false but will be used for + // both DTM and ortho if defaultNames=true. + FileName outFile; + QString outDirString; + FileName outDir = FileName(ui.GetString("OUTPUTDIR")); + if (!outDir.fileExists()) { + outDir.dir().mkpath("."); + } + outDirString = outDir.expanded(); + if (outDirString.mid(outDirString.size()-1, 1) != "/") { + outDirString += "/"; + outDir = FileName(outDirString); + } + outDirString = outDir.expanded(); + + // if DTM provided, PRODUCT_ID will also be used for ortho SOURCE_PRODUCT_IDs + QString dtmProductId = ""; + if (ui.WasEntered("DTM")) { + setUpProcessPixels(ui, pdsExportProcess, DTM); + // set the input cube to process + CubeAttributeInput inAttribute; + Cube *inCube = pdsExportProcess.SetInputCube(ui.GetFileName("DTM"), inAttribute); + verifyDTM(inCube, ui.GetFileName("DTM")); + + // These are our output labels, will be modifying heavily + Pvl &pdsLabel = pdsExportProcess.StandardPdsLabel(ProcessExportPds::Image); + PvlObject &mappingObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); + QString projectionType = mappingObject["MAP_PROJECTION_TYPE"][0]; + setProjectionInformation(inCube, pdsLabel, mappingObject, projectionType); + customizeDtmLabels(inCube, pdsLabel, mappingObject); + + // if the DTM was given, use the SOURCE_PRODUCT_ID supplied by the user. + PvlKeyword source = paramsPvl.findKeyword("DTM_SOURCE_PRODUCT_ID", PvlObject::Traverse); + source.setName("SOURCE_PRODUCT_ID"); + + if (defaultNames) { + dtmProductId = "DT"; + dtmProductId += "E";// for now this is hard-coded to E for elevations (see xml doc) + dtmProductId += projectionType[0].toUpper(); + dtmProductId += mapScaleCode(mappingObject.findKeyword("MAP_SCALE")); + dtmProductId += "_"; + dtmProductId += dtmSourceOrbitAndTargetCodes(source); + // Get the 1-character producing institution code from the PARAMSPVL and add it + dtmProductId += producingInstitution(paramsPvl, ui); + // Get the 2-character version number from the PARAMSPVL and add it + dtmProductId += versionNumber(paramsPvl, ui); + + outFile = FileName(outDirString + dtmProductId + ".IMG"); + } + else { + dtmProductId = ui.GetString("DTM_PRODUCT_ID"); + outFile = FileName(ui.GetFileName("DTMTO")); + } // End scope of defaultNames true + + // identification labels that are pretty set in stone + setIdentificationInformation(pdsLabel, dtmProductId, source, paramsPvl, ui); + processCube(pdsExportProcess, outFile); + if (!outFile.fileExists()) { + throw IException(IException::Unknown, + QString("DTM file [%1] failed to be created.").arg(outFile.expanded()), + _FILEINFO_); + } + } // end if DTM was entered + else if (!ui.WasEntered("ORTHOFROMLIST")) { + throw IException(IException::User, + "User must supply DTM or ORTHOFROMLIST or both.", + _FILEINFO_); + } + + /* + * End of DTM work. Labels are complete, names complete, it's written out. + */ + + + // Now we take care of ortho images, if given. + // Get the list of ortho input cubes + if (ui.WasEntered("ORTHOFROMLIST")) { + + FileList orthoFromList; + orthoFromList.read(FileName(ui.GetFileName("ORTHOFROMLIST"))); + if(orthoFromList.size() == 0) { + throw IException(IException::User, "Input ortho list is empty.", _FILEINFO_); + } + + // check corresponding input lists for matching sizes... + FileList orthoToList, orthoProductIdList, orthoSequenceNumberList; + if (defaultNames) { + // if creating default output file names and product ids then we need to get the list of + // ortho sequence numbers + orthoSequenceNumberList.read(FileName(ui.GetFileName("ORTHOSEQUENCENUMBERLIST"))); + if(orthoFromList.size() != orthoSequenceNumberList.size()) { + throw IException(IException::User, "Output sequence number list must " + "correspond to the input ortho list.", _FILEINFO_); + } + } + else { + // if not creating default names, get the lists of ortho output cube names and product ids + orthoToList.read(FileName(ui.GetFileName("ORTHOTOLIST"))); + orthoProductIdList.read(FileName(ui.GetFileName("ORTHOPRODUCTIDLIST"))); + if(orthoFromList.size() != orthoToList.size() + || orthoFromList.size() != orthoProductIdList.size()) { + throw IException(IException::User, + "Output ortho list and product id list must " + "correspond to the input ortho list.", + _FILEINFO_); + } + } + + ProcessExportPds orthoExportProcess; + // Set ExportType and Endian for all output + orthoExportProcess.SetExportType(ProcessExportPds::Fixed); + if (ui.GetString("ENDIAN") == "MSB") { + orthoExportProcess.SetOutputEndian(Isis::Msb); + } + else if (ui.GetString("ENDIAN") == "LSB") { + orthoExportProcess.SetOutputEndian(Isis::Lsb); + } + + setUpProcessPixels(ui, orthoExportProcess, Orthorectified); + + // Loop through all ortho images + for (int i = 0; i < orthoFromList.size(); i++) { + + // set the input cube to process + CubeAttributeInput att(orthoFromList[i]); + Cube *inCube = orthoExportProcess.SetInputCube(orthoFromList[i].expanded(), att); + + // get the cube label and set identification info + Pvl &pdsLabel = orthoExportProcess.StandardPdsLabel(ProcessExportPds::Image); + + // set map projection information + PvlObject &mappingObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); + QString projectionType = mappingObject["MAP_PROJECTION_TYPE"][0]; + setProjectionInformation(inCube, pdsLabel, mappingObject, projectionType); + + QString productId = ""; + QString orthoId = ""; + if (defaultNames) { + orthoId = orthoFromList[i].baseName().left(15); + productId = orthoId; + productId += "_"; + productId += orthoContentColorCode(orthoFromList[i]); + productId += "_"; + productId += mapScaleCode(mappingObject.findKeyword("MAP_SCALE")); + productId += "_"; + productId += orthoSequenceNumberList[i].expanded(); + productId += "_"; + productId += "ORTHO"; + + // output file path is the same as the dtm + outFile = FileName(outDirString + productId + ".IMG"); + } + else { + productId = orthoProductIdList[i].expanded(); + outFile = orthoToList[i]; + orthoId = productId; + } + + // for ortho images, source product ID is the DTM product ID followed by the + // ORTHO product ID + PvlKeyword source("SOURCE_PRODUCT_ID"); + if (dtmProductId.isEmpty()) { + source += paramsPvl["ORTHO_SOURCE_DTM_ID"]; + } + else { + source += dtmProductId; + } + source += orthoId; + setIdentificationInformation(pdsLabel, productId, source, paramsPvl, ui); + + processCube(orthoExportProcess, outFile); + if (!outFile.fileExists()) { + throw IException(IException::Unknown, + QString("DTM file [%1] failed to be created.").arg(outFile.expanded()), + _FILEINFO_); + } + + } // End scope of for loop for ortho images + } + } + catch (IException &e) { + throw IException(e, IException::Unknown, "hidtmgen: Unable to HiRISE generate pds products.", _FILEINFO_); + } + }// end main + + + void setUpProcessPixels(const UserInterface &ui, + ProcessExportPds &pdsExportProcess, + FileType fileType) { + double min = -DBL_MAX; + double max = DBL_MAX; + + // Setup output type + QString parameterPrefix = "DTM"; + if (fileType == Orthorectified) { + parameterPrefix = "ORTHO"; + } + QString bitType = ui.GetString(parameterPrefix + "BITTYPE"); + if (bitType == "8BIT") { + pdsExportProcess.SetOutputType(Isis::UnsignedByte); + min = 0.0; + max = 255.0; + setRangeAndPixels(ui, pdsExportProcess, min, max, Both); + } + else if (bitType == "S16BIT") { + pdsExportProcess.SetOutputType(Isis::SignedWord); + min = -32768.0; + max = 32767.0; + setRangeAndPixels(ui, pdsExportProcess, min, max, Negative); + } + else if (bitType == "U16BIT") { + pdsExportProcess.SetOutputType(Isis::UnsignedWord); + min = 0.0; + max = 65535.0; + setRangeAndPixels(ui, pdsExportProcess, min, max, Both); + } + else { // default 32 bit + pdsExportProcess.SetOutputType(Isis::Real); + pdsExportProcess.SetOutputNull(Isis::NULL4); + pdsExportProcess.SetOutputLrs(Isis::LOW_REPR_SAT4); + pdsExportProcess.SetOutputLis(Isis::LOW_INSTR_SAT4); + pdsExportProcess.SetOutputHrs(Isis::HIGH_REPR_SAT4); + pdsExportProcess.SetOutputHis(Isis::HIGH_INSTR_SAT4); + setRangeAndPixels(ui, pdsExportProcess, min, max, Default); + } + + } + + + //Sets up special pixels and valid pixel ranges + void setRangeAndPixels(const UserInterface &ui, + ProcessExportPds &pdsExportProcess, + double &min, double &max, + SpecialPixelBoundary ptype) { + + if (ptype == Negative) { + // if we are dedicating the passed in min to be null, + // 1. set output null to that value + // 2. update the min to min+1 + // i.e. for SignedWord, null=-32768.0, min=-32767.0 + if (ui.GetBoolean("NULL")) { + pdsExportProcess.SetOutputNull(min++); + } + // if we are dedicating the current min value to be lrs, + // 1. set output lrs to that value + // 2. update the min to min+1 + if (ui.GetBoolean("LRS")) { + pdsExportProcess.SetOutputLrs(min++); + } + if (ui.GetBoolean("LIS")) { + pdsExportProcess.SetOutputLis(min++); + } + if (ui.GetBoolean("HIS")) { + pdsExportProcess.SetOutputHis(min++); + } + if (ui.GetBoolean("HRS")) { + pdsExportProcess.SetOutputHrs(min++); + } + } + else if (ptype == Both) { + // if we are dedicating the passed in min to be null, + // 1. set output null to that value + // 2. update the min to min+1 + if (ui.GetBoolean("NULL")) { + pdsExportProcess.SetOutputNull(min++); + } + // if we are dedicating the current min value to be lrs, + // 1. set output lrs to that value + // 2. update the min to min+1 + if (ui.GetBoolean("LRS")) { + pdsExportProcess.SetOutputLrs(min++); + } + // if we are dedicating the current min value to be lis, + // 1. set output lis to that value + // 2. update the min to min+1 + if (ui.GetBoolean("LIS")) { + pdsExportProcess.SetOutputLis(min++); + } + // if we are dedicating the max value to be hrs, + // 1. set output hrs to that value + // 2. update the max to max-1 + if (ui.GetBoolean("HRS")) { + pdsExportProcess.SetOutputHrs(max--); + } + // if we are dedicating the current max value to be his, + // 1. set output his to that value + // 2. update the max to max-1 + if (ui.GetBoolean("HIS")) { + pdsExportProcess.SetOutputHis(max--); + } + } + pdsExportProcess.SetOutputRange(min, max); + } + + + void processCube(ProcessExportPds &pdsExportProcess, const FileName &outputPdsFile) { + ofstream pdsOut(outputPdsFile.expanded().toLatin1().data()); + pdsExportProcess.OutputLabel(pdsOut); + pdsExportProcess.StartProcess(pdsOut); + pdsOut.close(); + pdsExportProcess.EndProcess(); + pdsExportProcess.ClearInputCubes(); + } + + + void setProjectionInformation(Cube *inCube, Pvl &pdsLabel, + PvlObject &mappingObject, const QString &projectionType) { + + // set map projection information + mappingObject.addKeyword(PvlKeyword("^DATA_SET_MAP_PROJECTION", "DSMAP.CAT")); + // initialize the azimuth to a Null value so we can check whether it was set. + double northAzimuth = Isis::Null; + // now find the northAzimuth based on projection type + if (QString::compare(projectionType, "EQUIRECTANGULAR", Qt::CaseInsensitive) == 0) { + setEquirectangularRadii(inCube, mappingObject); + mappingObject["MAP_PROJECTION_TYPE"].setValue("\"EQUIRECTANGULAR\""); + northAzimuth = 270; + pdsLabel.setFormatTemplate("$ISISROOT/appdata/translations/MroHirisePdsDTMEqui.pft"); + } + else if (QString::compare(projectionType, "POLAR STEREOGRAPHIC", Qt::CaseInsensitive) == 0) { + northAzimuth = polarStereoGraphicNorthAzimuth(mappingObject); + pdsLabel.setFormatTemplate("$ISISROOT/appdata/translations/MroHirisePdsDTMPolar.pft"); + } + else { + QString msg = "The projection type [" + + projectionType + + "] is not supported"; + throw IException(IException::User, msg, _FILEINFO_); + } + + PvlObject viewingParameters("VIEWING_PARAMETERS"); + if (northAzimuth != Isis::Null) { + viewingParameters.addKeyword(PvlKeyword("NORTH_AZIMUTH", toString(northAzimuth), "DEG")); + } + else { + viewingParameters.addKeyword(PvlKeyword("NORTH_AZIMUTH", "N/A")); + } + pdsLabel.addObject(viewingParameters); + + } + + + void setEquirectangularRadii(Cube *inCube, PvlObject &mappingObject) { + TProjection *proj = (TProjection *) ProjectionFactory::CreateFromCube(*inCube); + double newRadius = proj->LocalRadius((double)mappingObject["CENTER_LATITUDE"]); + newRadius /= 1000; + mappingObject.findKeyword("A_AXIS_RADIUS").setValue(toString(newRadius)); + mappingObject.findKeyword("A_AXIS_RADIUS").setUnits("KM"); + mappingObject.findKeyword("B_AXIS_RADIUS").setValue(toString(newRadius)); + mappingObject.findKeyword("B_AXIS_RADIUS").setUnits("KM"); + mappingObject.findKeyword("C_AXIS_RADIUS").setValue(toString(newRadius)); + mappingObject.findKeyword("C_AXIS_RADIUS").setUnits("KM"); + } + + + double polarStereoGraphicNorthAzimuth(const PvlObject &mappingObject) { + + double northAzimuth = Isis::Null; + if (mappingObject.hasKeyword("MINIMUM_LATITUDE") + && mappingObject.hasKeyword("MAXIMUM_LATITUDE") + && mappingObject.hasKeyword("EASTERNMOST_LONGITUDE") + && mappingObject.hasKeyword("WESTERNMOST_LONGITUDE")) { + + // find the center latitude of this set of images + // (not the same as the center lat for the projection) + double clat = ((toDouble(mappingObject["MAXIMUM_LATITUDE"][0]) - + toDouble(mappingObject["MINIMUM_LATITUDE"][0])) / 2) + + toDouble(mappingObject["MINIMUM_LATITUDE"][0]); + // find the center longitude of this set of images + // (not the same as the center lon for the projection) + double clon = ((toDouble(mappingObject["EASTERNMOST_LONGITUDE"][0]) - + toDouble(mappingObject["WESTERNMOST_LONGITUDE"][0])) / 2) + + toDouble(mappingObject["WESTERNMOST_LONGITUDE"][0]); + + if (clat > 0.0 && clon < 270.0) { // Northern Hemisphere, 0 to 270 lon + northAzimuth = 270.00 - clon; + } + else if (clat > 0.0 && clon >= 270.0) { // Northern Hemisphere, 270 to 360 lon + northAzimuth = 360.00 + (270.00 - clon); + } + else if (clat < 0.0 && clon < 90.0) { // Southern Hemisphere, 0 to 90 lon + northAzimuth = 270.00 + clon; + } + else if (clat < 0.0 && clon >= 90.0) { // Southern Hemisphere, 90 to 360 lon + northAzimuth = -(360.00 - (270.00 + clon)); + } + } + return northAzimuth; + + } + + + /* + * Scale letter of the image, A = 0.25, B = 0.5, C = 1.0, and so on. + * We are using a 10% fudge range. + */ + char mapScaleCode(double scale) { + int steps = 0; + double matchNum = 0.25; + double epsilon = matchNum * 0.1; // = 10% of matchNum + + bool bounded = false; + while (!bounded) { + if ((scale + epsilon) > matchNum && (scale - epsilon) < matchNum) { + bounded = true; + } + else { + steps++; + } + + // Increase to next possible scale and increase epsilon + matchNum *= 2; + epsilon *= 2; + + if (matchNum > 129) { // Max allowed is J, 128, before skipping to Z + bounded = true; + steps = 25; // Get us to 'Z' + } + } + char scaleLetter = 'A'; + // For however many steps we took, increase the letter. + scaleLetter += steps; + // 0.25 = A, 0.5 = B, 1.0 = C... + return scaleLetter; + } + + + QString dtmSourceOrbitAndTargetCodes(const PvlKeyword &sourceKeyword) { + // we use the source product id for the DTM to get the orbit IDs and target code + // for the source products (i.e. the stereo pair) + return sourceKeyword[0].mid(4,11) + "_" + + sourceKeyword[1].mid(4,12) + "_"; + } + + + QString versionNumber(const Pvl ¶msPvl, const UserInterface &ui) { + double version = toDouble(paramsPvl["PRODUCT_VERSION_ID"]); + + // Format the version for the output name: + // Only important thing to note is that a #.0 number is converted to 0# + // for the name, otherwise, it is predictable, always 2 greatest numbers: + // ##. + // >10, takes first two digits + // The number found here is used in ortho images as well. + QString vers = ""; + if (version >= 10.0) { + vers = toString(version).left(2); + } + else if (version >= 1.0) { + vers = toString(version); + bool wasInt = false; + // Checking for integer values, if so, make #.0 into 0# + // necessary because in DTMgen version 1.0 corresponded to a 01 in names. + if (vers.size() == 3) { + if (vers.at(2) == '0') { + vers = "0" + vers.left(1); + wasInt = true; + } + } + // Wasn't int, make #.# into ## + if (!wasInt) { + vers = toString(version).remove(QChar('.')); + if (vers.size() > 2) { + vers = vers.left(2); + } + } + } + // 0 - <1, if 0.#, is 0#, is 0.#####, is first two ## + else if (version >= 0.001) { // Any less and we get E... not dealing with that. + vers = toString(version).remove(QChar('.')); + int nonZero = vers.lastIndexOf("0"); + if (vers.size() > 2) { + vers = vers.mid(nonZero+1, 2); + } + } + // It was negative, or something else crazy? + else { + QString msg = "Version number [" + toString(version) + "] is invalid"; + throw IException(IException::User, msg, _FILEINFO_); + } + return vers; + } + + + QString producingInstitution(const Pvl ¶msPvl, const UserInterface &ui) { + QString producing = paramsPvl["PRODUCING_INSTITUTION"][0]; + if (producing.size() > 1) { + QString msg = "PRODUCING_INSTITUTION value [" + producing + "] in the PARAMSPVL file must be a " + "single character. See hidtmgen documentation for these character codes."; + throw IException(IException::User, msg, _FILEINFO_); + } + return producing; + } + + + QString orthoContentColorCode(const FileName &orthoFileName) { + QString colorCode = ""; + Cube orthoCube(orthoFileName, "r"); + if (orthoCube.bandCount() == 1) { + colorCode = "RED"; + } + else if (orthoCube.bandCount() == 3) { + colorCode = "IRB"; + } + else { + QString msg = "The file [" + orthoFileName.expanded() + "] found in the ORTHOFROMLIST " + "is not a valid orthorectified image. Band count must be 1 (RED) or 3 (color)."; + throw IException(IException::User, msg, _FILEINFO_); + } + return colorCode; + } + + + void setIdentificationInformation(Pvl &pdsLabel, + const QString &productId, + PvlKeyword sourceProductId, + const Pvl ¶msPvl, + const UserInterface &ui) { + // These come from the user (PARAMSPVL) + pdsLabel.addKeyword(paramsPvl["DATA_SET_ID"]); + pdsLabel.addKeyword(paramsPvl["DATA_SET_NAME"]); + pdsLabel.addKeyword(paramsPvl["PRODUCER_INSTITUTION_NAME"]); + pdsLabel.addKeyword(paramsPvl["PRODUCER_ID"]); + pdsLabel.addKeyword(paramsPvl["PRODUCER_FULL_NAME"]); + + // given product id + pdsLabel.addKeyword(PvlKeyword("PRODUCT_ID", productId)); + + // This comes from the user (PARAMSPVL) + pdsLabel.addKeyword(paramsPvl["PRODUCT_VERSION_ID"]); + + // always the same value + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_NAME", "MARS RECONNAISSANCE ORBITER")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_ID", "MRO")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_NAME", "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_ID", "HIRISE")); + + // sourceProductId + pdsLabel.addKeyword(sourceProductId); + + // These come from the user (PARAMSPVL) + pdsLabel.addKeyword(paramsPvl["RATIONALE_DESC"]); + pdsLabel.addKeyword(paramsPvl["SOFTWARE_NAME"]); + } + + + /** + * + * @param inCube + * + */ + void verifyDTM(Cube *inCube, const FileName &inputCubeFile) { + if (inCube->bandCount() > 1 || + inCube->label()->hasObject("Instrument")) { + QString msg = "Input cube [" + inputCubeFile.expanded() + "] does not appear " + + "to be a DTM"; + throw IException(IException::User, msg, _FILEINFO_); + } + } + + + /** + * + * @param inCube + * @param dtmPdsLabel + * @param mappingObject + * + */ + void customizeDtmLabels(Cube *inCube, Pvl &dtmPdsLabel, PvlObject &mappingObject) { + + // sets format for dtm label + Pvl format; + // Have to do things this way to get an array of values + PvlKeyword validMin("VALID_MINIMUM", "REAL"); + validMin += "2"; + format.addKeyword(validMin); + PvlKeyword validMax("VALID_MAXIMUM", "REAL"); + validMax += "2"; + format.addKeyword(validMax); + format.addKeyword(PvlKeyword("SAMPLE_BIT_MASK", "BINARY")); + // Aiming for MISSING_CONSTANT = (HEX, 4); Two separate items. + PvlKeyword mc("MISSING_CONSTANT", "HEX"); + mc += "4"; + format.addKeyword(mc); + PvlFormat *form = dtmPdsLabel.format(); + form->add(format); + dtmPdsLabel.setFormat(form); + + QString note = "Pixel values in this file represent elevations in meters " + "above the martian equipotential surface (Mars 2000 Datum) defined by " + "Smith, et al. (2001). Conversion from pixel units to geophysical " + "units is given by the keyvalues for SCALING_FACTOR and OFFSET. This " + "DTM was produced using ISIS and SOCET Set (copyright BAE Systems) " + "software as described in Kirk et al. (2008)."; + dtmPdsLabel.findObject("IMAGE").addKeyword(PvlKeyword("NOTE", note)); + + // Label records should always be 1, my example didn't included it, so we won't. + dtmPdsLabel.deleteKeyword("LABEL_RECORDS"); + + // Delete or change unneeded keywords in image object + PvlObject &image = dtmPdsLabel.findObject("IMAGE"); + image.findKeyword("CORE_NULL").setName("MISSING_CONSTANT"); + image.deleteKeyword("BAND_STORAGE_TYPE"); + image.deleteKeyword("CORE_LOW_REPR_SATURATION"); + image.deleteKeyword("CORE_LOW_INSTR_SATURATION"); + image.deleteKeyword("CORE_HIGH_REPR_SATURATION"); + image.deleteKeyword("CORE_HIGH_INSTR_SATURATION"); + + // Create statistics and add to image group + Statistics *stat = inCube->statistics(); + image.addKeyword(PvlKeyword("VALID_MINIMUM", toString(stat->Minimum()))); + image.addKeyword(PvlKeyword("VALID_MAXIMUM", toString(stat->Maximum()))); + + // delete unneeded keywords in map object + mappingObject.deleteKeyword("FIRST_STANDARD_PARALLEL"); + mappingObject.deleteKeyword("SECOND_STANDARD_PARALLEL"); + + } + + + /* + * For orthorectified images, + * PRODUCT_ID = mSP_xxxxxx_xxxx_ccc_s_nn_ORTHO + * m is the map projection code + * E for equirectangular + * P for polar stereographic + * xxxxx_xxxx is the HiRISE source observation ID (mission phase orbit number target code) + * ccc is the color content + * RED for visible red, 1 band images + * IRB for 3 band enhanced color images (IR, RED, or BG) + * s is the grid spacing (i.e. map scale) code + * A for 0.25 m + * B for 0.5 m + * C for 1.0 m + * D for 2.0 m + * nn is the sequence number to distinguish between ortho rectified images + * from the same HiRISE observation that may be created from different DTMs + * ORTHO indicates that the image has been orthorectified + * + * For DTMs, + * PRODUCT_ID = DTems_xxxxxx_xxxx_xxxxxx_xxxx_vnn + * e is the code for the type of elevation data + * E for areoid elevations + * R for radii + * (hidtmgen does not currently support this option) + * m is the map projection code + * E for equirectangular + * P for polar stereographic + * s is the grid spacing (i.e. map scale) code + * A for 0.25 m + * B for 0.5 m + * C for 1.0 m + * D for 2.0 m + * xxxxx_xxxx_xxxxx_xxxx is the HiRISE source observation ID for the stereo pairs + * v is the code for the producing institution + * U for USGS + * A for University of Arizona + * C for CalTech + * N for NASA Ames + * J for JPL + * O for Ohio State + * Z for other + * nn is the 2 digit product version ID number + */ + } diff --git a/isis/src/mro/apps/hidtmgen/hidtmgen.h b/isis/src/mro/apps/hidtmgen/hidtmgen.h new file mode 100644 index 0000000000..f3fde729d0 --- /dev/null +++ b/isis/src/mro/apps/hidtmgen/hidtmgen.h @@ -0,0 +1,11 @@ +#ifndef hidtmgen_h // Change this to your app name in all lower case suffixed with _h (e.g. campt_h, cam2map_h etc.) +#define hidtmgen_h + +#include "Cube.h" +#include "UserInterface.h" + +namespace Isis{ + extern void hidtmgen(UserInterface &ui); +} + +#endif diff --git a/isis/src/mro/apps/hidtmgen/main.cpp b/isis/src/mro/apps/hidtmgen/main.cpp index 9bee7fa60f..5b370cfb23 100644 --- a/isis/src/mro/apps/hidtmgen/main.cpp +++ b/isis/src/mro/apps/hidtmgen/main.cpp @@ -1,825 +1,11 @@ #include "Isis.h" -#include -#include -#include +#include "Application.h" +#include "hidtmgen.h" -#include "Cube.h" -#include "CubeAttribute.h" -#include "FileName.h" -#include "FileList.h" -#include "IString.h" -#include "ProcessExportPds.h" -#include "TProjection.h" -#include "ProjectionFactory.h" -#include "Pvl.h" -#include "PvlFormatPds.h" -#include "PvlKeyword.h" -#include "PvlObject.h" -#include "SpecialPixel.h" -#include "Statistics.h" -#include "UserInterface.h" +using namespace Isis; -using namespace std; -using namespace Isis; - - -/** - * Indicates the type of file currently being processed for export to PDS. - */ -enum FileType { DTM, /**< The output file for the current process is a DTM.*/ - Orthorectified /**< The output file for the current process is an Ortho.*/ -}; - - -/** - * This enumeration is used to determine how to set the special pixel types - * selected by the user. - * - * If the output data is non-negative, then Both is set. This means that Null, - * Lrs, and Lis (if selected) will be given the values of the lower boundary - * (i.e. beginning at 0) and that His and Hrs (if selected) will be given the - * values of the upper boundary (i.e. for 8bit, values near 255 and for 16bit, - * values near 65535). - * - * If the output data is signed integer data, then Negative is set. This means - * that all special pixels (if selected) will be given values of the lower - * boundary (i.e. beginning -32768). - * - * If the output data is real-valued, then Default is set. This means that the - * special pixels defined in Isis::SpecialPixel will be used. - * - */ -enum SpecialPixelBoundary { Both, /**< Both the upper and lower boundaries may be used to save - off special pixel values. This option is used for - unsigned bit integer valued output data types - (i.e. 8bit and unsigned 16bit)*/ - Negative, /**< Only the lower (negative) boundary may be used to save - off special pixel values. This option is used for signed - 16 bit integer valued output data.*/ - Default /**< This option is used for real valued output data types - (i.e. 32bit). In this case pre-defined - Isis::SpecialPixel values are dedicated to the selected - pixel types.*/ -}; - - -// -------------------------Function Prototypes ------------------------------------ -// cube processing -void setUpProcessPixels(const UserInterface &ui, - ProcessExportPds &pdsExportProcess, - FileType fileType); -void setRangeAndPixels(const UserInterface &ui, - ProcessExportPds &pdsExportProcess, - double &min, - double &max, - SpecialPixelBoundary ptype); -void processCube(ProcessExportPds &pdsExportProcess, - const FileName &outputPdsFile); -// projection information and viewing parameters -void setProjectionInformation(Cube *inCube, - Pvl &pdsLabel, - PvlObject &mappingObject, - const QString &projectionType); -void setEquirectangularRadii(Cube *inCube, - PvlObject &mappingObject); -double polarStereoGraphicNorthAzimuth(const PvlObject &mappingObject); -// find codes needed for product id -char mapScaleCode(double scale); -QString dtmSourceOrbitAndTargetCodes(const PvlKeyword &sourceKeyword); -QString versionNumber(const Pvl ¶msPvl, - const UserInterface &ui); -QString producingInstitution(const Pvl ¶msPvl, - const UserInterface &ui); -QString orthoContentColorCode(const FileName &orthoFileName); -// find/set values needed for output labels -void setIdentificationInformation(Pvl &pdsLabel, - const QString &productId, - PvlKeyword sourceProductId, - const Pvl ¶msPvl, - const UserInterface &ui); -// dtm specific calls -void verifyDTM(Cube *inCube, - const FileName &inputCubeFile); -void customizeDtmLabels(Cube *inCube, - Pvl &dtmPdsLabel, - PvlObject &mappingObject); -// ------------------------- end Function Prototypes --------------------------------- - - -// Main void IsisMain() { - try { - // -------------------------------------------------------------------------// - // Get required global ui... - // -------------------------------------------------------------------------// - UserInterface &ui = Application::GetUserInterface(); - Pvl paramsPvl(ui.GetFileName("PARAMSPVL")); - bool defaultNames = ui.GetBoolean("DEFAULTNAMES"); - - // parameters: - // * DTM (not required) if entered, set as input cube in process - // * ORTHOFROMLIST (not required) if entered, set as input cubes in process - // - // * DEFAULTNAMES (required) if true, generates output file names and product ids - // * OUTPUTDIR (not required) only used (still not required) if defaultnames=true - // * DTMTO (not required) required when defaultnames=false and dtm was given. - // * ORTHOTOLIST (not required) required when DEFAULTNAMES=false and ORTHOFROMLIST was given. - // if entered, size must match ORTHOFROMLIST - // - // * PARAMSPVL (required) - // * DTM_PRODUCT_ID (not required) required if DTM given and DEFAULTNAMES=false - // * ORTHOPRODUCTIDLIST (not required) required if DTM given and DEFAULTNAMES=false - // if entered, size must match ORTHOFROMLIST - // * ORTHOSEQUENCENUMBERLIST (not required) required if DTM given and DEFAULTNAMES=false - // if entered, size must match ORTHOFROMLIST - // - // * ENDIAN (required) - // - // * DTMBITTYPE required if DTM - // * ORTHOBITTYPE required if ORTHOFROMLIST - // * NULL (not required) - // * LRS (not required) - // * LIS (not required) - // * HIS (not required) - // * HRS (not required) - - - // -------------------------------------------------------------------------// - // Set up Process... - // -------------------------------------------------------------------------// - ProcessExportPds pdsExportProcess; - // Set ExportType and Endian for all output - pdsExportProcess.SetExportType(ProcessExportPds::Fixed); - if (ui.GetString("ENDIAN") == "MSB") { - pdsExportProcess.SetOutputEndian(Isis::Msb); - } - else if (ui.GetString("ENDIAN") == "LSB") { - pdsExportProcess.SetOutputEndian(Isis::Lsb); - } - // -------------------------------------------------------------------------// - // -------------------------------------------------------------------------// - - // The output directory will be used for DTM and ortho images when defaultNames=true - // this directory won't be used if defaultNames=false but will be used for - // both DTM and ortho if defaultNames=true. - FileName outFile; - QString outDirString; - FileName outDir = FileName(ui.GetString("OUTPUTDIR")); - if (!outDir.fileExists()) { - outDir.dir().mkpath("."); - } - outDirString = outDir.expanded(); - if (outDirString.mid(outDirString.size()-1, 1) != "/") { - outDirString += "/"; - outDir = FileName(outDirString); - } - outDirString = outDir.expanded(); - - // if DTM provided, PRODUCT_ID will also be used for ortho SOURCE_PRODUCT_IDs - QString dtmProductId = ""; - if (ui.WasEntered("DTM")) { - setUpProcessPixels(ui, pdsExportProcess, DTM); - // set the input cube to process - Cube *inCube = pdsExportProcess.SetInputCube("DTM"); - verifyDTM(inCube, ui.GetFileName("DTM")); - - // These are our output labels, will be modifying heavily - Pvl &pdsLabel = pdsExportProcess.StandardPdsLabel(ProcessExportPds::Image); - PvlObject &mappingObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); - QString projectionType = mappingObject["MAP_PROJECTION_TYPE"][0]; - setProjectionInformation(inCube, pdsLabel, mappingObject, projectionType); - customizeDtmLabels(inCube, pdsLabel, mappingObject); - - // if the DTM was given, use the SOURCE_PRODUCT_ID supplied by the user. - PvlKeyword source = paramsPvl.findKeyword("DTM_SOURCE_PRODUCT_ID", PvlObject::Traverse); - source.setName("SOURCE_PRODUCT_ID"); - - if (defaultNames) { - dtmProductId = "DT"; - dtmProductId += "E";// for now this is hard-coded to E for elevations (see xml doc) - dtmProductId += projectionType[0].toUpper(); - dtmProductId += mapScaleCode(mappingObject.findKeyword("MAP_SCALE")); - dtmProductId += "_"; - dtmProductId += dtmSourceOrbitAndTargetCodes(source); - // Get the 1-character producing institution code from the PARAMSPVL and add it - dtmProductId += producingInstitution(paramsPvl, ui); - // Get the 2-character version number from the PARAMSPVL and add it - dtmProductId += versionNumber(paramsPvl, ui); - - outFile = FileName(outDirString + dtmProductId + ".IMG"); - } - else { - dtmProductId = ui.GetString("DTM_PRODUCT_ID"); - outFile = FileName(ui.GetFileName("DTMTO")); - } // End scope of defaultNames true - - // identification labels that are pretty set in stone - setIdentificationInformation(pdsLabel, dtmProductId, source, paramsPvl, ui); - processCube(pdsExportProcess, outFile); - if (!outFile.fileExists()) { - throw IException(IException::Unknown, - QString("DTM file [%1] failed to be created.").arg(outFile.expanded()), - _FILEINFO_); - } - } // end if DTM was entered - else if (!ui.WasEntered("ORTHOFROMLIST")) { - throw IException(IException::User, - "User must supply DTM or ORTHOFROMLIST or both.", - _FILEINFO_); - } - - /* - * End of DTM work. Labels are complete, names complete, it's written out. - */ - - - // Now we take care of ortho images, if given. - // Get the list of ortho input cubes - if (ui.WasEntered("ORTHOFROMLIST")) { - - FileList orthoFromList; - orthoFromList.read(FileName(ui.GetFileName("ORTHOFROMLIST"))); - if(orthoFromList.size() == 0) { - throw IException(IException::User, "Input ortho list is empty.", _FILEINFO_); - } - - // check corresponding input lists for matching sizes... - FileList orthoToList, orthoProductIdList, orthoSequenceNumberList; - if (defaultNames) { - // if creating default output file names and product ids then we need to get the list of - // ortho sequence numbers - orthoSequenceNumberList.read(FileName(ui.GetFileName("ORTHOSEQUENCENUMBERLIST"))); - if(orthoFromList.size() != orthoSequenceNumberList.size()) { - throw IException(IException::User, "Output sequence number list must " - "correspond to the input ortho list.", _FILEINFO_); - } - } - else { - // if not creating default names, get the lists of ortho output cube names and product ids - orthoToList.read(FileName(ui.GetFileName("ORTHOTOLIST"))); - orthoProductIdList.read(FileName(ui.GetFileName("ORTHOPRODUCTIDLIST"))); - if(orthoFromList.size() != orthoToList.size() - || orthoFromList.size() != orthoProductIdList.size()) { - throw IException(IException::User, - "Output ortho list and product id list must " - "correspond to the input ortho list.", - _FILEINFO_); - } - } - - ProcessExportPds orthoExportProcess; - // Set ExportType and Endian for all output - orthoExportProcess.SetExportType(ProcessExportPds::Fixed); - if (ui.GetString("ENDIAN") == "MSB") { - orthoExportProcess.SetOutputEndian(Isis::Msb); - } - else if (ui.GetString("ENDIAN") == "LSB") { - orthoExportProcess.SetOutputEndian(Isis::Lsb); - } - setUpProcessPixels(ui, orthoExportProcess, Orthorectified); - - // Loop through all ortho images - for (int i = 0; i < orthoFromList.size(); i++) { - - // set the input cube to process - CubeAttributeInput att(orthoFromList[i]); - Cube *inCube = orthoExportProcess.SetInputCube(orthoFromList[i].expanded(), att); - - // get the cube label and set identification info - Pvl &pdsLabel = orthoExportProcess.StandardPdsLabel(ProcessExportPds::Image); - - // set map projection information - PvlObject &mappingObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); - QString projectionType = mappingObject["MAP_PROJECTION_TYPE"][0]; - setProjectionInformation(inCube, pdsLabel, mappingObject, projectionType); - - QString productId = ""; - QString orthoId = ""; - if (defaultNames) { - orthoId = orthoFromList[i].baseName().left(15); - productId = orthoId; - productId += "_"; - productId += orthoContentColorCode(orthoFromList[i]); - productId += "_"; - productId += mapScaleCode(mappingObject.findKeyword("MAP_SCALE")); - productId += "_"; - productId += orthoSequenceNumberList[i].expanded(); - productId += "_"; - productId += "ORTHO"; - - // output file path is the same as the dtm - outFile = FileName(outDirString + productId + ".IMG"); - } - else { - productId = orthoProductIdList[i].expanded(); - outFile = orthoToList[i]; - orthoId = productId; - } - - // for ortho images, source product ID is the DTM product ID followed by the - // ORTHO product ID - PvlKeyword source("SOURCE_PRODUCT_ID"); - if (dtmProductId.isEmpty()) { - source += paramsPvl["ORTHO_SOURCE_DTM_ID"]; - } - else { - source += dtmProductId; - } - source += orthoId; - setIdentificationInformation(pdsLabel, productId, source, paramsPvl, ui); - - processCube(orthoExportProcess, outFile); - if (!outFile.fileExists()) { - throw IException(IException::Unknown, - QString("DTM file [%1] failed to be created.").arg(outFile.expanded()), - _FILEINFO_); - } - - } // End scope of for loop for ortho images - } - } - catch (IException &e) { - throw IException(e, IException::Unknown, "hidtmgen: Unable to HiRISE generate pds products.", _FILEINFO_); - } -}// end main - - -void setUpProcessPixels(const UserInterface &ui, - ProcessExportPds &pdsExportProcess, - FileType fileType) { - double min = -DBL_MAX; - double max = DBL_MAX; - - // Setup output type - QString parameterPrefix = "DTM"; - if (fileType == Orthorectified) { - parameterPrefix = "ORTHO"; - } - QString bitType = ui.GetString(parameterPrefix + "BITTYPE"); - if (bitType == "8BIT") { - pdsExportProcess.SetOutputType(Isis::UnsignedByte); - min = 0.0; - max = 255.0; - setRangeAndPixels(ui, pdsExportProcess, min, max, Both); - } - else if (bitType == "S16BIT") { - pdsExportProcess.SetOutputType(Isis::SignedWord); - min = -32768.0; - max = 32767.0; - setRangeAndPixels(ui, pdsExportProcess, min, max, Negative); - } - else if (bitType == "U16BIT") { - pdsExportProcess.SetOutputType(Isis::UnsignedWord); - min = 0.0; - max = 65535.0; - setRangeAndPixels(ui, pdsExportProcess, min, max, Both); - } - else { // default 32 bit - pdsExportProcess.SetOutputType(Isis::Real); - pdsExportProcess.SetOutputNull(Isis::NULL4); - pdsExportProcess.SetOutputLrs(Isis::LOW_REPR_SAT4); - pdsExportProcess.SetOutputLis(Isis::LOW_INSTR_SAT4); - pdsExportProcess.SetOutputHrs(Isis::HIGH_REPR_SAT4); - pdsExportProcess.SetOutputHis(Isis::HIGH_INSTR_SAT4); - setRangeAndPixels(ui, pdsExportProcess, min, max, Default); - } - + UserInterface &ui = Application::GetUserInterface(); + hidtmgen(ui); } - - -//Sets up special pixels and valid pixel ranges -void setRangeAndPixels(const UserInterface &ui, - ProcessExportPds &pdsExportProcess, - double &min, double &max, - SpecialPixelBoundary ptype) { - - if (ptype == Negative) { - // if we are dedicating the passed in min to be null, - // 1. set output null to that value - // 2. update the min to min+1 - // i.e. for SignedWord, null=-32768.0, min=-32767.0 - if (ui.GetBoolean("NULL")) { - pdsExportProcess.SetOutputNull(min++); - } - // if we are dedicating the current min value to be lrs, - // 1. set output lrs to that value - // 2. update the min to min+1 - if (ui.GetBoolean("LRS")) { - pdsExportProcess.SetOutputLrs(min++); - } - if (ui.GetBoolean("LIS")) { - pdsExportProcess.SetOutputLis(min++); - } - if (ui.GetBoolean("HIS")) { - pdsExportProcess.SetOutputHis(min++); - } - if (ui.GetBoolean("HRS")) { - pdsExportProcess.SetOutputHrs(min++); - } - } - else if (ptype == Both) { - // if we are dedicating the passed in min to be null, - // 1. set output null to that value - // 2. update the min to min+1 - if (ui.GetBoolean("NULL")) { - pdsExportProcess.SetOutputNull(min++); - } - // if we are dedicating the current min value to be lrs, - // 1. set output lrs to that value - // 2. update the min to min+1 - if (ui.GetBoolean("LRS")) { - pdsExportProcess.SetOutputLrs(min++); - } - // if we are dedicating the current min value to be lis, - // 1. set output lis to that value - // 2. update the min to min+1 - if (ui.GetBoolean("LIS")) { - pdsExportProcess.SetOutputLis(min++); - } - // if we are dedicating the max value to be hrs, - // 1. set output hrs to that value - // 2. update the max to max-1 - if (ui.GetBoolean("HRS")) { - pdsExportProcess.SetOutputHrs(max--); - } - // if we are dedicating the current max value to be his, - // 1. set output his to that value - // 2. update the max to max-1 - if (ui.GetBoolean("HIS")) { - pdsExportProcess.SetOutputHis(max--); - } - } - pdsExportProcess.SetOutputRange(min, max); -} - - -void processCube(ProcessExportPds &pdsExportProcess, const FileName &outputPdsFile) { - ofstream pdsOut(outputPdsFile.expanded().toLatin1().data()); - pdsExportProcess.OutputLabel(pdsOut); - pdsExportProcess.StartProcess(pdsOut); - pdsOut.close(); - pdsExportProcess.EndProcess(); - pdsExportProcess.ClearInputCubes(); -} - - -void setProjectionInformation(Cube *inCube, Pvl &pdsLabel, - PvlObject &mappingObject, const QString &projectionType) { - - // set map projection information - mappingObject.addKeyword(PvlKeyword("^DATA_SET_MAP_PROJECTION", "DSMAP.CAT")); - // initialize the azimuth to a Null value so we can check whether it was set. - double northAzimuth = Isis::Null; - // now find the northAzimuth based on projection type - if (QString::compare(projectionType, "EQUIRECTANGULAR", Qt::CaseInsensitive) == 0) { - setEquirectangularRadii(inCube, mappingObject); - mappingObject["MAP_PROJECTION_TYPE"].setValue("\"EQUIRECTANGULAR\""); - northAzimuth = 270; - pdsLabel.setFormatTemplate("$ISISROOT/appdata/translations/MroHirisePdsDTMEqui.pft"); - } - else if (QString::compare(projectionType, "POLAR STEREOGRAPHIC", Qt::CaseInsensitive) == 0) { - northAzimuth = polarStereoGraphicNorthAzimuth(mappingObject); - pdsLabel.setFormatTemplate("$ISISROOT/appdata/translations/MroHirisePdsDTMPolar.pft"); - } - else { - QString msg = "The projection type [" + - projectionType - + "] is not supported"; - throw IException(IException::User, msg, _FILEINFO_); - } - - PvlObject viewingParameters("VIEWING_PARAMETERS"); - if (northAzimuth != Isis::Null) { - viewingParameters.addKeyword(PvlKeyword("NORTH_AZIMUTH", toString(northAzimuth), "DEG")); - } - else { - viewingParameters.addKeyword(PvlKeyword("NORTH_AZIMUTH", "N/A")); - } - pdsLabel.addObject(viewingParameters); - -} - - -void setEquirectangularRadii(Cube *inCube, PvlObject &mappingObject) { - TProjection *proj = (TProjection *) ProjectionFactory::CreateFromCube(*inCube); - double newRadius = proj->LocalRadius((double)mappingObject["CENTER_LATITUDE"]); - newRadius /= 1000; - mappingObject.findKeyword("A_AXIS_RADIUS").setValue(toString(newRadius)); - mappingObject.findKeyword("A_AXIS_RADIUS").setUnits("KM"); - mappingObject.findKeyword("B_AXIS_RADIUS").setValue(toString(newRadius)); - mappingObject.findKeyword("B_AXIS_RADIUS").setUnits("KM"); - mappingObject.findKeyword("C_AXIS_RADIUS").setValue(toString(newRadius)); - mappingObject.findKeyword("C_AXIS_RADIUS").setUnits("KM"); -} - - -double polarStereoGraphicNorthAzimuth(const PvlObject &mappingObject) { - - double northAzimuth = Isis::Null; - if (mappingObject.hasKeyword("MINIMUM_LATITUDE") - && mappingObject.hasKeyword("MAXIMUM_LATITUDE") - && mappingObject.hasKeyword("EASTERNMOST_LONGITUDE") - && mappingObject.hasKeyword("WESTERNMOST_LONGITUDE")) { - - // find the center latitude of this set of images - // (not the same as the center lat for the projection) - double clat = ((toDouble(mappingObject["MAXIMUM_LATITUDE"][0]) - - toDouble(mappingObject["MINIMUM_LATITUDE"][0])) / 2) + - toDouble(mappingObject["MINIMUM_LATITUDE"][0]); - // find the center longitude of this set of images - // (not the same as the center lon for the projection) - double clon = ((toDouble(mappingObject["EASTERNMOST_LONGITUDE"][0]) - - toDouble(mappingObject["WESTERNMOST_LONGITUDE"][0])) / 2) + - toDouble(mappingObject["WESTERNMOST_LONGITUDE"][0]); - - if (clat > 0.0 && clon < 270.0) { // Northern Hemisphere, 0 to 270 lon - northAzimuth = 270.00 - clon; - } - else if (clat > 0.0 && clon >= 270.0) { // Northern Hemisphere, 270 to 360 lon - northAzimuth = 360.00 + (270.00 - clon); - } - else if (clat < 0.0 && clon < 90.0) { // Southern Hemisphere, 0 to 90 lon - northAzimuth = 270.00 + clon; - } - else if (clat < 0.0 && clon >= 90.0) { // Southern Hemisphere, 90 to 360 lon - northAzimuth = -(360.00 - (270.00 + clon)); - } - } - return northAzimuth; - -} - - -/* - * Scale letter of the image, A = 0.25, B = 0.5, C = 1.0, and so on. - * We are using a 10% fudge range. - */ -char mapScaleCode(double scale) { - int steps = 0; - double matchNum = 0.25; - double epsilon = matchNum * 0.1; // = 10% of matchNum - - bool bounded = false; - while (!bounded) { - if ((scale + epsilon) > matchNum && (scale - epsilon) < matchNum) { - bounded = true; - } - else { - steps++; - } - - // Increase to next possible scale and increase epsilon - matchNum *= 2; - epsilon *= 2; - - if (matchNum > 129) { // Max allowed is J, 128, before skipping to Z - bounded = true; - steps = 25; // Get us to 'Z' - } - } - char scaleLetter = 'A'; - // For however many steps we took, increase the letter. - scaleLetter += steps; - // 0.25 = A, 0.5 = B, 1.0 = C... - return scaleLetter; -} - - -QString dtmSourceOrbitAndTargetCodes(const PvlKeyword &sourceKeyword) { - // we use the source product id for the DTM to get the orbit IDs and target code - // for the source products (i.e. the stereo pair) - return sourceKeyword[0].mid(4,11) + "_" + - sourceKeyword[1].mid(4,12) + "_"; -} - - -QString versionNumber(const Pvl ¶msPvl, const UserInterface &ui) { - double version = toDouble(paramsPvl["PRODUCT_VERSION_ID"]); - - // Format the version for the output name: - // Only important thing to note is that a #.0 number is converted to 0# - // for the name, otherwise, it is predictable, always 2 greatest numbers: - // ##. - // >10, takes first two digits - // The number found here is used in ortho images as well. - QString vers = ""; - if (version >= 10.0) { - vers = toString(version).left(2); - } - else if (version >= 1.0) { - vers = toString(version); - bool wasInt = false; - // Checking for integer values, if so, make #.0 into 0# - // necessary because in DTMgen version 1.0 corresponded to a 01 in names. - if (vers.size() == 3) { - if (vers.at(2) == '0') { - vers = "0" + vers.left(1); - wasInt = true; - } - } - // Wasn't int, make #.# into ## - if (!wasInt) { - vers = toString(version).remove(QChar('.')); - if (vers.size() > 2) { - vers = vers.left(2); - } - } - } - // 0 - <1, if 0.#, is 0#, is 0.#####, is first two ## - else if (version >= 0.001) { // Any less and we get E... not dealing with that. - vers = toString(version).remove(QChar('.')); - int nonZero = vers.lastIndexOf("0"); - if (vers.size() > 2) { - vers = vers.mid(nonZero+1, 2); - } - } - // It was negative, or something else crazy? - else { - QString msg = "Version number [" + toString(version) + "] is invalid"; - throw IException(IException::User, msg, _FILEINFO_); - } - return vers; -} - - -QString producingInstitution(const Pvl ¶msPvl, const UserInterface &ui) { - QString producing = paramsPvl["PRODUCING_INSTITUTION"][0]; - if (producing.size() > 1) { - QString msg = "PRODUCING_INSTITUTION value [" + producing + "] in the PARAMSPVL file must be a " - "single character. See hidtmgen documentation for these character codes."; - throw IException(IException::User, msg, _FILEINFO_); - } - return producing; -} - - -QString orthoContentColorCode(const FileName &orthoFileName) { - QString colorCode = ""; - Cube orthoCube(orthoFileName, "r"); - if (orthoCube.bandCount() == 1) { - colorCode = "RED"; - } - else if (orthoCube.bandCount() == 3) { - colorCode = "IRB"; - } - else { - QString msg = "The file [" + orthoFileName.expanded() + "] found in the ORTHOFROMLIST " - "is not a valid orthorectified image. Band count must be 1 (RED) or 3 (color)."; - throw IException(IException::User, msg, _FILEINFO_); - } - return colorCode; -} - - -void setIdentificationInformation(Pvl &pdsLabel, - const QString &productId, - PvlKeyword sourceProductId, - const Pvl ¶msPvl, - const UserInterface &ui) { - // These come from the user (PARAMSPVL) - pdsLabel.addKeyword(paramsPvl["DATA_SET_ID"]); - pdsLabel.addKeyword(paramsPvl["DATA_SET_NAME"]); - pdsLabel.addKeyword(paramsPvl["PRODUCER_INSTITUTION_NAME"]); - pdsLabel.addKeyword(paramsPvl["PRODUCER_ID"]); - pdsLabel.addKeyword(paramsPvl["PRODUCER_FULL_NAME"]); - - // given product id - pdsLabel.addKeyword(PvlKeyword("PRODUCT_ID", productId)); - - // This comes from the user (PARAMSPVL) - pdsLabel.addKeyword(paramsPvl["PRODUCT_VERSION_ID"]); - - // always the same value - pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_NAME", "MARS RECONNAISSANCE ORBITER")); - pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_ID", "MRO")); - pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_NAME", "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); - pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_ID", "HIRISE")); - - // sourceProductId - pdsLabel.addKeyword(sourceProductId); - - // These come from the user (PARAMSPVL) - pdsLabel.addKeyword(paramsPvl["RATIONALE_DESC"]); - pdsLabel.addKeyword(paramsPvl["SOFTWARE_NAME"]); -} - - -/** - * - * @param inCube - * - */ -void verifyDTM(Cube *inCube, const FileName &inputCubeFile) { - if (inCube->bandCount() > 1 || - inCube->label()->hasObject("Instrument")) { - QString msg = "Input cube [" + inputCubeFile.expanded() + "] does not appear " - + "to be a DTM"; - throw IException(IException::User, msg, _FILEINFO_); - } -} - - -/** - * - * @param inCube - * @param dtmPdsLabel - * @param mappingObject - * - */ -void customizeDtmLabels(Cube *inCube, Pvl &dtmPdsLabel, PvlObject &mappingObject) { - - // sets format for dtm label - Pvl format; - // Have to do things this way to get an array of values - PvlKeyword validMin("VALID_MINIMUM", "REAL"); - validMin += "2"; - format.addKeyword(validMin); - PvlKeyword validMax("VALID_MAXIMUM", "REAL"); - validMax += "2"; - format.addKeyword(validMax); - format.addKeyword(PvlKeyword("SAMPLE_BIT_MASK", "BINARY")); - // Aiming for MISSING_CONSTANT = (HEX, 4); Two separate items. - PvlKeyword mc("MISSING_CONSTANT", "HEX"); - mc += "4"; - format.addKeyword(mc); - PvlFormat *form = dtmPdsLabel.format(); - form->add(format); - dtmPdsLabel.setFormat(form); - - QString note = "Pixel values in this file represent elevations in meters " - "above the martian equipotential surface (Mars 2000 Datum) defined by " - "Smith, et al. (2001). Conversion from pixel units to geophysical " - "units is given by the keyvalues for SCALING_FACTOR and OFFSET. This " - "DTM was produced using ISIS and SOCET Set (copyright BAE Systems) " - "software as described in Kirk et al. (2008)."; - dtmPdsLabel.findObject("IMAGE").addKeyword(PvlKeyword("NOTE", note)); - - // Label records should always be 1, my example didn't included it, so we won't. - dtmPdsLabel.deleteKeyword("LABEL_RECORDS"); - - // Delete or change unneeded keywords in image object - PvlObject &image = dtmPdsLabel.findObject("IMAGE"); - image.findKeyword("CORE_NULL").setName("MISSING_CONSTANT"); - image.deleteKeyword("BAND_STORAGE_TYPE"); - image.deleteKeyword("CORE_LOW_REPR_SATURATION"); - image.deleteKeyword("CORE_LOW_INSTR_SATURATION"); - image.deleteKeyword("CORE_HIGH_REPR_SATURATION"); - image.deleteKeyword("CORE_HIGH_INSTR_SATURATION"); - - // Create statistics and add to image group - Statistics *stat = inCube->statistics(); - image.addKeyword(PvlKeyword("VALID_MINIMUM", toString(stat->Minimum()))); - image.addKeyword(PvlKeyword("VALID_MAXIMUM", toString(stat->Maximum()))); - - // delete unneeded keywords in map object - mappingObject.deleteKeyword("FIRST_STANDARD_PARALLEL"); - mappingObject.deleteKeyword("SECOND_STANDARD_PARALLEL"); - -} - - -/* - * For orthorectified images, - * PRODUCT_ID = mSP_xxxxxx_xxxx_ccc_s_nn_ORTHO - * m is the map projection code - * E for equirectangular - * P for polar stereographic - * xxxxx_xxxx is the HiRISE source observation ID (mission phase orbit number target code) - * ccc is the color content - * RED for visible red, 1 band images - * IRB for 3 band enhanced color images (IR, RED, or BG) - * s is the grid spacing (i.e. map scale) code - * A for 0.25 m - * B for 0.5 m - * C for 1.0 m - * D for 2.0 m - * nn is the sequence number to distinguish between ortho rectified images - * from the same HiRISE observation that may be created from different DTMs - * ORTHO indicates that the image has been orthorectified - * - * For DTMs, - * PRODUCT_ID = DTems_xxxxxx_xxxx_xxxxxx_xxxx_vnn - * e is the code for the type of elevation data - * E for areoid elevations - * R for radii - * (hidtmgen does not currently support this option) - * m is the map projection code - * E for equirectangular - * P for polar stereographic - * s is the grid spacing (i.e. map scale) code - * A for 0.25 m - * B for 0.5 m - * C for 1.0 m - * D for 2.0 m - * xxxxx_xxxx_xxxxx_xxxx is the HiRISE source observation ID for the stereo pairs - * v is the code for the producing institution - * U for USGS - * A for University of Arizona - * C for CalTech - * N for NASA Ames - * J for JPL - * O for Ohio State - * Z for other - * nn is the 2 digit product version ID number - */ diff --git a/isis/src/mro/apps/hidtmgen/tsts/Makefile b/isis/src/mro/apps/hidtmgen/tsts/Makefile deleted file mode 100644 index 46d84c74c2..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -BLANKS = "%-6s" -LENGTH = "%-40s" - -include $(ISISROOT)/make/isismake.tststree diff --git a/isis/src/mro/apps/hidtmgen/tsts/color/Makefile b/isis/src/mro/apps/hidtmgen/tsts/color/Makefile deleted file mode 100644 index b7510615e2..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/color/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/ESP*.cub > $(OUTPUT)/orthoInputList.txt; - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042753_1930_IRB_B_26_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_B_26_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042753_1930_IRB_D_59_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_D_59_ORTHO.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042753_1930_IRB_B_26_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_B_26_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042753_1930_IRB_D_59_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_D_59_ORTHO.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042753_1930_IRB_B_26_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042753_1930_IRB_D_59_ORTHO.IMG; - $(RM) $(OUTPUT)/orthoInputList.txt; - diff --git a/isis/src/mro/apps/hidtmgen/tsts/dtmOnly/Makefile b/isis/src/mro/apps/hidtmgen/tsts/dtmOnly/Makefile deleted file mode 100644 index a2d27fb6ce..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/dtmOnly/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - PARAMSPVL=$(INPUT)/dtmParams.pvl \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A15.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A15.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A15.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A15.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A15.IMG; - diff --git a/isis/src/mro/apps/hidtmgen/tsts/equi/Makefile b/isis/src/mro/apps/hidtmgen/tsts/equi/Makefile deleted file mode 100644 index 9bb01cedcc..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/equi/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/PSP*.cub > $(OUTPUT)/orthoInputList.txt; - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/DTM_Zumba_1m_forPDS.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEEC_002118_1510_003608_1510_A02.IMG \ - to=$(OUTPUT)/DTEEC_002118_1510_003608_1510_A02.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_002118_1510_RED_C_01_ORTHO.IMG \ - to=$(OUTPUT)/PSP_002118_1510_RED_C_01_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_002118_1510_RED_A_02_ORTHO.IMG \ - to=$(OUTPUT)/PSP_002118_1510_RED_A_02_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_003608_1510_RED_C_03_ORTHO.IMG \ - to=$(OUTPUT)/PSP_003608_1510_RED_C_03_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_003608_1510_RED_A_04_ORTHO.IMG \ - to=$(OUTPUT)/PSP_003608_1510_RED_A_04_ORTHO.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEEC_002118_1510_003608_1510_A02.IMG \ - to=$(OUTPUT)/DTEEC_002118_1510_003608_1510_A02.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_002118_1510_RED_C_01_ORTHO.IMG \ - to=$(OUTPUT)/PSP_002118_1510_RED_C_01_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_002118_1510_RED_A_02_ORTHO.IMG \ - to=$(OUTPUT)/PSP_002118_1510_RED_A_02_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_003608_1510_RED_C_03_ORTHO.IMG \ - to=$(OUTPUT)/PSP_003608_1510_RED_C_03_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_003608_1510_RED_A_04_ORTHO.IMG \ - to=$(OUTPUT)/PSP_003608_1510_RED_A_04_ORTHO.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEEC_002118_1510_003608_1510_A02.IMG; - $(RM) $(OUTPUT)/PSP_002118_1510_RED_C_01_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_002118_1510_RED_A_02_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_003608_1510_RED_C_03_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_003608_1510_RED_A_04_ORTHO.IMG; - $(RM) $(OUTPUT)/orthoInputList.txt; - diff --git a/isis/src/mro/apps/hidtmgen/tsts/errors/Makefile b/isis/src/mro/apps/hidtmgen/tsts/errors/Makefile deleted file mode 100644 index bb8e5b30a6..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/errors/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - # no input data - echo -e "Error Test: no DTM or orthos given" > $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # empty ortho given - echo -e "\nError Test: given ORTHOFROMLIST is empty" >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(INPUT)/empty.lis \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - $(LS) $(INPUT)/ESP*cub > $(OUTPUT)/orthoInputList.txt; - - # given DTM is not a DTM - echo -e "\nError Test: given DTM is not a DTM" >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/ESP_042252_1930_3-BAND_COLOR_2m_o_croppedForTest.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given DTM is not a supported projection - echo -e "\nError Test: given DTM is not not a supported projection" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/molaMarsPlanetaryRadius0005.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given sequence list size doesn't match ortho list size - echo -e "\nError Test: given sequence list size doesn't match ortho list size" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers2.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given ortho to list size doesn't match ortho from list size - echo -e "\nError Test: given ortho to list size doesn't match from list size" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=FALSE \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - DTM_PRODUCT_ID=xyz \ - DTMTO=$(OUTPUT)/xyz.IMG \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOTOLIST=$(INPUT)/sequenceNumbers2.txt \ - ORTHOPRODUCTIDLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given ortho product id list size doesn't match ortho from list size - echo -e "\nError Test: given ortho product ID list size doesn't match from list size" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=FALSE \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - DTM_PRODUCT_ID=xyz \ - DTMTO=$(OUTPUT)/xyz.IMG \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOTOLIST=$(INPUT)/sequenceNumbers1.txt \ - ORTHOPRODUCTIDLIST=$(INPUT)/sequenceNumbers2.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given PARAMSPVL has invalid producing institution - echo -e "\nError Test: given PARAMSPVL has invalid producing institution" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/invalidProducingInstitution.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given PARAMSPVL has invalid version - echo -e "\nError Test: given PARAMSPVL has invalid version" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/invalidVersionId.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given ORTHOFROMLIST cube has invalid band size - echo -e "\nError Test: given DTM has invalid band size" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/DTM_2Bands.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers1.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - # given ORTHOFROMLIST cube has invalid band size - $(LS) $(INPUT)/2Band*cub >> $(OUTPUT)/orthoInputList.txt; - echo -e "\nError Test: given ORTHOFROMLIST cube has invalid band size" \ - >> $(OUTPUT)/error_temp.txt; - if [[ `$(APPNAME) \ - DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers2.txt \ - 2>> $(OUTPUT)/error_temp.txt \ - > /dev/null` ]]; \ - then \ - true; \ - fi; - - $(SED) 's+\[/.*/input/+\[input/+' $(OUTPUT)/error_temp.txt > $(OUTPUT)/error.txt; - $(RM) $(OUTPUT)/error_temp.txt; - $(RM) $(OUTPUT)/orthoInputList.txt; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_09_ORTHO.IMG; - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A04.IMG; - $(RM) $(OUTPUT)/xyz.IMG; diff --git a/isis/src/mro/apps/hidtmgen/tsts/nonDefaultNames/Makefile b/isis/src/mro/apps/hidtmgen/tsts/nonDefaultNames/Makefile deleted file mode 100644 index e6b82a5a4e..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/nonDefaultNames/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is meant to test the functionality of the application withregards -# to non standard names. The labels are really the important part, details -# such as quoting. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/PSP*.cub > $(OUTPUT)/orthoInputList.txt; - echo $(OUTPUT)/ORTHO1.IMG > $(OUTPUT)/orthoOutputList.txt; - echo $(OUTPUT)/ORTHO2.IMG >> $(OUTPUT)/orthoOutputList.txt; - echo $(OUTPUT)/ORTHO3.IMG >> $(OUTPUT)/orthoOutputList.txt; - echo $(OUTPUT)/ORTHO4.IMG >> $(OUTPUT)/orthoOutputList.txt; - $(APPNAME) DEFAULTNAMES=FALSE \ - DTM=$(INPUT)/DTM_Zumba_1m_forPDS.cub \ - DTMTO=$(OUTPUT)/DTM.IMG \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - ORTHOTOLIST=$(OUTPUT)/orthoOutputList.txt \ - ORTHOPRODUCTIDLIST=$(INPUT)/orthoOutputProductIds.lis \ - PARAMSPVL=$(INPUT)/parameters.pvl \ - DTM_PRODUCT_ID=DtmProduct \ - > /dev/null; - - catlab from=$(OUTPUT)/DTM.IMG \ - to=$(OUTPUT)/DTM.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ORTHO1.IMG \ - to=$(OUTPUT)/ORTHO1.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ORTHO2.IMG \ - to=$(OUTPUT)/ORTHO2.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ORTHO3.IMG \ - to=$(OUTPUT)/ORTHO3.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ORTHO4.IMG \ - to=$(OUTPUT)/ORTHO4.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTM.IMG \ - to=$(OUTPUT)/DTM.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ORTHO1.IMG \ - to=$(OUTPUT)/ORTHO1.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ORTHO2.IMG \ - to=$(OUTPUT)/ORTHO2.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ORTHO3.IMG \ - to=$(OUTPUT)/ORTHO3.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ORTHO4.IMG \ - to=$(OUTPUT)/ORTHO4.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTM.IMG; - $(RM) $(OUTPUT)/ORTHO1.IMG; - $(RM) $(OUTPUT)/ORTHO2.IMG; - $(RM) $(OUTPUT)/ORTHO3.IMG; - $(RM) $(OUTPUT)/ORTHO4.IMG; - $(RM) $(OUTPUT)/orthoInputList.txt; - $(RM) $(OUTPUT)/orthoOutputList.txt; - diff --git a/isis/src/mro/apps/hidtmgen/tsts/orthoOnly/Makefile b/isis/src/mro/apps/hidtmgen/tsts/orthoOnly/Makefile deleted file mode 100644 index 2240621d6a..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/orthoOnly/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/*.cub > $(OUTPUT)/orthoFromList.txt; - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - ORTHOFROMLIST=$(OUTPUT)/orthoFromList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - > /dev/null; - - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_B_23_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_23_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_D_01_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_01_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042753_1930_IRB_B_67_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_B_67_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042753_1930_IRB_D_45_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042753_1930_IRB_D_45_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_009404_2635_RED_A_98_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_A_98_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_009404_2635_RED_C_89_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_C_89_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_010221_2635_RED_A_54_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_A_54_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_010221_2635_RED_C_76_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_C_76_ORTHO.pvl \ - > /dev/null; - - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_B_23_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_01_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042753_1930_IRB_B_67_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042753_1930_IRB_D_45_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_009404_2635_RED_A_98_ORTHO.IMG - $(RM) $(OUTPUT)/PSP_009404_2635_RED_C_89_ORTHO.IMG - $(RM) $(OUTPUT)/PSP_010221_2635_RED_A_54_ORTHO.IMG - $(RM) $(OUTPUT)/PSP_010221_2635_RED_C_76_ORTHO.IMG - $(RM) $(OUTPUT)/orthoFromList.txt; - diff --git a/isis/src/mro/apps/hidtmgen/tsts/outputTypes/Makefile b/isis/src/mro/apps/hidtmgen/tsts/outputTypes/Makefile deleted file mode 100644 index e0803e7781..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/outputTypes/Makefile +++ /dev/null @@ -1,133 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -# -# This test is testing an equitorial projection, of primary importance is the -# labels and details such as quoting on keywords, the standard for the output -# is very specific. - -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/ESP*.cub > $(OUTPUT)/orthoInputList.txt; - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - ENDIAN=MSB \ - NULL=FALSE \ - LIS=TRUE \ - LRS=TRUE \ - HIS=TRUE \ - HRS=TRUE \ - DTMBITTYPE=8BIT \ - ORTHOBITTYPE=32BIT \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31_MSB_8BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_MSB_32BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_MSB_32BIT.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A31_MSB_8BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_MSB_32BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_MSB_32BIT.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A31.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG; - - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params2.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - DTMBITTYPE=U16BIT \ - ORTHOBITTYPE=S16BIT \ - NULL=TRUE \ - LIS=TRUE \ - LRS=TRUE \ - HIS=TRUE \ - HRS=TRUE \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07_U16BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_S16BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_S16BIT.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07_U16BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_S16BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_S16BIT.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG; - - $(APPNAME) DEFAULTNAMES=TRUE \ - OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Ares4_Marth_Crater_3557E_126N_ngate_03.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - PARAMSPVL=$(INPUT)/params2.pvl \ - ORTHOSEQUENCENUMBERLIST=$(INPUT)/sequenceNumbers.txt \ - DTMBITTYPE=S16BIT \ - ORTHOBITTYPE=U16BIT \ - NULL=FALSE \ - LIS=FALSE \ - LRS=FALSE \ - HIS=FALSE \ - HRS=FALSE \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07_S16BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_U16BIT.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_U16BIT.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG \ - to=$(OUTPUT)/DTEED_042252_1930_042753_1930_A07_S16BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO_U16BIT.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG \ - to=$(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO_U16BIT.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEED_042252_1930_042753_1930_A07.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_B_41_ORTHO.IMG; - $(RM) $(OUTPUT)/ESP_042252_1930_IRB_D_31_ORTHO.IMG; - $(RM) $(OUTPUT)/orthoInputList.txt; diff --git a/isis/src/mro/apps/hidtmgen/tsts/polar/Makefile b/isis/src/mro/apps/hidtmgen/tsts/polar/Makefile deleted file mode 100644 index a83a937417..0000000000 --- a/isis/src/mro/apps/hidtmgen/tsts/polar/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Please note, the input data was reduced from its original size, in doing so -# the Scale and PixelResolution was changed, for the purpose of testing it -# needed to be the original values, so, the values were edited. This means -# the values for those two keywords are incorrect. -APPNAME = hidtmgen - -include $(ISISROOT)/make/isismake.tsts - -commands: - $(LS) $(INPUT)/PSP*.cub > $(OUTPUT)/orthoInputList.txt; - echo "1" > $(OUTPUT)/sequence.txt; - echo "2" >> $(OUTPUT)/sequence.txt; - echo "3" >> $(OUTPUT)/sequence.txt; - echo "4" >> $(OUTPUT)/sequence.txt; - $(APPNAME) OUTPUTDIR=$(OUTPUT) \ - DTM=$(INPUT)/Polar_Crater_1_1m_ngate_edited2_forPDS.cub \ - ORTHOFROMLIST=$(OUTPUT)/orthoInputList.txt \ - ORTHOSEQUENCE=$(OUTPUT)/sequence.txt \ - PARAMSPVL=$(INPUT)/parameters.pvl \ - > /dev/null; - - catlab from=$(OUTPUT)/DTEPC_009404_2635_010221_2635_Z12.IMG \ - to=$(OUTPUT)/DTEPC_009404_2635_010221_2635_Z12.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_009404_2635_RED_C_1_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_C_1_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_009404_2635_RED_A_2_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_A_2_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_010221_2635_RED_C_3_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_C_3_ORTHO.pvl \ - > /dev/null; - catlab from=$(OUTPUT)/PSP_010221_2635_RED_A_4_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_A_4_ORTHO.pvl \ - > /dev/null; - - pds2isis from=$(OUTPUT)/DTEPC_009404_2635_010221_2635_Z12.IMG \ - to=$(OUTPUT)/DTEPC_009404_2635_010221_2635_Z12.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_009404_2635_RED_C_1_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_C_1_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_009404_2635_RED_A_2_ORTHO.IMG \ - to=$(OUTPUT)/PSP_009404_2635_RED_A_2_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_010221_2635_RED_C_3_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_C_3_ORTHO.cub \ - > /dev/null; - pds2isis from=$(OUTPUT)/PSP_010221_2635_RED_A_4_ORTHO.IMG \ - to=$(OUTPUT)/PSP_010221_2635_RED_A_4_ORTHO.cub \ - > /dev/null; - - $(RM) $(OUTPUT)/DTEPC_009404_2635_010221_2635_Z12.IMG; - $(RM) $(OUTPUT)/PSP_009404_2635_RED_C_1_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_009404_2635_RED_A_2_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_010221_2635_RED_C_3_ORTHO.IMG; - $(RM) $(OUTPUT)/PSP_010221_2635_RED_A_4_ORTHO.IMG; - $(RM) $(OUTPUT)/orthoInputList.txt; - $(RM) $(OUTPUT)/sequence.txt; - diff --git a/isis/tests/data/hidtmgen/color/orthoInputList.txt b/isis/tests/data/hidtmgen/color/orthoInputList.txt new file mode 100644 index 0000000000..8013991ee4 --- /dev/null +++ b/isis/tests/data/hidtmgen/color/orthoInputList.txt @@ -0,0 +1,2 @@ +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_50cm_o_cropped.cub diff --git a/isis/tests/data/hidtmgen/color/params.pvl b/isis/tests/data/hidtmgen/color/params.pvl new file mode 100644 index 0000000000..48abc7486b --- /dev/null +++ b/isis/tests/data/hidtmgen/color/params.pvl @@ -0,0 +1,12 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "0.314" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "A" +RATIONALE_DESC = "" +DTM_SOURCE_PRODUCT_ID = (ESP_042252_1930, ESP_042753_1930) +ORTHO_SOURCE_DTM_ID = dtmID +END diff --git a/isis/tests/data/hidtmgen/color/sequenceNumbers.txt b/isis/tests/data/hidtmgen/color/sequenceNumbers.txt new file mode 100644 index 0000000000..bb5cf8eceb --- /dev/null +++ b/isis/tests/data/hidtmgen/color/sequenceNumbers.txt @@ -0,0 +1,2 @@ +31 +41 diff --git a/isis/tests/data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub b/isis/tests/data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub new file mode 100644 index 0000000000000000000000000000000000000000..a4dc4a7c15cf3a4486019141c41359bb9c74aef2 GIT binary patch literal 70813 zcmeI$eT*Ds9S3kDe;5yA6yqO+#5~qN_@mzL%+9{HEOBpdd$+J}+1;zxn0T4JeR?-_ zc4j&=OIu@v1V~6UCSnY}p%RrpcnN4gEGP~7h^5eCY_CL$ylAT^8pQ;JV8q`uv%9x* zJ?XU^f0%q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Z;$R{hp^HD39xO(~Q3zrMOw%X?1b zI`2C4_Uh3pkEO_U`j0gGY>NM5udavHssGWJ*Z)O9s~_I$;$cs6z(( znzzg=D&5;e(W28a_R*~W5322k2><{9 literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/dtm/DTM_2Bands_cropped.cub b/isis/tests/data/hidtmgen/dtm/DTM_2Bands_cropped.cub new file mode 100644 index 0000000000000000000000000000000000000000..63fc5a96a9999923d10e22532b8b30b6b99aea07 GIT binary patch literal 76214 zcmeI0d301&p2uCf#};TEZCu*c@ip3_!=zGcQb}8CB`Kin%3@N{#v>D7QjhSUHr{&$ zcu;5$wocFB;E39y(&8w3>~RHT50K=Wm=KU`l@LgRAlZO%8Fy`U?t8B)3-BO1@sBy@ zR|ifi_x^sr`@5g}y}x^J@=NCkWeVrwys{`~$4Z599G9PL%Z^Cu?;Ka8@RE{sk0P+| zE-uaCu%&D5QzKG{S5ynN-7f}pbM;FRABqMAnKfI|G+VXNCx%&*YHN3l(^{uVkyw=d zo+E~Yuq;NxvewLoJkg)yMtEyua#?&hpa-;Sex7ikL<>1GdV#o52qq)@?}@7OP(LoN zP~d}!5!LzSO94Sr+kJ9rvYD5M%*`fqqB%DfRK#ddWaey&iRPip_&NG*f zM#XTs7NkImsPNgO^Z1ZHhKuvei-{6z<-_H%ATMc#*+N(mBwr+4E-JBrX355MCX?~= zQn{cE#?U90%S-x%SwLQiNFpCB)gt&dlk8Mi(!2Z zwltk~t{4_Wu~2eEz0+bf*&XH#yCuzRw>mSlD7pN?QyMz0&NRE-nPGR@ZMtD1;xMEx z&gO8K(wt^XdRm5kM7WczoaS_!&F0i&6-T3NafDe4+b&^2`aMgJt&Z7lv6)Y%c7pK? z%{V>H>^Rv}6K$a&M}jd`Bl@gI*ri5QUF%C%RK^FBI#o^Chh<@LnjH2FTZY4IPfN3K zH);-YYCtHL1VML9h%2$02}fO8Lvm&~k_vVQqqF%$rQkU2x8z>coYiq{Y3cf=*SeGY zcCg!G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v$ zzHGJ-(E17r^9%g$EcM~y;uI;S-pxj#4e|8Su$t1+%ucRUP}|@zvYVfI6t7s_((1Q3G9C6zi=B;gDz(UBaK0e%frx2= zWKzd8l}F|?+f%)1=PW4Y%jOE|ZaU?owuoV#tG)>W;(Rd>FUc%F_EOhY$(HIZ@)p@rOJia%aN0jS=)+shev38JYR$A89Y)3Bx#7qH z_2@p;A`Omiv`S-o9Od|POSI*Xht>FG{bj4>;!@AZgk8r1yuzode_UX<5W%# Y|Bt6qc5#+BJ3Bw`_C#k literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/dtm/DTM_Zumba_1m_forPDS_lowres.cub b/isis/tests/data/hidtmgen/dtm/DTM_Zumba_1m_forPDS_lowres.cub new file mode 100644 index 0000000000000000000000000000000000000000..adb45ea84ad0d8b19501c266b93850823b9661d9 GIT binary patch literal 71659 zcmeI$TW{Mq760L5mu;O)>c1JADK6E; ztrGOT#p*%eH%$B6Os=`o5xPB!6C19-%=mhfh@6^jsBRm?DYfWO&pk06T*|E2(BIv7 zEz&&B(%dxDh<8qB?C4}OBD>(}()Q`&qoo(~5NL0K@VhV3DciX%lo-zI1I_kNUmpSB{O`NVwCli@z zdb;KjU)wQStoNyiCAIQ&RU}-Rz>Y|jkb^8;#j04ENCNcg)$q(5kGNb3wd=%Q*^o8*|zft#`d$9wq%yf=CCkao5 z$`&+Z881wqyLorbh0*1b*d)ti6@L~zo~t`i*_y|xy#~K-xrcEYuZwj#qCHsgn$>2| z3>%IYIId$UhWzWpk%8-mjb_vF!!zFuSoV3KYEhdFr|CL%o3v$rccL0q$2n^_p>Naf zYO|sHBR(p6UQ!`{rwO)L<;=N{b|>9*uXdk!m3Xqs#DIHeAHU&W$OG@UM2B8u07=DUxKT<6^J z&K*6}yDV2DP64}5i!Fsv)i1KDN35>0&lGl*3wbweJrIzDQE)v^}eM8f%-iubh;g zMt!ZMoQgHy`A~3~m{+sjq&MyKMp65cGO@+p z@+21~C#Jo2_icZ$&8(wCloh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#41^Kd6piY?=(dISV zm`#>;U!6_z5@D9eCogMHi`2MxxDlS&h?i-+7AmD<2Ysd{CfROmLPDvtDh*Sr_u{Nf zXR#>lPiYq&O?sYL{X(w7SRaBIb9-Jt={=N=eJz^sKOlPjJ05LBzGuEp86mMm#`?HSOW_Y*{SH^K!?@9B zeKv23M?RN+nYSk{o+=21U+%!;p4Wd@%z*aap1a5v&)Mj=d3kuG6J8$f!SHSG*7b@L zo<8fEyn6G|;h}fm&uHQe=f(5XWvd_zBEcm!IulfV_U1}a#b*cAYS99DS`qbWBQ$QEu(@sPx;NcrLUA^fk z#n+dF^5ExA=+`j%Smx82*Spp)Ffj6diV*OS~@AvvWw|aW@I`PRfR=xr+ zsgK!UQLae`fzx|s5G6bHosPfT$K#KM=B#Hz`0!Y0We2>6r@_4V$DRiNYEQ0LoQlOv zkZb0<7`yZR?_%tR-jr=U^^n6&=?jbO3z_O@F#hIPGItyO5yfBhN#@kIFXiZT{p2?=A-v6Mj_;1Ch*b&Wg)n(PQYIJ1v zx#Cs*T0_S;kydHPq=({U^7WIF($_&kf0>rt1?%taXhqet)U qNp^6h{eJ4+dZX!tZd`qWP@?f(bZm1?~J literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/dtmOnly/params.pvl b/isis/tests/data/hidtmgen/dtmOnly/params.pvl new file mode 100644 index 0000000000..411e7794d4 --- /dev/null +++ b/isis/tests/data/hidtmgen/dtmOnly/params.pvl @@ -0,0 +1,12 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "1.5" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "A" +RATIONALE_DESC = "" +DTM_SOURCE_PRODUCT_ID = (ESP_042252_1930, ESP_042753_1930) +ORTHO_SOURCE_DTM_ID = dtmID +END diff --git a/isis/tests/data/hidtmgen/equi/orthoInputList.txt b/isis/tests/data/hidtmgen/equi/orthoInputList.txt new file mode 100644 index 0000000000..9ec35944c0 --- /dev/null +++ b/isis/tests/data/hidtmgen/equi/orthoInputList.txt @@ -0,0 +1,2 @@ +data/hidtmgen/ortho/PSP_002118_1510_1m_o_forPDS_cropped.cub +data/hidtmgen/ortho/PSP_002118_1510_25cm_o_forPDS_cropped.cub diff --git a/isis/tests/data/hidtmgen/equi/params.pvl b/isis/tests/data/hidtmgen/equi/params.pvl new file mode 100644 index 0000000000..de30a25ee0 --- /dev/null +++ b/isis/tests/data/hidtmgen/equi/params.pvl @@ -0,0 +1,11 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "2.0" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "A" +RATIONALE_DESC = "Equi test" +DTM_SOURCE_PRODUCT_ID = (PSP_002118_1510, PSP_003608_1510) +END diff --git a/isis/tests/data/hidtmgen/equi/sequenceNumbers.txt b/isis/tests/data/hidtmgen/equi/sequenceNumbers.txt new file mode 100644 index 0000000000..a0c0404ff2 --- /dev/null +++ b/isis/tests/data/hidtmgen/equi/sequenceNumbers.txt @@ -0,0 +1,2 @@ +01 +02 diff --git a/isis/tests/data/hidtmgen/error/invalidProducingInst.pvl b/isis/tests/data/hidtmgen/error/invalidProducingInst.pvl new file mode 100644 index 0000000000..eca722d4e9 --- /dev/null +++ b/isis/tests/data/hidtmgen/error/invalidProducingInst.pvl @@ -0,0 +1,12 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "0.314" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "USGS" +RATIONALE_DESC = "" +DTM_SOURCE_PRODUCT_ID = (ESP_042252_1930, ESP_042753_1930) +ORTHO_SOURCE_DTM_ID = dtmID +END diff --git a/isis/tests/data/hidtmgen/error/invalidVersionId.pvl b/isis/tests/data/hidtmgen/error/invalidVersionId.pvl new file mode 100644 index 0000000000..e080e6e2d1 --- /dev/null +++ b/isis/tests/data/hidtmgen/error/invalidVersionId.pvl @@ -0,0 +1,14 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "-4" +PRODUCT_VERSION_ID = NULL +PRODUCT_VERSION_ID = "4" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "A" +RATIONALE_DESC = "Testing invalid version ID" +DTM_SOURCE_PRODUCT_ID = (ESP_042252_1930, ESP_042753_1930) +ORTHO_SOURCE_DTM_ID = dtmID +END diff --git a/isis/tests/data/hidtmgen/error/orthoInputList2Bands.txt b/isis/tests/data/hidtmgen/error/orthoInputList2Bands.txt new file mode 100644 index 0000000000..22f47c086a --- /dev/null +++ b/isis/tests/data/hidtmgen/error/orthoInputList2Bands.txt @@ -0,0 +1 @@ +data/hidtmgen/ortho/2BandImage.cub diff --git a/isis/tests/data/hidtmgen/error/orthoInputList2Item.txt b/isis/tests/data/hidtmgen/error/orthoInputList2Item.txt new file mode 100644 index 0000000000..8013991ee4 --- /dev/null +++ b/isis/tests/data/hidtmgen/error/orthoInputList2Item.txt @@ -0,0 +1,2 @@ +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_50cm_o_cropped.cub diff --git a/isis/tests/data/hidtmgen/error/orthoInputListEmpty.txt b/isis/tests/data/hidtmgen/error/orthoInputListEmpty.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/isis/tests/data/hidtmgen/error/orthoOutputFiles.lis b/isis/tests/data/hidtmgen/error/orthoOutputFiles.lis new file mode 100644 index 0000000000..965fbf681b --- /dev/null +++ b/isis/tests/data/hidtmgen/error/orthoOutputFiles.lis @@ -0,0 +1,2 @@ +ORTHO1.IMG +ORTHO2.IMG diff --git a/isis/tests/data/hidtmgen/error/orthoProdList3Item.txt b/isis/tests/data/hidtmgen/error/orthoProdList3Item.txt new file mode 100644 index 0000000000..c739c69b1d --- /dev/null +++ b/isis/tests/data/hidtmgen/error/orthoProdList3Item.txt @@ -0,0 +1,3 @@ +Ortho1Product +Ortho2Product +Ortho3Product diff --git a/isis/tests/data/hidtmgen/error/orthoToList1Item.txt b/isis/tests/data/hidtmgen/error/orthoToList1Item.txt new file mode 100644 index 0000000000..cf7b6b42a0 --- /dev/null +++ b/isis/tests/data/hidtmgen/error/orthoToList1Item.txt @@ -0,0 +1 @@ +ORTHO1.IMG diff --git a/isis/tests/data/hidtmgen/error/params.pvl b/isis/tests/data/hidtmgen/error/params.pvl new file mode 100644 index 0000000000..48abc7486b --- /dev/null +++ b/isis/tests/data/hidtmgen/error/params.pvl @@ -0,0 +1,12 @@ +DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" +DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" +PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" +PRODUCER_ID = "UA" +PRODUCER_FULL_NAME = "ALFRED MCEWEN" +PRODUCT_VERSION_ID = "0.314" +SOFTWARE_NAME = "Socet_Set 5.4.1" +PRODUCING_INSTITUTION = "A" +RATIONALE_DESC = "" +DTM_SOURCE_PRODUCT_ID = (ESP_042252_1930, ESP_042753_1930) +ORTHO_SOURCE_DTM_ID = dtmID +END diff --git a/isis/tests/data/hidtmgen/error/sequenceNumbers1item.txt b/isis/tests/data/hidtmgen/error/sequenceNumbers1item.txt new file mode 100644 index 0000000000..e85087affd --- /dev/null +++ b/isis/tests/data/hidtmgen/error/sequenceNumbers1item.txt @@ -0,0 +1 @@ +31 diff --git a/isis/tests/data/hidtmgen/error/sequenceNumbers2item.txt b/isis/tests/data/hidtmgen/error/sequenceNumbers2item.txt new file mode 100644 index 0000000000..bb5cf8eceb --- /dev/null +++ b/isis/tests/data/hidtmgen/error/sequenceNumbers2item.txt @@ -0,0 +1,2 @@ +31 +41 diff --git a/isis/tests/data/hidtmgen/nonDefaultNames/orthoInputList.txt b/isis/tests/data/hidtmgen/nonDefaultNames/orthoInputList.txt new file mode 100644 index 0000000000..8013991ee4 --- /dev/null +++ b/isis/tests/data/hidtmgen/nonDefaultNames/orthoInputList.txt @@ -0,0 +1,2 @@ +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub +data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_50cm_o_cropped.cub diff --git a/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputFiles.lis b/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputFiles.lis new file mode 100644 index 0000000000..965fbf681b --- /dev/null +++ b/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputFiles.lis @@ -0,0 +1,2 @@ +ORTHO1.IMG +ORTHO2.IMG diff --git a/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputProductIds.lis b/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputProductIds.lis new file mode 100644 index 0000000000..154473caa6 --- /dev/null +++ b/isis/tests/data/hidtmgen/nonDefaultNames/orthoOutputProductIds.lis @@ -0,0 +1,2 @@ +Ortho1Product +Ortho2Product diff --git a/isis/tests/data/hidtmgen/nonDefaultNames/params.pvl b/isis/tests/data/hidtmgen/nonDefaultNames/params.pvl new file mode 100644 index 0000000000..febef8712a --- /dev/null +++ b/isis/tests/data/hidtmgen/nonDefaultNames/params.pvl @@ -0,0 +1,11 @@ +DATA_SET_ID = "DataSetIdFromParamsPvl" +DATA_SET_NAME = "Data Set Name From PARAMSPVL" +PRODUCER_INSTITUTION_NAME = "Producer Institution Name from PARAMSPVL" +PRODUCER_ID = "Producer Id from PARAMSPVL" +PRODUCER_FULL_NAME = "Producer Full Name from PARAMSPVL" +PRODUCING_INSTITUTION = "Z" +PRODUCT_VERSION_ID = "3.14" +RATIONALE_DESC = "Test DefaultNames=false" +SOFTWARE_NAME = "Software Name from PARAMSPVL" +DTM_SOURCE_PRODUCT_ID = (PSP_002118_1510, PSP_003608_1510) +END diff --git a/isis/tests/data/hidtmgen/ortho/2BandImage.cub b/isis/tests/data/hidtmgen/ortho/2BandImage.cub new file mode 100644 index 0000000000000000000000000000000000000000..718dbb96fb671f2aa5aeb96a043d6649eda7a543 GIT binary patch literal 75593 zcmeI0U2oeu5{CCWzk=w^UKCdJ<*(p)0Vj46)V0bMNEeNrZ*x+4n^4L;YIpfhJu?Vx=~h z&#WFt=}M%kzn?9NW}fYa*_PQ9V}ordgCq>dyv3ZndAAJ4)UzR~)>Q0wz>_41*4pEykLY6+v1_wMf z8z+Zc#%aLA310jR)u-R^k8BM3-S`D}6 zIbNgY+f5^b0e|{|VZ(Nsexv3!n|iv!;~vr$^Qu*=)^Hr(_w7d0Glsdx1BPyutn6C7 zp$#9BgpNo&N_u%Bk^V)Cq%*R8$MgM~Rcltg#zDi6+OS@;iL%wK`;B_jGlp8c6OqN? zR%yiS+O=$#4#RJ{b=P+N;`lBTrF3(M(Dqdb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-K{K;_Fx*3-+nLMZ4J~}<@bc@86vD2*A^7g}n<5jEf zt6Hvam-7cN+sFHN;rcs21czD)6e$_$q@yV+7^;x%QeAIgQacgIIb)Ex#roR<3efDfE zSI4z2_wpS&{X^8M^}M}V)zI$b{GHWW-NsPgORZQt!oI_jor>^=WMTY+-tvrT3g1C=D@M?M`xY({*MQT zcj|le=(K%swpOqn@i}b3sJy5c=vVixy~!{R4;}>RuxhE$H58|xuRiw=UjHWJZZko- zt7!dyWaJM%qg0e)VCr4^hX}RY+^keK%RA`r-z3!UX{+t4E93c*IUe_i*UydX+&^Kg z?mNo>Gi%@&qqpB6+fSS3$}f-F4~_0Ae?50bmzL|`=s*E;B^4f9C;;YIs^97Bc%@D# zV%55L0!utNZufFM4@`G3(gzvj*zOfQ;J+;c=VNKNxwBK-scX!5d~*D1^&GBTtCcF% zW~I@rX=nP3&}{2!a;dk?r-imUyS0SsdVhT4?1spyID_v4zSs@(p1rzBQ#-rMUFynXoU zP)+-6nZA^sgYY`iE}G1T|6yFL9*3^I2AV&Yncb=7xA_E*U7X)%=^>*9fu zo{m4qyZGsTR}1NfmyluCdOxv-Zr>dIaOhn8&~{z(@|~sM@d5qps2KbBxZ)vCU5Rd!$0^abI2so^ZYi2l(RuC3n?+3y{p;(}}r{ewF=jzwGpOh+;CQdl_$o;M0Qk7& Zc>SB;It?u!rD=QYo*v|H0>9^u{|jK=%U1vZ literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/ortho/PSP_002118_1510_25cm_o_forPDS_cropped.cub b/isis/tests/data/hidtmgen/ortho/PSP_002118_1510_25cm_o_forPDS_cropped.cub new file mode 100644 index 0000000000000000000000000000000000000000..8bc8706204787e3003ef3a7497b91d68496badc2 GIT binary patch literal 73770 zcmeI1TXPyomdAPar>OADJUE1^Kp@Z#8-XQk6N4mH;GXW@o|a2cmdXYS)di^gmExv* z_t@RNvAsKci`dwGn2$Ios|32(YFj<+iJ6I0l4X>6&dJPQ{_|vJX?yP#*N~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gWpZouDm3+}gtilLiG&qr#wHvmI^?JmORPijZFZl#SAP5$mEA~;1?v4W zOG=00VmmKZo^J1y>(8QdLxC!OR@#BA2xus3b9-YUGZ2o{U|VsPtku?w*K#D2r0G1J z%dh5F$TTFaVEqBzeMFMGhwgr6 zg1fiw@@sTzEln7GD&2ju1osh2`uogqptMw+jsNTvM-F~)S0Q=lzI*9kq14t7*v>w8 zxm*59q5u-r6$Nt7gEV)~%yv(CLH2mR$F3x^ohBjE-3fW#ipnwmbxKh_&pG1k{=byS>vSND~R`ou!9KE<$ZYZJ%qao^xPh67N zSl(kLZW&J1((dCzHQhzf5L{28%nB*n!XnWr`B4LwH9PzXMz@*UGi@@}9!C znm_sG@3Q$^ompLjEB>AN>v`vO2ma;*1A5;JzeVd%|K68=rGYH64OxP%R8sbqSdbD0 ze>!R3`yyJPlF8-!Xy!_8A4q1qWWu`FcF3!H>HK}(*5bY3;$&YdZ>`5#pBr6WT<0ZQ Yi?@agHz>K~M$%-hT8{1qKb0l_1V47cpa1{> literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_1m_o_forPDS_cropped.cub b/isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_1m_o_forPDS_cropped.cub new file mode 100644 index 0000000000000000000000000000000000000000..a66378465ca7fec496aa80d6edf94733c092c719 GIT binary patch literal 73337 zcmeI0T~pi05{7flub9fsUZk)k8ylNipDKeL;#y-|wn^x@(r$a%bQ5sEci>Q+f|We;v?y z$6aYJa(yq7ZVGuW?Y1-{Xxy&k=i&E-ny^P&p>5_R%*-3YvhEjZNh;mNp^&UAv;Cc)3 zJq&%m33TxTXJulv)X-l#;W*Zz_7|ZOoVhcxJCyFI6+2v^XD1F4T$*b>7 z^^(l^apq}=XRZ3yy{2#6h#rhfGR~i!jTteY|Hx0nlG)GrWuTOB)v}AODazIhG!Os* z5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009sH0T2KI5C8!X009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lqi(zNy4O!?a${)N?v1j#<^*0^dzP~IY(;+AH_v2B z^?L;)Hmj6OwNoAPc-r!TH(x1g<_V*EPOW)Q3K@8yenUN9&-iM7xO}bVwq4n_n&j&r zDqp_t=PO_4qT(~1l<=Hh10KJgBIUnRj;Gv}v(Qf}Nfkiyj*dHN(Q>6kGiPZkdOSX87wXwAS(atjtXj2J7h(Uaap`{B z?)N(Mlt=;6tZ!=gE%nf=X4r2Z$ka>IFj+rPkTh#79e$Vml!Bx+11J6u6(mm>&sC7^ z`CR>S7^;lC(o`=uBxMU@zwnB^58V`XF85(Nkn&+_|V&3 zmIzWRRC`vbCcV5sFnwH+Y45=?z0!Mw_C#jhr4uiGUZBy$*`B1@W-Po<{^6K#6`m2~sf4Bhog-%P-T?+btP=E(#j2IR(ytuurQSsi;iyhW2!E8ytxz3v#NXgTpGJeJ z<~~*GSifIuFLs^ft9~?n)sDA`%bgZGvopBniIRRXI1wq{2G6*LK(>-_-8Nn%I}wu1_)8}&-#?SxbMuudeyyL9n_*|1O-_Zfof!8+o{Z^Dk zr}2A#FX~>zp)-pkdOb($>9#{Prrw4A>dD{REmbO&|8D){W%!uMFDc?vzL7!UO`ER| u)8B&z*{@33x5c0qf;iMo;xz0O2@;Ve4%`ACjBpb{LUT# literal 0 HcmV?d00001 diff --git a/isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_25cm_o_forPDS_cropped.cub b/isis/tests/data/hidtmgen/ortho/PSP_009404_2635_RED_NLstretch_25cm_o_forPDS_cropped.cub new file mode 100644 index 0000000000000000000000000000000000000000..56c3504a9922a6148cdb6caca8be40b09772d1f3 GIT binary patch literal 73373 zcmeI0U2oes7KZmazk=w^Tokb-`8!xI;KXiftYaItQ_Nfiw9Pu2l_i;^(iYeszvoc? zOtTZYoy^7HHPX}}&*#He6s6JpceSvhE&3)jH`!cW2r=4?-6Wd-7Gi3pw%6aRqVH`{ zuhl9IH~t~fYiZen$7f-boAZ~cT&IyTG+gtXEe{UDn1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7@|-FU`>&W+oGX*(wCS42s>MF=zhJ1&k8-0l{XWkKqds!YvZ$@-`?+-gOw*yDgMhPF;$hHeExV{gF#;DPm7Rm?sQ0PP}0AF2yY%`yi(hn`7cHgB$4Wb z5BIb?zR8Aow4ogfk9MtM%CjbU>w zWPjRiGaM(xZtp|qelXjeMERiZ#%GiM@rnHqr$3zaCcA5_E#_eq#!Bkfb;}P9(pob7 zY2A7a+Bq)+zApa?-8QZ&yidQ?=6S) z%2FG;RO$6g{(7n0pZ2Gf@;nQpNzK{PCCtvua^U}MdeRi6E z@qJS7tJQL04c)9wHouglGx1p`>$9K4+oDt||G0t Date: Fri, 20 Nov 2020 13:19:53 -0700 Subject: [PATCH 2/2] Initial hidtmgen tests --- isis/tests/FunctionalTestsHidtmgen.cpp | 762 +++++++++++++++++++++++++ 1 file changed, 762 insertions(+) create mode 100644 isis/tests/FunctionalTestsHidtmgen.cpp diff --git a/isis/tests/FunctionalTestsHidtmgen.cpp b/isis/tests/FunctionalTestsHidtmgen.cpp new file mode 100644 index 0000000000..c2785f5dd8 --- /dev/null +++ b/isis/tests/FunctionalTestsHidtmgen.cpp @@ -0,0 +1,762 @@ +#include +#include "Fixtures.h" +#include "Pvl.h" +#include "PvlGroup.h" +#include "TestUtilities.h" +#include "gmock/gmock.h" +#include "UserInterface.h" +#include "hidtmgen.h" +#include "ProcessImportPds.h" + +using namespace Isis; +using ::testing::HasSubstr; + +static QString APP_XML = FileName("$ISISROOT/bin/xml/hidtmgen.xml").expanded(); + +TEST(Hidtmgen, HidtmgenTestColor){ + //Serves as default test case -- test all keywords for all generated products. + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/color/orthoInputList.txt", + "paramspvl=data/hidtmgen/color/params.pvl", + "orthosequencenumberlist=data/hidtmgen/color/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_042252_1930_042753_1930_A31.IMG"); + + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 32); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 155); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 133); + + ASSERT_EQ(dtmLabel["DATA_SET_ID"][0].toStdString(), "MRO-M-HIRISE-5-DTM-V1.0"); + ASSERT_EQ(dtmLabel["PRODUCER_INSTITUTION_NAME"][0].toStdString(), "UNIVERSITY OF ARIZONA"); + ASSERT_EQ(dtmLabel["PRODUCER_ID"][0].toStdString(), "UA"); + ASSERT_EQ(dtmLabel["PRODUCER_FULL_NAME"][0].toStdString(), "ALFRED MCEWEN"); + ASSERT_EQ(dtmLabel["PRODUCT_ID"][0].toStdString(), "DTEEZ_042252_1930_042753_1930_A31"); + ASSERT_DOUBLE_EQ(dtmLabel["PRODUCT_VERSION_ID"], 0.314); + ASSERT_EQ(dtmLabel["INSTRUMENT_HOST_NAME"][0].toStdString(), "MARS RECONNAISSANCE ORBITER"); + ASSERT_EQ(dtmLabel["INSTRUMENT_NAME"][0].toStdString(), "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT"); + ASSERT_EQ(dtmLabel["INSTRUMENT_ID"][0].toStdString(), "HIRISE"); + ASSERT_EQ(dtmLabel["TARGET_NAME"][0].toStdString(), "MARS"); + ASSERT_EQ(dtmLabel["SOURCE_PRODUCT_ID"][0].toStdString(), "ESP_042252_1930"); + ASSERT_EQ(dtmLabel["SOURCE_PRODUCT_ID"][1].toStdString(), "ESP_042753_1930"); + ASSERT_EQ(dtmLabel["RATIONALE_DESC"][0].toStdString(), "NULL"); + + + PvlObject dtmImage = dtmLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(dtmImage["LINES"], 23); + ASSERT_DOUBLE_EQ(dtmImage["LINE_SAMPLES"], 8); + ASSERT_DOUBLE_EQ(dtmImage["BANDS"], 1); + ASSERT_DOUBLE_EQ(dtmImage["OFFSET"], 0.0); + ASSERT_DOUBLE_EQ(dtmImage["SCALING_FACTOR"], 1.0); + ASSERT_DOUBLE_EQ(dtmImage["SAMPLE_BITS"], 32); + ASSERT_EQ(dtmImage["SAMPLE_BIT_MASK"][0].toStdString(), "2#11111111111111111111111111111111#"); + ASSERT_EQ(dtmImage["SAMPLE_TYPE"][0].toStdString(), "PC_REAL"); + ASSERT_EQ(dtmImage["MISSING_CONSTANT"][0].toStdString(), "16#FF7FFFFB#"); + ASSERT_DOUBLE_EQ(dtmImage["VALID_MINIMUM"], -1884.17); + ASSERT_DOUBLE_EQ(dtmImage["VALID_MAXIMUM"], -1324.12); + + PvlObject dtmProj = dtmLabel.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(dtmProj["^DATA_SET_MAP_PROJECTION"][0].toStdString(), "DSMAP.CAT"); + ASSERT_EQ(dtmProj["MAP_PROJECTION_TYPE"][0].toStdString(), "EQUIRECTANGULAR"); + ASSERT_EQ(dtmProj["PROJECTION_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(dtmProj["A_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(dtmProj["B_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(dtmProj["C_AXIS_RADIUS"], 3396.19); + ASSERT_EQ(dtmProj["COORDINATE_SYSTEM_NAME"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_EQ(dtmProj["POSITIVE_LONGITUDE_DIRECTION"][0].toStdString(), "EAST"); + ASSERT_EQ(dtmProj["KEYWORD_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(dtmProj["CENTER_LATITUDE"], 0.0); + ASSERT_DOUBLE_EQ(dtmProj["CENTER_LONGITUDE"], 180.0); + ASSERT_DOUBLE_EQ(dtmProj["LINE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(dtmProj["LINE_LAST_PIXEL"], 23); + ASSERT_DOUBLE_EQ(dtmProj["SAMPLE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(dtmProj["SAMPLE_LAST_PIXEL"], 8); + ASSERT_DOUBLE_EQ(dtmProj["MAP_PROJECTION_ROTATION"], 0.0); + ASSERT_NEAR(dtmProj["MAP_RESOLUTION"], 59.27469, .00001); + ASSERT_DOUBLE_EQ(dtmProj["MAP_SCALE"], 1000.0); + ASSERT_NEAR(dtmProj["MAXIMUM_LATITUDE"], 12.82864, .00001); + ASSERT_NEAR(dtmProj["MINIMUM_LATITUDE"], 12.45094, .00001); + ASSERT_DOUBLE_EQ(dtmProj["LINE_PROJECTION_OFFSET"], 760.5); + ASSERT_DOUBLE_EQ(dtmProj["SAMPLE_PROJECTION_OFFSET"], -10413.5); + ASSERT_NEAR(dtmProj["EASTERNMOST_LONGITUDE"], 355.80733, .00001); + ASSERT_NEAR(dtmProj["WESTERNMOST_LONGITUDE"], 355.68017, .00001); + + + PvlObject dtmView = dtmLabel.findObject("VIEWING_PARAMETERS"); + ASSERT_DOUBLE_EQ(dtmView["NORTH_AZIMUTH"], 270.0); + + + Pvl orthoLabel1(prefix.path()+"/ESP_042252_1930_IRB_B_41_ORTHO.IMG"); + + ASSERT_EQ(orthoLabel1["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel1["RECORD_BYTES"], 40); + ASSERT_DOUBLE_EQ(orthoLabel1["FILE_RECORDS"], 252); + ASSERT_DOUBLE_EQ(orthoLabel1["^IMAGE"], 103); + + ASSERT_EQ(orthoLabel1["DATA_SET_ID"][0].toStdString(), "MRO-M-HIRISE-5-DTM-V1.0"); + ASSERT_EQ(orthoLabel1["PRODUCER_INSTITUTION_NAME"][0].toStdString(), "UNIVERSITY OF ARIZONA"); + ASSERT_EQ(orthoLabel1["PRODUCER_ID"][0].toStdString(), "UA"); + ASSERT_EQ(orthoLabel1["PRODUCER_FULL_NAME"][0].toStdString(), "ALFRED MCEWEN"); + ASSERT_EQ(orthoLabel1["PRODUCT_ID"][0].toStdString(), "ESP_042252_1930_IRB_B_41_ORTHO"); + ASSERT_DOUBLE_EQ(orthoLabel1["PRODUCT_VERSION_ID"], 0.314); + ASSERT_EQ(orthoLabel1["INSTRUMENT_HOST_NAME"][0].toStdString(), "MARS RECONNAISSANCE ORBITER"); + ASSERT_EQ(orthoLabel1["INSTRUMENT_HOST_ID"][0].toStdString(), "MRO"); + ASSERT_EQ(orthoLabel1["INSTRUMENT_NAME"][0].toStdString(), "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT"); + ASSERT_EQ(orthoLabel1["INSTRUMENT_ID"][0].toStdString(), "HIRISE"); + ASSERT_EQ(orthoLabel1["TARGET_NAME"][0].toStdString(), "MARS"); + ASSERT_EQ(orthoLabel1["SOURCE_PRODUCT_ID"][0].toStdString(), "DTEEZ_042252_1930_042753_1930_A31"); + ASSERT_EQ(orthoLabel1["SOURCE_PRODUCT_ID"][1].toStdString(), "ESP_042252_1930"); + ASSERT_EQ(orthoLabel1["RATIONALE_DESC"][0].toStdString(), "NULL"); + ASSERT_EQ(orthoLabel1["SOFTWARE_NAME"][0].toStdString(), "Socet_Set 5.4.1"); + ASSERT_EQ(orthoLabel1["RATIONALE_DESC"][0].toStdString(), "NULL"); + ASSERT_DOUBLE_EQ(orthoLabel1["LABEL_RECORDS"], 102); + + PvlObject orthoImage1 = orthoLabel1.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(orthoImage1["LINES"], 50); + ASSERT_DOUBLE_EQ(orthoImage1["LINE_SAMPLES"], 40); + ASSERT_DOUBLE_EQ(orthoImage1["BANDS"], 3); + ASSERT_DOUBLE_EQ(orthoImage1["OFFSET"], 0.0); + ASSERT_DOUBLE_EQ(orthoImage1["SCALING_FACTOR"], 1.0); + ASSERT_DOUBLE_EQ(orthoImage1["SAMPLE_BITS"], 8); + ASSERT_EQ(orthoImage1["SAMPLE_TYPE"][0].toStdString(), "MSB_UNSIGNED_INTEGER"); + ASSERT_EQ(orthoImage1["BAND_STORAGE_TYPE"][0].toStdString(), "BAND_SEQUENTIAL"); + ASSERT_DOUBLE_EQ(orthoImage1["CORE_NULL"], 0); + ASSERT_DOUBLE_EQ(orthoImage1["CORE_LOW_REPR_SATURATION"], 1); + ASSERT_DOUBLE_EQ(orthoImage1["CORE_LOW_INSTR_SATURATION"], 1); + ASSERT_DOUBLE_EQ(orthoImage1["CORE_HIGH_REPR_SATURATION"], 255); + ASSERT_DOUBLE_EQ(orthoImage1["CORE_HIGH_INSTR_SATURATION"], 255); + + PvlObject orthoProj1 = orthoLabel1.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(orthoProj1["^DATA_SET_MAP_PROJECTION"][0].toStdString(), "DSMAP.CAT"); + ASSERT_EQ(orthoProj1["MAP_PROJECTION_TYPE"][0].toStdString(), "EQUIRECTANGULAR"); + ASSERT_EQ(orthoProj1["PROJECTION_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(orthoProj1["A_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(orthoProj1["B_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(orthoProj1["C_AXIS_RADIUS"], 3396.19); + ASSERT_EQ(orthoProj1["COORDINATE_SYSTEM_NAME"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_EQ(orthoProj1["POSITIVE_LONGITUDE_DIRECTION"][0].toStdString(), "EAST"); + ASSERT_EQ(orthoProj1["KEYWORD_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(orthoProj1["CENTER_LATITUDE"], 0.0); + ASSERT_DOUBLE_EQ(orthoProj1["CENTER_LONGITUDE"], 180.0); + ASSERT_DOUBLE_EQ(orthoProj1["LINE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(orthoProj1["LINE_LAST_PIXEL"], 50); + ASSERT_DOUBLE_EQ(orthoProj1["SAMPLE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(orthoProj1["SAMPLE_LAST_PIXEL"], 40); + ASSERT_DOUBLE_EQ(orthoProj1["MAP_PROJECTION_ROTATION"], 0.0); + ASSERT_NEAR(orthoProj1["MAP_RESOLUTION"], 117259.25436, .00001); + ASSERT_NEAR(orthoProj1["MAP_SCALE"], 0.50550, .00001); + ASSERT_NEAR(orthoProj1["MAXIMUM_LATITUDE"], 12.82848, .00001); + ASSERT_NEAR(orthoProj1["MINIMUM_LATITUDE"], 12.82806, .00001); + ASSERT_DOUBLE_EQ(orthoProj1["LINE_PROJECTION_OFFSET"], 1504258.5); + ASSERT_DOUBLE_EQ(orthoProj1["SAMPLE_PROJECTION_OFFSET"], -20600155.500001); + ASSERT_NEAR(orthoProj1["EASTERNMOST_LONGITUDE"], 355.68076, .00001); + ASSERT_NEAR(orthoProj1["WESTERNMOST_LONGITUDE"], 355.68041, .00001); + ASSERT_EQ(orthoProj1["FIRST_STANDARD_PARALLEL"][0].toStdString(), "N/A"); + ASSERT_EQ(orthoProj1["SECOND_STANDARD_PARALLEL"][0].toStdString(), "N/A"); + + + PvlObject orthoView1 = orthoLabel1.findObject("VIEWING_PARAMETERS"); + ASSERT_DOUBLE_EQ(orthoView1["NORTH_AZIMUTH"], 270.0); + + + Pvl orthoLabel2(prefix.path()+"/ESP_042252_1930_IRB_D_31_ORTHO.IMG"); + + ASSERT_EQ(orthoLabel2["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel2["RECORD_BYTES"], 40); + ASSERT_DOUBLE_EQ(orthoLabel2["FILE_RECORDS"], 252); + ASSERT_DOUBLE_EQ(orthoLabel2["^IMAGE"], 103); + + ASSERT_EQ(orthoLabel2["DATA_SET_ID"][0].toStdString(), "MRO-M-HIRISE-5-DTM-V1.0"); + ASSERT_EQ(orthoLabel2["PRODUCER_INSTITUTION_NAME"][0].toStdString(), "UNIVERSITY OF ARIZONA"); + ASSERT_EQ(orthoLabel2["PRODUCER_ID"][0].toStdString(), "UA"); + ASSERT_EQ(orthoLabel2["PRODUCER_FULL_NAME"][0].toStdString(), "ALFRED MCEWEN"); + ASSERT_EQ(orthoLabel2["PRODUCT_ID"][0].toStdString(), "ESP_042252_1930_IRB_D_31_ORTHO"); + ASSERT_DOUBLE_EQ(orthoLabel2["PRODUCT_VERSION_ID"], 0.314); + ASSERT_EQ(orthoLabel2["INSTRUMENT_HOST_NAME"][0].toStdString(), "MARS RECONNAISSANCE ORBITER"); + ASSERT_EQ(orthoLabel2["INSTRUMENT_HOST_ID"][0].toStdString(), "MRO"); + ASSERT_EQ(orthoLabel2["INSTRUMENT_NAME"][0].toStdString(), "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT"); + ASSERT_EQ(orthoLabel2["INSTRUMENT_ID"][0].toStdString(), "HIRISE"); + ASSERT_EQ(orthoLabel2["TARGET_NAME"][0].toStdString(), "MARS"); + ASSERT_EQ(orthoLabel2["SOURCE_PRODUCT_ID"][0].toStdString(), "DTEEZ_042252_1930_042753_1930_A31"); + ASSERT_EQ(orthoLabel2["SOURCE_PRODUCT_ID"][1].toStdString(), "ESP_042252_1930"); + ASSERT_EQ(orthoLabel2["RATIONALE_DESC"][0].toStdString(), "NULL"); + ASSERT_EQ(orthoLabel2["SOFTWARE_NAME"][0].toStdString(), "Socet_Set 5.4.1"); + ASSERT_EQ(orthoLabel2["RATIONALE_DESC"][0].toStdString(), "NULL"); + ASSERT_DOUBLE_EQ(orthoLabel2["LABEL_RECORDS"], 102); + + PvlObject orthoImage2 = orthoLabel2.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(orthoImage2["LINES"], 50); + ASSERT_DOUBLE_EQ(orthoImage2["LINE_SAMPLES"], 40); + ASSERT_DOUBLE_EQ(orthoImage2["BANDS"], 3); + ASSERT_DOUBLE_EQ(orthoImage2["OFFSET"], 0.0); + ASSERT_DOUBLE_EQ(orthoImage2["SCALING_FACTOR"], 1.0); + ASSERT_DOUBLE_EQ(orthoImage2["SAMPLE_BITS"], 8); + ASSERT_EQ(orthoImage2["SAMPLE_TYPE"][0].toStdString(), "MSB_UNSIGNED_INTEGER"); + ASSERT_EQ(orthoImage2["BAND_STORAGE_TYPE"][0].toStdString(), "BAND_SEQUENTIAL"); + ASSERT_DOUBLE_EQ(orthoImage2["CORE_NULL"], 0); + ASSERT_DOUBLE_EQ(orthoImage2["CORE_LOW_REPR_SATURATION"], 1); + ASSERT_DOUBLE_EQ(orthoImage2["CORE_LOW_INSTR_SATURATION"], 1); + ASSERT_DOUBLE_EQ(orthoImage2["CORE_HIGH_REPR_SATURATION"], 255); + ASSERT_DOUBLE_EQ(orthoImage2["CORE_HIGH_INSTR_SATURATION"], 255); + + PvlObject orthoProj2 = orthoLabel2.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(orthoProj2["^DATA_SET_MAP_PROJECTION"][0].toStdString(), "DSMAP.CAT"); + ASSERT_EQ(orthoProj2["MAP_PROJECTION_TYPE"][0].toStdString(), "EQUIRECTANGULAR"); + ASSERT_EQ(orthoProj2["PROJECTION_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(orthoProj2["A_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(orthoProj2["B_AXIS_RADIUS"], 3396.19); + ASSERT_DOUBLE_EQ(orthoProj2["C_AXIS_RADIUS"], 3396.19); + ASSERT_EQ(orthoProj2["COORDINATE_SYSTEM_NAME"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_EQ(orthoProj2["POSITIVE_LONGITUDE_DIRECTION"][0].toStdString(), "EAST"); + ASSERT_EQ(orthoProj2["KEYWORD_LATITUDE_TYPE"][0].toStdString(), "PLANETOCENTRIC"); + ASSERT_DOUBLE_EQ(orthoProj2["CENTER_LATITUDE"], 0.0); + ASSERT_DOUBLE_EQ(orthoProj2["CENTER_LONGITUDE"], 180.0); + ASSERT_DOUBLE_EQ(orthoProj2["LINE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(orthoProj2["LINE_LAST_PIXEL"], 50); + ASSERT_DOUBLE_EQ(orthoProj2["SAMPLE_FIRST_PIXEL"], 1); + ASSERT_DOUBLE_EQ(orthoProj2["SAMPLE_LAST_PIXEL"], 40); + ASSERT_DOUBLE_EQ(orthoProj2["MAP_PROJECTION_ROTATION"], 0.0); + ASSERT_NEAR(orthoProj2["MAP_RESOLUTION"], 29314.81359, .00001); + ASSERT_NEAR(orthoProj2["MAP_SCALE"], 2.02200, .00001); + ASSERT_NEAR(orthoProj2["MAXIMUM_LATITUDE"], 12.82801, .00001); + ASSERT_NEAR(orthoProj2["MINIMUM_LATITUDE"], 12.82631, .00001); + ASSERT_DOUBLE_EQ(orthoProj2["LINE_PROJECTION_OFFSET"], 376050.5); + ASSERT_DOUBLE_EQ(orthoProj2["SAMPLE_PROJECTION_OFFSET"], -5150060.5); + ASSERT_NEAR(orthoProj2["EASTERNMOST_LONGITUDE"], 355.68250, .00001); + ASSERT_NEAR(orthoProj2["WESTERNMOST_LONGITUDE"], 355.68114, .00001); + ASSERT_EQ(orthoProj2["FIRST_STANDARD_PARALLEL"][0].toStdString(), "N/A"); + ASSERT_EQ(orthoProj2["SECOND_STANDARD_PARALLEL"][0].toStdString(), "N/A"); + + PvlObject orthoView2 = orthoLabel2.findObject("VIEWING_PARAMETERS"); + ASSERT_DOUBLE_EQ(orthoView2["NORTH_AZIMUTH"], 270.0); + +} + + +TEST(Hidtmgen, HidtmgenTestDtmOnly){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "paramspvl=data/hidtmgen/dtmOnly/params.pvl", + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_042252_1930_042753_1930_A15.IMG"); + + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 32); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 155); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 133); +} + + +TEST(Hidtmgen, HidtmgenTestEqui){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/DTM_Zumba_1m_forPDS_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/equi/orthoInputList.txt", + "paramspvl=data/hidtmgen/equi/params.pvl", + "orthosequencenumberlist=data/hidtmgen/equi/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_002118_1510_003608_1510_A02.IMG"); + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 28); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 203); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 183); + + PvlObject dtmProj = dtmLabel.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(dtmProj["MAP_PROJECTION_TYPE"][0].toStdString(), "EQUIRECTANGULAR"); + + + Pvl orthoLabel(prefix.path()+"/PSP_002118_1510_RED_C_01_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 50); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 132); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 83); + + PvlObject orthoProj = orthoLabel.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(orthoProj["MAP_PROJECTION_TYPE"][0].toStdString(), "EQUIRECTANGULAR"); +} + + +TEST(Hidtmgen, HidtmgenTestErrorEmptyOrthoFromList){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputListEmpty.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("File [data/hidtmgen/error/orthoInputListEmpty.txt] contains no data.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorInvalidDtm){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Input cube [data/hidtmgen/ortho/ESP_042252_1930_3-BAND_COLOR_2m_o_cropped.cub] does not appear to be a DTM.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorNoInput){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "outputdir=" + prefix.path(), + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("User must supply DTM or ORTHOFROMLIST or both.")); + } +} + +TEST(Hidtmgen, HidtmgenTestErrorDtmInvalidProjection){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres_sinusoidal.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("The projection type [SINUSOIDAL] is not supported.")); + } +} + +TEST(Hidtmgen, HidtmgenTestErrorInputSeqMismatch){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers1item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Output sequence number list must correspond to the input ortho list.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorInputOutputMismatch){ + QTemporaryDir prefix; + QVector args = {"defaultnames=FALSE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "dtm_product_id=xyz", + "dtmto=" + prefix.path() + "/xyz.IMG", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthotolist=data/hidtmgen/error/orthoToList1Item.txt", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt", + "orthoproductidlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Output ortho list and product id list must correspond to the input ortho list.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorInvalidInstitution){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/invalidProducingInst.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("PRODUCING_INSTITUTION value [USGS] in the PARAMSPVL file must be a single character.")); + } +} + +TEST(Hidtmgen, HidtmgenTestErrorInvalidVersionId){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Item.txt", + "paramspvl=data/hidtmgen/error/invalidVersionId.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Version number [-4.0] is invalid.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorDtmInvalidBandSize){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/DTM_2Bands_cropped.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2item.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers2item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("Input cube [data/hidtmgen/dtm/DTM_2Bands_cropped.cub] does not appear to be a DTM.")); + } +} + + +TEST(Hidtmgen, HidtmgenTestErrorOrthoInvalidBandSize){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/error/orthoInputList2Bands.txt", + "paramspvl=data/hidtmgen/error/params.pvl", + "orthosequencenumberlist=data/hidtmgen/error/sequenceNumbers1item.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + FAIL() << "Should throw an exception" << std::endl; + } + catch (IException &e) { + EXPECT_THAT(e.what(), HasSubstr("The file [data/hidtmgen/ortho/2BandImage.cub] found in the ORTHOFROMLIST is not a valid orthorectified image. Band count must be 1 (RED) or 3 (color).")); + } +} + +TEST(Hidtmgen, HidtmgenTestNonDefaultNames){ + QTemporaryDir prefix; + QVector args = {"defaultnames=FALSE", + "dtm=data/hidtmgen/dtm/DTM_Zumba_1m_forPDS_lowres.cub", + "outputdir=" + prefix.path(), + "dtmto="+ prefix.path() + "/dtm.img", + "orthofromlist=data/hidtmgen/nonDefaultNames/orthoInputList.txt", + "orthotolist=data/hidtmgen/nonDefaultNames/orthoOutputFiles.lis", + "orthoproductidlist=data/hidtmgen/nonDefaultNames/orthoOutputProductIds.lis", + "paramspvl=data/hidtmgen/nonDefaultNames/params.pvl", + "dtm_product_id=DtmProduct" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/dtm.img"); + + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 28); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 203); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 183); + +} + + +TEST(Hidtmgen, HidtmgenTestOrthoOnly){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/orthoOnly/orthoInputList.txt", + "paramspvl=data/hidtmgen/orthoOnly/params.pvl", + "orthosequencenumberlist=data/hidtmgen/orthoOnly/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl orthoLabel(prefix.path()+"/ESP_042252_1930_IRB_D_31_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["SOURCE_PRODUCT_ID"][0].toStdString(), "DTems_xxxxxx_xxxx_yyyyyy_yyyy_vnn"); + ASSERT_EQ(orthoLabel["SOURCE_PRODUCT_ID"][1].toStdString(), "ESP_042252_1930"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 40); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 254); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 105); + +} + + +TEST(Hidtmgen, HidtmgenTestOutputTypesAll832){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/outputTypes/orthoInputList.txt", + "paramspvl=data/hidtmgen/outputTypes/params.pvl", + "endian=msb", + "null=FALSE", + "LIS=TRUE", + "LRS=TRUE", + "HIS=TRUE", + "HRS=TRUE", + "dtmbittype=8BIT", + "orthobittype=32bit", + "orthosequencenumberlist=data/hidtmgen/outputTypes/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_042252_1930_042753_1930_A31.IMG"); + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 8); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 558); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 536); + + + PvlObject dtmImage = dtmLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(dtmImage["SAMPLE_BITS"], 8); + ASSERT_EQ(dtmImage["SAMPLE_TYPE"][0].toStdString(), "MSB_UNSIGNED_INTEGER"); + + Pvl orthoLabel(prefix.path()+"/ESP_042252_1930_IRB_D_31_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 160); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 177); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 28); + + PvlObject orthoImage = orthoLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(orthoImage["SAMPLE_BITS"], 32); + ASSERT_EQ(orthoImage["SAMPLE_TYPE"][0].toStdString(), "IEEE_REAL"); + +} + + +TEST(Hidtmgen, HidtmgenTestOutputTypesAllU16S16){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/outputTypes/orthoInputList.txt", + "paramspvl=data/hidtmgen/outputTypes/params2.pvl", + "endian=msb", + "null=FALSE", + "LIS=TRUE", + "LRS=TRUE", + "HIS=TRUE", + "HRS=TRUE", + "dtmbittype=u16bit", + "orthobittype=s16bit", + "orthosequencenumberlist=data/hidtmgen/outputTypes/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_042252_1930_042753_1930_A07.IMG"); + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 16); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 288); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 266); + + + PvlObject dtmImage = dtmLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(dtmImage["SAMPLE_BITS"], 16); + ASSERT_EQ(dtmImage["SAMPLE_TYPE"][0].toStdString(), "MSB_UNSIGNED_INTEGER"); + + Pvl orthoLabel(prefix.path()+"/ESP_042252_1930_IRB_D_31_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 80); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 202); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 53); + + PvlObject orthoImage = orthoLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(orthoImage["SAMPLE_BITS"], 16); + ASSERT_EQ(orthoImage["SAMPLE_TYPE"][0].toStdString(), "MSB_INTEGER"); +} + + +TEST(Hidtmgen, HidtmgenTestOutputTypesNoneS16U16){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Ares4_Marth_Crater_3557E_126N_ngate_03_lowres.cub", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/outputTypes/orthoInputList.txt", + "paramspvl=data/hidtmgen/outputTypes/params2.pvl", + "endian=msb", + "null=FALSE", + "LIS=FALSE", + "LRS=FALSE", + "HIS=FALSE", + "HRS=FALSE", + "dtmbittype=S16BIT", + "orthobittype=U16BIT", + "orthosequencenumberlist=data/hidtmgen/outputTypes/sequenceNumbers.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEEZ_042252_1930_042753_1930_A07.IMG"); + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 16); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 288); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 266); + + + PvlObject dtmImage = dtmLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(dtmImage["SAMPLE_BITS"], 16); + ASSERT_EQ(dtmImage["SAMPLE_TYPE"][0].toStdString(), "MSB_INTEGER"); + + Pvl orthoLabel(prefix.path()+"/ESP_042252_1930_IRB_D_31_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 80); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 202); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 53); + + PvlObject orthoImage = orthoLabel.findObject("IMAGE"); + ASSERT_DOUBLE_EQ(orthoImage["SAMPLE_BITS"], 16); + ASSERT_EQ(orthoImage["SAMPLE_TYPE"][0].toStdString(), "MSB_UNSIGNED_INTEGER"); +} + + +TEST(Hidtmgen, HidtmgenTestPolar){ + QTemporaryDir prefix; + QVector args = {"defaultnames=TRUE", + "dtm=data/hidtmgen/dtm/Polar_Crater_1_1m_ngate_edited2_forPDS_lowres.cub", + "paramspvl=data/hidtmgen/polar/params.pvl", + "outputdir=" + prefix.path(), + "orthofromlist=data/hidtmgen/polar/orthoInputList.txt", + "orthosequence=data/hidtmgen/polar/orthosequencenumberlist.txt" + }; + + UserInterface options(APP_XML, args); + try { + hidtmgen(options); + } + catch (IException &e) { + FAIL() << "Unable to HIRISE generate PDS products: " << e.toString().toStdString().c_str() << std::endl; + } + + Pvl dtmLabel(prefix.path()+"/DTEPZ_009404_2635_010221_2635_Z12.IMG"); + ASSERT_EQ(dtmLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(dtmLabel["RECORD_BYTES"], 52); + ASSERT_DOUBLE_EQ(dtmLabel["FILE_RECORDS"], 96); + ASSERT_DOUBLE_EQ(dtmLabel["^IMAGE"], 85); + + PvlObject dtmProj = dtmLabel.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(dtmProj["MAP_PROJECTION_TYPE"][0].toStdString(), "POLAR STEREOGRAPHIC"); + + Pvl orthoLabel(prefix.path()+"/PSP_009404_2635_RED_C_1_ORTHO.IMG"); + ASSERT_EQ(orthoLabel["RECORD_TYPE"][0].toStdString(), "FIXED_LENGTH"); + ASSERT_DOUBLE_EQ(orthoLabel["RECORD_BYTES"], 50); + ASSERT_DOUBLE_EQ(orthoLabel["FILE_RECORDS"], 115); + ASSERT_DOUBLE_EQ(orthoLabel["^IMAGE"], 66); + + PvlObject orthoProj = orthoLabel.findObject("IMAGE_MAP_PROJECTION"); + ASSERT_EQ(orthoProj["MAP_PROJECTION_TYPE"][0].toStdString(), "POLAR STEREOGRAPHIC"); +}