Salome HOME
Merge remote-tracking branch 'remotes/origin/BR_2017' into HEAD
[modules/hydro.git] / src / HYDROData / HYDROData_Bathymetry.cxx
index 64b0907a68b77ab651e54fd37910a963fee786cc..c0f841eb45a54699024bb9095bdbaf04fe381ef2 100644 (file)
@@ -58,7 +58,7 @@
 //#define _DEVDEBUG_
 #include "HYDRO_trace.hxx"
 
-const int BLOCK_SIZE = 1000;
+const int BLOCK_SIZE = 10000;
 
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
 
@@ -719,15 +719,17 @@ bool HYDROData_Bathymetry::importFromXYZFile( QFile&          theFile,
   bool anIsAltitudesInverted = IsAltitudesInverted();
   while ( !theFile.atEnd() )
   {
-    QString aLine = theFile.readLine().simplified();
-    if ( aLine.isEmpty() )
+    std::string aLine = theFile.readLine().simplified().toStdString();
+    if ( aLine.empty() )
       continue;
 
-    QStringList aValues = aLine.split( ' ', QString::SkipEmptyParts );
-    if ( aValues.length() < 3 )
+    HYDROData_Bathymetry::AltitudePoint aPoint;
+    if( sscanf( aLine.c_str(), "%lf %lf %lf", &aPoint.X, &aPoint.Y, &aPoint.Z )!=3 )
       return false;
 
-    HYDROData_Bathymetry::AltitudePoint aPoint;
+    /*QStringList aValues = aLine.split( ' ', QString::SkipEmptyParts );
+    if ( aValues.length() < 3 )
+      return false;
     
     QString anX = aValues.value( 0 );
     QString anY = aValues.value( 1 );
@@ -740,7 +742,7 @@ bool HYDROData_Bathymetry::importFromXYZFile( QFile&          theFile,
     aPoint.Z = aZ.toDouble( &isZOk );
 
     if ( !isXOk || !isYOk || !isZOk )
-      return false;
+      return false;*/
 
     if ( HYDROData_Tool::IsNan( aPoint.X ) || HYDROData_Tool::IsInf( aPoint.X ) ||
          HYDROData_Tool::IsNan( aPoint.Y ) || HYDROData_Tool::IsInf( aPoint.Y ) ||