2 #ifndef HYDROData_Bathymetry_HeaderFile
3 #define HYDROData_Bathymetry_HeaderFile
5 #include "HYDROData_IAltitudeObject.h"
10 DEFINE_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
13 /**\class HYDROData_Bathymetry
14 * \brief Class that stores/retreives information about the Bathymetry.
16 * The Bathymetry represents measurement of the altitude of points on the terrain.
18 class HYDROData_Bathymetry : public HYDROData_IAltitudeObject
22 typedef gp_XYZ AltitudePoint;
23 typedef NCollection_Sequence<AltitudePoint> AltitudePoints;
28 * Enumeration of tags corresponding to the persistent object parameters.
32 DataTag_First = HYDROData_IAltitudeObject::DataTag_First + 100, ///< first tag, to reserve
33 DataTag_AltitudePoints, ///< altitude points, array of reals
34 DataTag_FilePath, ///< bathymetry imported file path
35 DataTag_AltitudesInverted, ///< flag to invert z values
40 DEFINE_STANDARD_RTTI(HYDROData_Bathymetry);
43 * Returns the kind of this object. Must be redefined in all objects of known type.
45 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_BATHYMETRY; }
49 * Dump Bathymetry object to Python script representation.
51 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
54 // Public methods to work with Bathymetry altitudes.
57 * Replace current altitude points by new one.
58 * \param thePoints the altitude points list
60 HYDRODATA_EXPORT virtual void SetAltitudePoints( const AltitudePoints& thePoints );
63 * Returns altitude points list.
66 HYDRODATA_EXPORT virtual AltitudePoints GetAltitudePoints() const;
69 * Remove all altitude points.
71 HYDRODATA_EXPORT virtual void RemoveAltitudePoints();
74 * Returns altitude for given point.
75 * \param thePoint the point to examine
76 * \return altitude value
78 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const;
81 // Public methods to work with files.
84 * Stores the bathymetry file path
85 * \param theFilePath image file path
87 HYDRODATA_EXPORT void SetFilePath( const TCollection_AsciiString& theFilePath );
90 * Returns uploaded bathymetry file path
92 HYDRODATA_EXPORT TCollection_AsciiString GetFilePath() const;
95 * Set flag indicating needs to invert altitude values
96 * \param theIsInverted new invert value
97 * \param theIsUpdate flag indicating necessity to update points
99 HYDRODATA_EXPORT void SetAltitudesInverted( const bool theIsInverted,
100 const bool theIsUpdate = true );
103 * Returns flag indicating needs to invert altitude values.
105 HYDRODATA_EXPORT bool IsAltitudesInverted() const;
108 * Imports Bathymetry data from file. The supported file types:
110 * \param theFileName the path to file
111 * \return \c true if file has been successfully read
113 HYDRODATA_EXPORT virtual bool ImportFromFile( const TCollection_AsciiString& theFileName );
115 HYDRODATA_EXPORT bool CreateBoundaryPolyline() const;
120 * Imports Bathymetry data from 'XYZ' file.
122 bool importFromXYZFile( QFile& theFile,
123 AltitudePoints& thePoints ) const;
127 friend class HYDROData_Iterator;
130 * Creates new object in the internal data structure. Use higher level objects
131 * to create objects with real content.
133 HYDRODATA_EXPORT HYDROData_Bathymetry();
136 * Destructs properties of the object and object itself, removes it from the document.
138 HYDRODATA_EXPORT ~HYDROData_Bathymetry();