@@ -790,11 +790,8 @@ namespace WorldBuilder
790790 {
791791 WBAssertThrow (false , " Could not convert values of /Litho1.0 path into a String. " );
792792 }
793- // std::cout << "flag 160" << std::endl;
794- // WBAssertThrow(false,"Got it! path = " << litho_1_0_path);
795793 constexpr int n1 = 40962 ;
796794 constexpr int n_layers = 9 ;
797- float location_data[40962 * 2 ];
798795 float depth_data[40962 * 9 ];
799796 char tessfile[200 ];
800797 sprintf (tessfile, " %s/litho_depth_data.bin" , litho_1_0_path.c_str ());
@@ -814,24 +811,18 @@ namespace WorldBuilder
814811 WBAssertThrow (false , " ERROR: Could not open file " << tessfile);
815812 }
816813
817- // fread(&depth_data, sizeof(float), n1 * n_layers, fp);
818- // std::cout << std::endl << litho_1_0_path << std::endl;
819- int counter_location_data = 0 ;
814+ size_t counter_location_data = 0 ;
820815 float latitude, glatitude, longitude = 0 ;
821816 while (fscanf (fp, " %f %f %f" , &latitude, &glatitude, &longitude) != EOF)
822817 {
823- const size_t global_index = (counter_location_data/2 )*n_layers+layer_type;
818+ const size_t global_index = (counter_location_data/2 )*n_layers+static_cast < size_t > ( layer_type) ;
824819 result.first .emplace_back (depth_data[global_index]);
825820 result.second .emplace_back (longitude * Consts::PI / 180 .);
826821 result.second .emplace_back (latitude * Consts::PI / 180 .);
827- // std::cout << counter_location_data << "long:lat:depth = " << longitude << ":"
828- // << latitude << ", " << ", "
829- // << ":" << depth_data[global_index] << " (node:global index:local index = " << counter_location_data/2 << ":" << global_index << ":" << layer_type << ")"<< std::endl;
830822 counter_location_data += 2 ;
831823 }
832824
833825 fclose (fp);
834- // float depth_data[40962 * 9];
835826 }
836827 else
837828 {
0 commit comments