Salome HOME
ImportFromFile()
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.h
index 3e97e06af6843ecbf36bb9f5d3abe7dace896cfd..e009351a2baa6e20176ca49c3baa0b7218103401 100644 (file)
 #include <QString>
 #include <TopoDS_Face.hxx>
 #include <TopExp_Explorer.hxx>
+#include <vector>
+#include <set>
+
+class Handle_HYDROData_StricklerTable;
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 
 typedef NCollection_IndexedDataMap<TopoDS_Face, QString> HYDROData_MapOfFaceToStricklerType;
 
@@ -36,7 +41,7 @@ class TopoDS_Iterator;
 class TopTools_ListOfShape;
 class Handle( HYDROData_PolylineXY );
 class Handle( HYDROData_Object );
-class gp_Pnt2d;
+class gp_XY;
 
 class HYDROData_LandCoverMap : public HYDROData_Entity
 {
@@ -88,18 +93,25 @@ public:
 
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
 
+  HYDRODATA_EXPORT bool ImportSHP( const QString& theSHPFileName,
+                                   const QList<int>& theIndices = QList<int>() );
+  HYDRODATA_EXPORT bool ExportSHP( const QString& theSHPFileName, bool bUseDiscr = false, double theDefl = 0.1) const;
+
   HYDRODATA_EXPORT DBFStatus ImportDBF( const QString& theDBFFileName, 
                                         const QString& theFieldName, 
                                         const QStringList& DBFValues,
                                         const QStringList& StricklerTypes,
-                                        const QList<int>& theIndices );
+                                        const QList<int>& theIndices = QList<int>() );
+
   HYDRODATA_EXPORT void ExportDBF( const QString& theDBFFileName,
                                    const QString& theFieldName, 
                                    const QStringList& theDBFValues,
                                    const QStringList& theStricklerTypes ) const;
 
-  HYDRODATA_EXPORT bool ExportTelemac( const QString& theFileName, double theDeflection ) const;
+  HYDRODATA_EXPORT bool ExportTelemac( const QString& theFileName,
+                                       double theDeflection,
+                                       const Handle_HYDROData_StricklerTable& theTable ) const;
 
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType );
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType );
@@ -119,7 +131,8 @@ public:
 
   HYDRODATA_EXPORT QString StricklerType( const TopoDS_Face& ) const;
 
-  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath,
+                                                     MapOfTreatedObjects& theTreatedObjects ) const;
 
   HYDRODATA_EXPORT int GetLCCount() const;
   HYDRODATA_EXPORT bool IsEmpty() const;
@@ -131,15 +144,29 @@ public:
   HYDRODATA_EXPORT void SetTransparency( double );
   HYDRODATA_EXPORT double GetTransparency() const;
 
-  HYDRODATA_EXPORT TopoDS_Shape RemoveInternal(const TopoDS_Shape& InSh);
+  HYDRODATA_EXPORT void RemoveInternal(TopoDS_Shape& ShToRebuild, NCollection_IndexedDataMap<TopoDS_Face, TopoDS_Face>* aF2FReplace);
+
+  HYDRODATA_EXPORT bool CheckLinear();
+
+  HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy );
+
+  HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_XY>& thePoints, std::vector<std::set <QString> >& theTypes ) const;
+
+  HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_XY>& thePoints,
+    Handle(HYDROData_StricklerTable) theTable, 
+    std::vector<double>& theCoeffs, double DefValue, bool UseMax ) const;
 
 protected:
   void SetShape( const TopoDS_Shape& );
 
   bool Add( const TopoDS_Wire&, const QString& );
+
   bool LocalPartition( const TopoDS_Shape&, const QString& theNewType );
+
   static TopoDS_Shape MergeFaces(const TopTools_ListOfShape& theFaces,
-                      bool IsToUnify, double theTolerance = 1E-5 );
+                                 bool IsToUnify,
+                                 TopTools_IndexedDataMapOfShapeListOfShape* theShHistory = NULL, 
+                                 double theTolerance = 1E-5 );
 
 public:
   DEFINE_STANDARD_RTTI( HYDROData_LandCoverMap );