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 QList<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
39 DEFINE_STANDARD_RTTI(HYDROData_Bathymetry);
42 * Returns the kind of this object. Must be redefined in all objects of known type.
44 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_BATHYMETRY; }
48 * Dump Bathymetry object to Python script representation.
50 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
53 // Public methods to work with Bathymetry altitudes.
56 * Replace current altitude points by new one.
57 * \param thePoints the altitude points list
59 HYDRODATA_EXPORT virtual void SetAltitudePoints( const AltitudePoints& thePoints );
62 * Returns altitude points list.
65 HYDRODATA_EXPORT virtual AltitudePoints GetAltitudePoints() const;
68 * Remove all altitude points.
70 HYDRODATA_EXPORT virtual void RemoveAltitudePoints();
73 * Returns altitude for given point.
74 * \param thePoint the point to examine
75 * \return altitude value
77 HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const gp_XY& thePoint ) const;
79 using HYDROData_IAltitudeObject::GetAltitudeForPoint;
83 // Public methods to work with files.
86 * Stores the bathymetry file path
87 * \param theFilePath image file path
89 HYDRODATA_EXPORT void SetFilePath( const QString& theFilePath );
92 * Returns uploaded bathymetry file path
94 HYDRODATA_EXPORT QString GetFilePath() const;
97 * Imports Bathymetry data from file. The supported file types:
99 * \param theFileName the path to file
100 * \return \c true if file has been successfully read
102 HYDRODATA_EXPORT virtual bool ImportFromFile( const QString& theFileName );
108 * Imports Bathymetry data from 'XYZ' file.
110 bool importFromXYZFile( QFile& theFile,
111 AltitudePoints& thePoints );
115 friend class HYDROData_Iterator;
118 * Creates new object in the internal data structure. Use higher level objects
119 * to create objects with real content.
121 HYDROData_Bathymetry();
124 * Destructs properties of the object and object itself, removes it from the document.
126 ~HYDROData_Bathymetry();