Unverified Commit 8354a8d3 authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Footprintinit Tests (#4077)

* Added boundary gtest for footprintinit

* Replaced specific path with tempdir path

* Updated tests into functional footprintinit tests and ImagePoly unittests

* Removed old unit tests

* Add outlier test to ImagePolygon test

* Removed old test makefiles/folders

* Updated tests based on feedback

* Removed binary data on mosaic pvl
parent 12c53020
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ namespace Isis {
      poly.Create(*cube, sinc, linc, 1, 1, 0, 0, 1, precision);
    }
    catch (IException &e) {
      QString msg = "Cannot generate polygon for [" + ui.GetFileName("FROM") + "]";
      QString msg = "Cannot generate polygon for [" + cube->fileName() + "]";
      throw IException(e, IException::User, msg, _FILEINFO_);
    }

@@ -89,9 +89,8 @@ namespace Isis {
      Pvl map(ui.GetFileName("MAP"));
      PvlGroup &mapGroup = map.findGroup("MAPPING");

      Pvl cubeLab(ui.GetFileName("FROM"));
      // This call adds TargetName, EquatorialRadius and PolarRadius to mapGroup
      mapGroup = Target::radiiGroup(cubeLab, mapGroup);
      mapGroup = Target::radiiGroup(*(cube->label()), mapGroup);
      // add/replace the rest of the keywords
      mapGroup.addKeyword( PvlKeyword("LatitudeType", "Planetocentric"),
                           PvlContainer::Replace );
@@ -128,7 +127,7 @@ namespace Isis {
            delete xyPoly;
            e.print(); // This should be a NAIF error
            QString msg = "Cannot calculate XY for [";
            msg += ui.GetFileName("FROM") + "]";
            msg += cube->fileName() + "]";
            throw IException(e, IException::User, msg, _FILEINFO_);
          }
        }
+0 −21
Original line number Diff line number Diff line
APPNAME = footprintinit

include $(ISISROOT)/make/isismake.tsts

# cp so I don't destroy the input cube
commands:
	$(CP) $(INPUT)/EN0108821505M.cal.cub $(OUTPUT)/EN0108821505M.cal.cub;
	$(APPNAME) from=$(OUTPUT)/EN0108821505M.cal.cub \
	           sinc=3000 \
	           linc=3000 \
	           >& /dev/null;
	$$ISISROOT/bin/blobdump from=$(OUTPUT)/EN0108821505M.cal.cub \
	                        to=$(OUTPUT)/EN0108821505M.txt \
	                        name="footprint" \
	                        type=Polygon \
	                        >& /dev/null;
	$(CAT) $(OUTPUT)/EN0108821505M.txt \
	       | $(SED) 's/\([0-9]\.[0-9]\{5\}\)\([0-9]*\)/\1/g' \
	       | $(SED) -e '$$G' \
		   >& $(OUTPUT)/EN0108821505M.trimmed.txt;
	$(RM) $(OUTPUT)/EN0108821505M.cal.cub $(OUTPUT)/EN0108821505M.txt;
+0 −21
Original line number Diff line number Diff line
APPNAME = footprintinit

include $(ISISROOT)/make/isismake.tsts

# cp so I don't destroy the input cube
commands:
	$(CP) $(INPUT)/f174s47.cub $(OUTPUT)/f174s47.cub;
	$(APPNAME) from=$(OUTPUT)/f174s47.cub \
	           sinc=100 \
	           linc=100 \
	           >& /dev/null;
	$$ISISROOT/bin/blobdump from=$(OUTPUT)/f174s47.cub \
	                        to=$(OUTPUT)/f174s47.txt \
	                        name=footprint \
	                        type=Polygon \
	                        >& /dev/null;
	$(CAT) $(OUTPUT)/f174s47.txt \
           | $(SED) 's/\([0-9]\.[0-9]\{4\}\)\([0-9]*\)/\1/g' \
           | $(SED) -e '$$G' \
		   >& $(OUTPUT)/f174s47.trimmed.txt;
	$(RM) $(OUTPUT)/f174s47.cub $(OUTPUT)/f174s47.txt;
+0 −35
Original line number Diff line number Diff line
APPNAME = footprintinit

include $(ISISROOT)/make/isismake.tsts

# cp so I don't destroy the input cube
commands:
	$(CP) $(INPUT)/ab102401.cub $(OUTPUT)/ab102401.cub;
	$(APPNAME) from=$(OUTPUT)/ab102401.cub \
	           sinc=1 \
	           linc=1 \
	           >& /dev/null;
	$$ISISROOT/bin/blobdump from=$(OUTPUT)/ab102401.cub \
	                        to=$(OUTPUT)/ab102401.txt \
	                        name=footprint \
	                        type=Polygon \
	                        >& /dev/null;
	$(CAT) $(OUTPUT)/ab102401.txt \
           | $(SED) 's/\([0-9]\.[0-9]\{5\}\)\([0-9]*\)/\1/g' \
           | $(SED) -e '$$G' \
	       >& $(OUTPUT)/ab102401.trimmed.txt;
	$(RM) $(OUTPUT)/ab102401.txt;
	$(APPNAME) from=$(OUTPUT)/ab102401.cub \
	           inctype=vertices \
	           numvertices=8 \
	           >& /dev/null;
	$$ISISROOT/bin/blobdump from=$(OUTPUT)/ab102401.cub \
	                        to=$(OUTPUT)/ab102401.txt \
	                        name=footprint \
	                        type=Polygon \
	                        >& /dev/null;
	$(CAT) $(OUTPUT)/ab102401.txt \
           | $(SED) 's/\([0-9]\.[0-9]\{5\}\)\([0-9]*\)/\1/g' \
           | $(SED) -e '$$G' \
	       >& $(OUTPUT)/ab102401.vertices.trimmed.txt;
	$(RM) $(OUTPUT)/ab102401.cub $(OUTPUT)/ab102401.txt;
+0 −20
Original line number Diff line number Diff line
APPNAME = footprintinit

include $(ISISROOT)/make/isismake.tsts

# cp so I don't destroy the input cube
commands:
	$(CP) $(INPUT)/tychogrid.cub $(OUTPUT)/tychogrid.cub;
	$(APPNAME) from=$(OUTPUT)/tychogrid.cub \
	           testxy=true \
	           >& /dev/null;
	$$ISISROOT/bin/blobdump from=$(OUTPUT)/tychogrid.cub \
	                        to=$(OUTPUT)/tychogrid.txt \
	                        name=footprint \
	                        type=Polygon \
	                        >& /dev/null;
	$(CAT) $(OUTPUT)/tychogrid.txt \
	       | $(SED) 's/\([0-9]\.[0-9]\{5\}\)\([0-9]*\)/\1/g' \
	       | $(SED) -e '$$G' \
	       >& $(OUTPUT)/tychogrid.trimmed.txt;
	$(RM) $(OUTPUT)/tychogrid.cub $(OUTPUT)/tychogrid.txt;
Loading