File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ namespace Isis {
7777
7878 raw += " <label>\n " ;
7979 stringstream str;
80+ // Force BandSequential format as a hack to avoid issues
81+ // opening/operating on GTiff formated data
82+ PvlObject& core = cubeLabel.findObject (" IsisCube" ).findObject (" Core" );
83+ if (core.findKeyword (" Format" )[0 ] == " GTiff" ) {
84+ core.findKeyword (" Format" ) = " BandSequential" ;
85+ }
8086 str << cubeLabel;
8187 raw += QString (QByteArray (str.str ().c_str ()).toHex ().constData ()) + " \n " ;
8288
Original file line number Diff line number Diff line change @@ -926,7 +926,9 @@ namespace Isis {
926926 realDataFileLabel (), true );
927927 }
928928 else if (m_format == GTiff) {
929- m_dataFile->close ();
929+ if (m_dataFile) {
930+ m_dataFile->close ();
931+ }
930932 m_geodataSet = GDALDataset::FromHandle (GDALOpen (m_dataFileName->expanded ().toStdString ().c_str (), eAccess));
931933 if (!m_geodataSet) {
932934 QString msg = " Opening GDALDataset from [" + m_dataFileName->name () + " ] failed with access [" + eAccess +" ]" ;
You can’t perform that action at this time.
0 commit comments