2 #ifndef HYDROData_Bathymetry_HeaderFile
3 #define HYDROData_Bathymetry_HeaderFile
5 #include <HYDROData_Object.h>
12 DEFINE_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_Object)
15 /**\class HYDROData_Bathymetry
16 * \brief Class that stores/retreives information about the Bathymetry.
18 * The Bathymetry represents measurement of the altitude of points on the terrain.
20 class HYDROData_Bathymetry : public HYDROData_Object
24 typedef gp_XYZ AltitudePoint;
25 typedef QList<AltitudePoint> AltitudePoints;
30 * Enumeration of tags corresponding to the persistent object parameters.
34 DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
35 DataTag_AltitudePoints, ///< altitude points, array of reals
36 DataTag_FilePath ///< bathymetry imported file path
41 DEFINE_STANDARD_RTTI(HYDROData_Bathymetry);
44 * Returns the kind of this object. Must be redefined in all objects of known type.
46 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_BATHYMETRY; }
50 // Public methods to work with Bathymetry altitudes.
53 * Returns altitude points list.
56 HYDRODATA_EXPORT static double GetInvalidAltitude();
59 * Replace current altitude points by new one.
60 * \param thePoints the altitude points list
62 HYDRODATA_EXPORT virtual void SetAltitudePoints( const AltitudePoints& thePoints );
65 * Returns altitude points list.
68 HYDRODATA_EXPORT virtual AltitudePoints GetAltitudePoints() const;
71 * Remove all altitude points.
73 HYDRODATA_EXPORT virtual void RemoveAltitudePoints();
76 * Returns altitude for given point.
77 * \param thePoint the point to examine
78 * \return altitude value
80 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const QPointF& thePoint ) const;
83 * Returns altitude for given point.
84 * \param thePoint the point to examine
85 * \return altitude value
87 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const;
91 // Public methods to work with files.
94 * Stores the bathymetry file path
95 * \param theFilePath image file path
97 HYDRODATA_EXPORT void SetFilePath( const QString& theFilePath );
100 * Returns uploaded bathymetry file path
102 HYDRODATA_EXPORT QString GetFilePath() const;
105 * Imports Bathymetry data from file. The supported file types:
107 * \param theFileName the path to file
108 * \return \c true if file has been successfully read
110 HYDRODATA_EXPORT virtual bool ImportFromFile( const QString& theFileName );
116 * Imports Bathymetry data from 'XYZ' file.
118 bool importFromXYZFile( QFile& theFile,
119 AltitudePoints& thePoints );
123 friend class HYDROData_Iterator;
126 * Creates new object in the internal data structure. Use higher level objects
127 * to create objects with real content.
129 HYDROData_Bathymetry();
132 * Destructs properties of the object and object itself, removes it from the document.
134 ~HYDROData_Bathymetry();