/** * @RDE_HEADER@ * Interface of Viewshed * $Id$ * $HeadURL$ * $Author$ */ #pragma once // Own #include "situation_map_types.h" #include "viewshed_parameter.h" #include // Qt #include #include #include //---------------------------------------------------------------------------- namespace SituationMap { /** * @brief The Viewshed class creating a viewshed. */ class SITUATIONMAP_EXPORT Viewshed : public QObject { using BaseClass = QObject; Q_OBJECT public: Viewshed() = default; ///< Contructor virtual ~Viewshed() = default; ///< Destructor Viewshed(const Viewshed &other) = delete; Viewshed &operator=(Viewshed &other) = delete; /** * Defines URL to elevation data service or file with elevation data * */ virtual void setViewshedUrl(const QString &viewshedServiceUrl) = 0; /** * Creates ESRI based viewshed and starts a rubberband to define the area to analyse. On success the return value is true. */ virtual bool create() = 0; /** * Creates a GeISiR fan of sight and starts a rubberband to define the area (center point and radius) to analyse. * * @param alpha Alpha value to apply to predefined colors SightFan. * @param innerRadius Distance from center point to start the analyse. * @param observerHeight Height of center point above terrain. * @param targetHeight Height of visible objects or targets. * @param beamAngle Beam width in degree of a single scan line. * * @return true on success */ virtual bool create(double alpha, double innerRadius, double observerHeight, double targetHeight, double beamAngle) = 0; // will start a rubberband to create a fan of sight /** * Create a viewshed from existing parameter settings. * * @return true on success */ virtual long create(const ViewshedParameter &viewshedParameter) = 0; /** * In case of using GeSiR fan of sight for analysing modify the parameter settings. * * @param viewshedId Id of viewshed. In case of viewshedId is "-1" the current viwshed (last created) will be modified * @param alpha Alpha value to apply to predefined colors SightFan. * @param innerRadius Distance from center point to start the analyse. * @param observerHeight Height of center point above terrain. * @param targetHeight Height of visible objects or targets. * @param beamAngle Beam width in degree of a single scan line. * * @return true on success */ virtual bool modify(long viewshedId, double alpha, double innerRadius, double observerHeight, double targetHeight, double beamAngle) = 0; /** * Remove a viewshed. In case of viewshedId is "-1" all viewsheds will be removed. * @param vieweshedId Id of viewshed or "-1" */ virtual void remove(long viewshedId = -1) = 0; /** * Get parameter of a viewshed. In case of viewshedId is "-1" the current viwshed (last created) will be used * @param vieweshedId Id of viewshed or "-1" * @param ok Pointer bool variable set to true on success. * * @return Struct with viewshed parameters. */ virtual ViewshedParameter getViewshedParameter(long viewshedId = -1, bool *ok = nullptr) const = 0; Q_SIGNALS: void viewshedFinished(long viewshedId); }; } // namespace SituationMap