/** * @RDE_HEADER@ * adapting GeISiR source to SituationMap * $Id$ * $HeadURL$ * $Author$ */ #include "elevation_map.h" #include #include #include #include namespace SituationMap { // GDAL is not part of the Qt6/ArcGIS-300 build (no GDAL in the toolchain; // see the no-GDAL ElevationMap stub decision). This translation unit is the // no-GDAL stand-in for the legacy GDAL-backed reader: the public API is // preserved (header unchanged) so consumers (MapImpl, ElevationMapManager, // SightFanImpl) compile and link; elevation data is simply not loaded, so // queries return defaults / no-coverage. Everything else in the module // (ElevationMapManager, line_of_sight_calculation) is real, GDAL-free Qt code. struct ElevationMap::Internal { }; ElevationMap::ElevationMap(const QFileInfo &fileInfo) : m_internal(new Internal()) , m_fileName(fileInfo.absoluteFilePath()) , m_aproximation(false) , m_valid(false) , m_logger(getLogger("ElevationMap")) { readFromFile(); } ElevationMap::~ElevationMap() { delete m_internal; } bool ElevationMap::waitForInitialization() { // No asynchronous GDAL read is started, so initialization is already done. return true; } bool ElevationMap::isValid() const { return m_valid; } QString ElevationMap::filename() const { return m_fileName; } QRectF ElevationMap::extent() const { return QRectF(); } QPair ElevationMap::elexelSize() const { return qMakePair(0.0, 0.0); } double ElevationMap::elevation(double, double) const { return std::numeric_limits::quiet_NaN(); } double ElevationMap::distance(const QPointF &start, const QPointF &end) const { return (end - start).manhattanLength(); } double ElevationMap::profileDistance(const QPointF &start, const QPointF &end) const { return (end - start).manhattanLength(); } unsigned int ElevationMap::elevationProfile(const QPointF &, const QPointF &, Vec3dVector &) const { return 0; } bool ElevationMap::contains(const QPointF &) const { return false; } bool ElevationMap::intersects(const QPolygonF &) const { return false; } void ElevationMap::LOSProfile(const QPointF &, const QPointF &, LOSVector &) { } int ElevationMap::getElevation(int, int) const { return std::numeric_limits::min(); } double ElevationMap::getElevation(double, double) const { return std::numeric_limits::quiet_NaN(); } double ElevationMap::getOrSubstituteElevation(int, int, double substitute) const { return substitute; } void ElevationMap::getSamplePoints(const QPointF &, const QPointF &, Vec3dVector &) const { } int ElevationMap::clipp2Map(const QPointF &, const QPointF &, QPointF &, QPointF &) const { return 0; } bool ElevationMap::readFromFile() { // No GDAL: no DEM is read. m_valid = false; return false; } } // namespace SituationMap