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
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 // Public methods to work with Bathymetry altitudes.
52 * Returns altitude points list.
55 HYDRODATA_EXPORT static double GetInvalidAltitude();
58 * Replace current altitude points by new one.
59 * \param thePoints the altitude points list
61 HYDRODATA_EXPORT virtual void SetAltitudePoints( const AltitudePoints& thePoints );
64 * Returns altitude points list.
67 HYDRODATA_EXPORT virtual AltitudePoints GetAltitudePoints() const;
70 * Remove all altitude points.
72 HYDRODATA_EXPORT virtual void RemoveAltitudePoints();
75 * Returns altitude for given point.
76 * \param thePoint the point to examine
77 * \return altitude value
79 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const QPointF& thePoint ) const;
82 * Returns altitude for given point.
83 * \param thePoint the point to examine
84 * \return altitude value
86 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const;
90 // Public methods to work with files.
93 * Imports Bathymetry data from file. The supported file types:
95 * \param theFileName the path to file
96 * \return \c true if file has been successfully read
98 HYDRODATA_EXPORT virtual bool ImportFromFile( const QString& theFileName );
104 * Imports Bathymetry data from 'XYZ' file.
106 bool importFromXYZFile( QFile& theFile,
107 AltitudePoints& thePoints );
111 friend class HYDROData_Iterator;
114 * Creates new object in the internal data structure. Use higher level objects
115 * to create objects with real content.
117 HYDROData_Bathymetry();
120 * Destructs properties of the object and object itself, removes it from the document.
122 ~HYDROData_Bathymetry();