X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_LandCoverMap.h;h=e00eaebd9be20760f0dbfa058d8e1c6b3c77e3a0;hb=58bb6b7459bebeeb089c9ed486c4683a8bae7288;hp=e4a54b875ec89501be4a72ee36caf22658d2a41d;hpb=670039d7a5d25b1da51956b668f212756d31a86e;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_LandCoverMap.h b/src/HYDROData/HYDROData_LandCoverMap.h index e4a54b87..e00eaebd 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.h +++ b/src/HYDROData/HYDROData_LandCoverMap.h @@ -25,18 +25,20 @@ #include #include #include +#include +#include -typedef NCollection_IndexedDataMap HYDROData_MapOfFaceToStricklerType; +class HYDROData_StricklerTable; +#include -DEFINE_STANDARD_HANDLE( HYDROData_LandCoverMap, HYDROData_Entity ) +typedef NCollection_IndexedDataMap HYDROData_MapOfFaceToStricklerType; class TopoDS_Shape; class TopoDS_Wire; class TopoDS_Iterator; -class TopTools_ListOfShape; -class Handle( HYDROData_PolylineXY ); -class Handle( HYDROData_Object ); -class gp_Pnt2d; +class HYDROData_PolylineXY; +class HYDROData_Object; +class gp_XY; class HYDROData_LandCoverMap : public HYDROData_Entity { @@ -48,6 +50,7 @@ protected: DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve DataTag_Shape, ///< the shape presentation of the land cover map DataTag_Types, + DataTag_Transparency, }; public: @@ -87,22 +90,31 @@ public: HYDRODATA_EXPORT virtual const ObjectKind GetKind() const; + HYDRODATA_EXPORT bool ImportSHP( const QString& theSHPFileName, + const QList& theIndices = QList() ); + + 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& theIndices ); - + const QList& theIndices = QList() ); + 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, + QString& statMessage) const; HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType ); HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType ); + using HYDROData_Entity::Remove; HYDRODATA_EXPORT bool Remove( const TopoDS_Face& ); HYDRODATA_EXPORT bool Remove( const TopTools_ListOfShape& ); @@ -118,25 +130,45 @@ 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; HYDRODATA_EXPORT void StoreLandCovers( const HYDROData_MapOfFaceToStricklerType& ); - HYDRODATA_EXPORT TopoDS_Shape RemoveInternal(const TopoDS_Shape& InSh); + HYDRODATA_EXPORT virtual bool IsHas2dPrs() const; + + HYDRODATA_EXPORT void SetTransparency( double ); + HYDRODATA_EXPORT double GetTransparency() const; + + HYDRODATA_EXPORT void RemoveInternal(TopoDS_Shape& ShToRebuild, NCollection_IndexedDataMap* aF2FReplace); + + HYDRODATA_EXPORT bool CheckLinear(); + + HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy ); + + HYDRODATA_EXPORT void ClassifyPoints( const std::vector& thePoints, std::vector >& theTypes ) const; + + HYDRODATA_EXPORT void ClassifyPoints( const std::vector& thePoints, + Handle(HYDROData_StricklerTable) theTable, + std::vector& 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 ); + DEFINE_STANDARD_RTTIEXT( HYDROData_LandCoverMap, HYDROData_Entity ); private: friend class Explorer;