@@ -1207,7 +1207,9 @@ void dna_geoid_interpolation::CreateNTv2File(const char* datFile, const n_file_p
12071207 std::cout << PROGRESS_BACKSPACE_04 << " done." << std::endl;
12081208
12091209 std::cout << " + WINTER DAT file structure appears OK." << std::endl;
1210- std::cout << " + Reading geoid values from WINTER DAT file... " ;
1210+ std::cout << " + Reading geoid" << (m_loadUncertainties ? " and uncertainties " : " " ) << " from WINTER DAT file"
1211+ << (m_loadUncertainties ? " s... " : " ... " );
1212+
12111213 geoid_values* ag_data = new geoid_values[lNodeRead];
12121214
12131215 // Update header record
@@ -1251,11 +1253,20 @@ void dna_geoid_interpolation::CreateNTv2File(const char* datFile, const n_file_p
12511253 lNodeCount = 0 ;
12521254
12531255 try {
1256+ ss.str (" " );
1257+ ss << std::setw (3 ) << std::fixed << std::setprecision (0 ) << std::right << m_dPercentComplete << " %" ;
1258+ std::cout << std::setw (PROGRESS_PERCENT_04) << ss.str ();
1259+
12541260 while (!f_in.eof ())
12551261 {
12561262 m_iBytesRead = (int )f_in.tellg ();
12571263 m_dPercentComplete = (double )(m_iBytesRead) / (double )lFileLen * 100.0 ;
1258-
1264+
1265+ ss.str (" " );
1266+ ss << std::setw (3 ) << std::fixed << std::setprecision (0 ) << std::right << m_dPercentComplete << " %" ;
1267+ std::cout << PROGRESS_BACKSPACE_04 << std::setw (PROGRESS_PERCENT_04) << ss.str ();
1268+ std::cout.flush ();
1269+
12591270 // extract data:
12601271 // n value (metres)
12611272 // deflection in prime meridian (seconds)
@@ -1310,9 +1321,9 @@ void dna_geoid_interpolation::CreateNTv2File(const char* datFile, const n_file_p
13101321 throw NetGeoidException (ErrorString (ERR_GRIDFILE_READ) + " \n " + f.what (), ERR_GRIDFILE_READ);
13111322 }
13121323
1313- std::cout << " done." << std::endl;
1324+ std::cout << PROGRESS_BACKSPACE_04 << " done." << std::endl;
13141325
1315- std::cout << " + Creating NTv2 gsb file... " ;
1326+ std::cout << " + Creating NTv2 GSB file... " ;
13161327
13171328 m_dPercentComplete = 0 ;
13181329
@@ -1324,6 +1335,7 @@ void dna_geoid_interpolation::CreateNTv2File(const char* datFile, const n_file_p
13241335 for (i=0 ; i<lNodeRead; ++i)
13251336 {
13261337 --lNodeCount;
1338+ // NTv2 GSB values are stored in reverse order to WINTER DAT
13271339 WriteBinaryRecords (&f_out, (float )ag_data[lNodeCount].dN_value , (float )ag_data[lNodeCount].dDefl_meridian , (float )ag_data[lNodeCount].dDefl_primev , (float )ag_data[lNodeCount].dN_uncertainty );
13281340 m_dPercentComplete = (double )(lNodeRead - lNodeCount) / (double )lNodeRead * 100.0 ;
13291341
0 commit comments