diff --git a/isis/CMakeLists.txt b/isis/CMakeLists.txt
index 6e6b8cee36..4c9e532ad0 100644
--- a/isis/CMakeLists.txt
+++ b/isis/CMakeLists.txt
@@ -33,7 +33,7 @@ set(PACKAGE "ISIS")
set(PACKAGE_NAME "USGS ISIS")
# Version number
-set(VERSION "4.0.0")
+set(VERSION "4.0.1")
set(PACKAGE_VERSION ${VERSION})
# Full name and version number
diff --git a/isis/src/base/apps/ddd2isis/ddd2isis.xml b/isis/src/base/apps/ddd2isis/ddd2isis.xml
index 19548a0aff..bd072e3cc0 100644
--- a/isis/src/base/apps/ddd2isis/ddd2isis.xml
+++ b/isis/src/base/apps/ddd2isis/ddd2isis.xml
@@ -41,6 +41,10 @@
bands. Removed the internal default of the output parameter set to None so
that an output file is now requried. Fixes #703.
+
+ Updated the dataTypes QMap with a new mapping (32, 4) to handle ingesting
+ the updated uvflat files from malin. Fixes #3715.
+
diff --git a/isis/src/base/apps/ddd2isis/main.cpp b/isis/src/base/apps/ddd2isis/main.cpp
index efae0dc7aa..ec6121a2e4 100644
--- a/isis/src/base/apps/ddd2isis/main.cpp
+++ b/isis/src/base/apps/ddd2isis/main.cpp
@@ -100,6 +100,7 @@ void IsisMain() {
dataTypes.insert(1450903360, 8);
dataTypes.insert(8, 1);
dataTypes.insert(16, 2);
+ dataTypes.insert(32, 4);
dataTypes.insert(48, 2);
// Read bytes 16-19 to get the bit type
@@ -130,6 +131,12 @@ void IsisMain() {
nOffset = 1024;
}
+ if (dataTypeBytes == 0) {
+ string msg = "The value totalBandBits [" + to_string(totalBandBits) + "] does not map " +
+ "to any byte size in the dataTypes table.";
+ throw IException(IException::Programmer, msg, _FILEINFO_);
+ }
+
fin.close();
PvlGroup results("FileInfo");
diff --git a/isis/src/base/apps/ddd2isis/tsts/badBandBit/Makefile b/isis/src/base/apps/ddd2isis/tsts/badBandBit/Makefile
new file mode 100644
index 0000000000..5dea576ab3
--- /dev/null
+++ b/isis/src/base/apps/ddd2isis/tsts/badBandBit/Makefile
@@ -0,0 +1,24 @@
+APPNAME = ddd2isis
+
+include $(ISISROOT)/make/isismake.tsts
+
+commands:
+ # TEST: Throws an error when trying to open the file
+ if [ `$(APPNAME) \
+ FROM=$(INPUT)/bad_flat.ddd \
+ TO=$(OUTPUT)/bad_flat.cub \
+ 2> $(OUTPUT)/temp.txt > /dev/null` ]; \
+ then true; \
+ fi;
+
+ # TEST: Throws an error when trying to read from a cub instead of ddd
+ if [ `$(APPNAME) \
+ FROM=$(INPUT)/bad_flat.cub \
+ TO=$(OUTPUT)/bad_flat.cub \
+ 2>> $(OUTPUT)/temp.txt > /dev/null` ]; \
+ then true; \
+ fi;
+
+ # Removes input file path up until input
+ $(SED) 's+\[.*/input+[input+' $(OUTPUT)/temp.txt > $(OUTPUT)/errorTruth.txt;
+ $(RM) $(OUTPUT)/temp.txt
diff --git a/isis/src/qisis/objs/MosaicSceneWidget/GridGraphicsItem.cpp b/isis/src/qisis/objs/MosaicSceneWidget/GridGraphicsItem.cpp
index ee898c733b..8c94d0493e 100644
--- a/isis/src/qisis/objs/MosaicSceneWidget/GridGraphicsItem.cpp
+++ b/isis/src/qisis/objs/MosaicSceneWidget/GridGraphicsItem.cpp
@@ -53,7 +53,6 @@ namespace Isis {
lonMin = lonMax;
lonMax = temp;
}
-
if (mappingGroup["LatitudeType"][0] == "Planetographic") {
Distance equaRad(tproj->EquatorialRadius(), Distance::Meters);
@@ -115,6 +114,7 @@ namespace Isis {
Angle::Degrees);
maxLat = Latitude(latMax.degrees(), mappingGroup,
Angle::Degrees);
+
// Make sure our lat increment is non-zero
if (!qFuzzyCompare(latInc.radians(), 0.0)) {
@@ -131,7 +131,7 @@ namespace Isis {
if (qFuzzyCompare(endLat.degrees(), 90.0))
endLat = Latitude(90.0, mappingGroup, Angle::Degrees);
}
-
+
Longitude minLon(lonMin.degrees(), mappingGroup,
Angle::Degrees);
Longitude maxLon(lonMax.degrees(), mappingGroup,
@@ -143,7 +143,7 @@ namespace Isis {
startLon = Longitude(
baseLon - Angle(floor((baseLon - minLon) / lonInc) * lonInc));
}
-
+
Longitude endLon =
(long)((maxLon - startLon) / lonInc) * lonInc + startLon;
@@ -199,7 +199,7 @@ namespace Isis {
double y = 0;
bool valid;
-
+
// Set ground according to lon direction to get correct X,Y values
// when drawing lines.
if (tproj->IsPositiveWest()) {
@@ -276,7 +276,7 @@ namespace Isis {
firstIteration = true;
atMaxLat = false;
atMaxLon = false;
-
+
// Create the longitude grid lines
for (Longitude lon = minLon; lon != maxLon + lonInc; lon += lonInc) {
if (lon > endLon && lon < maxLon) {
@@ -300,8 +300,10 @@ namespace Isis {
// Set ground according to lon direction to get correct X,Y values
// when drawing lines.
bool valid;
+
if (tproj->IsPositiveWest()) {
- valid = tproj->SetGround(lat.degrees(), lon.positiveWest(Angle::Degrees));
+ double glon = tproj->Has180Domain() ? -1*lon.positiveEast(Angle::Degrees): lon.positiveWest(Angle::Degrees);
+ valid = tproj->SetGround(lat.degrees(), glon);
}
else {
valid = tproj->SetGround(lat.degrees(), lon.positiveEast(Angle::Degrees));
diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp
index d93c880946..d189a5cf03 100644
--- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp
+++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp
@@ -58,6 +58,10 @@ namespace Isis {
m_minLon = domainMinLon();
m_maxLon = domainMaxLon();
m_density = 10000;
+
+ connect(getWidget(), SIGNAL(projectionChanged(Projection *)),
+ this, SLOT(onProjectionChanged()), Qt::UniqueConnection);
+
}
@@ -445,6 +449,7 @@ namespace Isis {
case Cubes:
if (tproj->SetCoordinate(boundingRect.topLeft().x(), -boundingRect.topLeft().y())) {
+
topLeft = tproj->Longitude();
}
else {
@@ -796,6 +801,30 @@ namespace Isis {
configDialog->setAttribute(Qt::WA_DeleteOnClose);
configDialog->show();
}
+
+ /*
+ * Updates lat/lon ranges when a new projection file is loaded. Also
+ * forces the lat/lon extent source to Map resetting user options in the grid tool dialog.
+ *
+ */
+ void MosaicGridTool::onProjectionChanged() {
+ TProjection * tproj = (TProjection *)getWidget()->getProjection();
+
+ // If Projection changed from a file, force extents to come from
+ // the new map file
+ m_latExtents = Map;
+ m_lonExtents = Map;
+
+ Latitude minLat = Latitude(tproj->MinimumLatitude(), Angle::Degrees);
+ Latitude maxLat = Latitude(tproj->MaximumLatitude(), Angle::Degrees);
+
+ setLatExtents(m_latExtents, minLat, maxLat);
+
+ Longitude minLon = Longitude(tproj->MinimumLongitude(), Angle::Degrees);
+ Longitude maxLon = Longitude(tproj->MaximumLongitude(), Angle::Degrees);
+
+ setLonExtents(m_lonExtents, minLon, maxLon);
+ }
/**
@@ -813,7 +842,7 @@ namespace Isis {
m_drawGridCheckBox->blockSignals(true);
m_drawGridCheckBox->setChecked(true);
m_drawGridCheckBox->blockSignals(false);
-
+
if (!getWidget()->getProjection()) {
QString msg = "Please set the mosaic scene's projection before trying to "
"draw a grid. This means either open a cube (a projection "
@@ -821,19 +850,21 @@ namespace Isis {
QMessageBox::warning(NULL, tr("Grid Tool Requires Projection"), msg);
}
+
if (m_minLon.degrees() < m_maxLon.degrees() && m_minLat.degrees() < m_maxLat.degrees()) {
m_gridItem = new GridGraphicsItem(m_baseLat, m_baseLon, m_latInc, m_lonInc, getWidget(),
m_density, m_minLat, m_maxLat, m_minLon, m_maxLon);
}
-
+
connect(getWidget(), SIGNAL(projectionChanged(Projection *)),
this, SLOT(drawGrid()), Qt::UniqueConnection);
connect(getWidget(), SIGNAL(cubesChanged()),
this, SLOT(onCubesChanged()));
-
+
if (m_gridItem != NULL)
getWidget()->getScene()->addItem(m_gridItem);
+
}
diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.h b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.h
index 73fbd78461..a7712caf60 100644
--- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.h
+++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.h
@@ -122,7 +122,8 @@ namespace Isis {
void drawGrid(bool draw);
void onCubesChanged();
void onToolOpen(bool check);
-
+ void onProjectionChanged();
+
protected:
QWidget *createToolBarWidget();
QAction *getPrimaryAction();
diff --git a/recipe/build.sh b/recipe/build.sh
index af1097a7d0..e0e7f280bb 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -1,4 +1,5 @@
mkdir build
cd build
+export ISISROOT=$PWD
cmake -GNinja -DJP2KFLAG=ON -Dpybindings=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -Disis3Data=/usgs/cpkgs/isis3/data -Disis3TestData=/usgs/cpkgs/isis3/testData ../isis
ninja install
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 173ba0723f..f2df77425e 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -18,12 +18,12 @@
# A Public Release for ISIS3.6.1: {% set version = "3.6.1" %}
# A Release Candidate for ISIS3.6.1: {% set version = "3.6.1_RC" %}
# A custom build of ISIS3.6.1 for the CaSSIS mission: {% set version = "3.6.1_cassis" %}
-{% set version = "4.0.0" %}
+{% set version = "4.0.1" %}
# This is the build number for the current version you are building. If this is the first build of
# this version, the build number will be 0. It is incremented by 1 with every consecutive build of
# the same version.
-{% set build_number = "1" %}
+{% set build_number = "0" %}
package:
name: isis