]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
concretions after Merge op.
authorisn <isn@opencascade.com>
Mon, 16 Nov 2015 09:12:36 +0000 (12:12 +0300)
committerisn <isn@opencascade.com>
Mon, 16 Nov 2015 09:18:30 +0000 (12:18 +0300)
src/HYDROData/HYDROData_LandCoverMap.cxx
src/HYDROData/HYDROData_LandCoverMap.h
src/HYDROPy/HYDROData_LandCoverMap.sip

index 3300a211c939769ee4090924b521dca557d79fcd..227405ca4c7a7b457f0857e0564866e645721357 100644 (file)
@@ -229,34 +229,6 @@ bool HYDROData_LandCoverMap::IsEmpty() const
     return false;
 }
 
-bool HYDROData_LandCoverMap::ImportSHP( const QString& theSHPFileName )
-{
-  HYDROData_ShapeFile anImporter;
-  QStringList aPolygonsList;
-  TopTools_SequenceOfShape aPolygonFaces;
-  int aShapeTypeOfFile;
-  int aStatus = anImporter.ImportPolygons( theSHPFileName, aPolygonsList, aPolygonFaces, aShapeTypeOfFile);
-
-  bool isOK = ( aStatus == 1 );
-  if( isOK )
-  {
-    QString aDefaultStricklerType = "";
-
-    HYDROData_MapOfFaceToStricklerType aFaces;
-    for( int i=1, n=aPolygonFaces.Length(); i<=n; i++ )
-    {
-      TopoDS_Shape aShape = aPolygonFaces.Value( i );
-      if( aShape.ShapeType()==TopAbs_FACE )
-        aFaces.Add( TopoDS::Face( aShape ), aDefaultStricklerType );
-    }
-
-    StoreLandCovers( aFaces );
-  }
-
-  anImporter.Free();
-  return isOK;
-}
-
 /**
   Load attributes from DBF File
 ///
@@ -303,11 +275,6 @@ HYDROData_LandCoverMap::DBFStatus HYDROData_LandCoverMap::ImportDBF( const QStri
     return DBFStatus_NO_DBFVALUES_CORRESPONDENCE_WARNING;
 }
 
-void HYDROData_LandCoverMap::ExportSHP( const QString& theSHPFileName ) const
-{
-  //TODO
-}
-
 /**
   Export attributes to DBF File
 ///
@@ -1038,14 +1005,14 @@ double HYDROData_LandCoverMap::GetTransparency() const
   
 }
 
-bool HYDROData_LandCoverMap::ImportShp( const QString& theFileName,
+bool HYDROData_LandCoverMap::ImportSHP( const QString& theSHPFileName,
                                         const QList<int>& theIndices )
 {
   HYDROData_ShapeFile anImporter;
   QStringList aPolyList; 
   TopTools_SequenceOfShape aFaces;
   int aSHapeType = -1;
-  int Stat = anImporter.ImportPolygons(theFileName, aPolyList, aFaces, aSHapeType);
+  int Stat = anImporter.ImportPolygons(theSHPFileName, aPolyList, aFaces, aSHapeType);
   //
   if (Stat != 1)
     return false;
@@ -1082,11 +1049,11 @@ bool HYDROData_LandCoverMap::ImportShp( const QString& theFileName,
   return true;
 }
 
-bool HYDROData_LandCoverMap::ExportShp( const QString& theFileName) const
+bool HYDROData_LandCoverMap::ExportSHP( const QString& theSHPFileName) const
 {
   HYDROData_ShapeFile anExporter;
   QStringList aList;
-  anExporter.Export(theFileName, this, aList);
+  anExporter.Export(theSHPFileName, this, aList);
   if (aList.empty())
     return true;
   else 
index 7df0dcba6b279b9d805acdb41ef1a77bd929dbe9..d88e65d238471d1a9a72a7d4106014da2b1d9da1 100644 (file)
@@ -90,15 +90,16 @@ public:
 
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
 
-  HYDRODATA_EXPORT bool ImportSHP( const QString& theSHPFileName );
+  HYDRODATA_EXPORT bool ImportSHP( const QString& theSHPFileName,
+                                   const QList<int>& theIndices = QList<int>());
+  HYDRODATA_EXPORT bool ExportSHP( const QString& theSHPFileName ) const;
 
   HYDRODATA_EXPORT DBFStatus ImportDBF( const QString& theDBFFileName, 
                                         const QString& theFieldName, 
                                         const QStringList& DBFValues,
                                         const QStringList& StricklerTypes,
                                         const QList<int>& theIndices = QList<int>() );
-  HYDRODATA_EXPORT void ExportSHP( const QString& theSHPFileName ) const;
 
   HYDRODATA_EXPORT void ExportDBF( const QString& theDBFFileName,
                                    const QString& theFieldName, 
@@ -108,8 +109,6 @@ public:
   HYDRODATA_EXPORT bool ExportTelemac( const QString& theFileName,
                                        double theDeflection,
                                        const Handle_HYDROData_StricklerTable& theTable ) const;
-  bool ExportShp( const QString& theFileName) const;
-
 
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType );
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType );
index 802811dd58461e24db36a8fcf465a87260b17ae8..d8e3706ad30e725aa569ecb802eb0dbb0e6505a8 100644 (file)
@@ -65,9 +65,9 @@ public:
     const QStringList& theDBFValues,
     const QStringList& theStricklerTypes ) const;
  
-  bool ImportShp( const QString& theFileName);
+  bool ImportSHP( const QString& theFileName);
 
-  bool ExportShp( const QString& theFileName) const;
+  bool ExportSHP( const QString& theFileName) const;
 
   bool ExportTelemac( const QString& theFileName, double theDeflection,
                                          HYDROData_StricklerTable theTable ) const