1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Compare commits

...

4 Commits

4 changed files with 11 additions and 7 deletions

View File

@ -41,4 +41,4 @@ private:
}
#endif // IMG_ELEVATIONTREE_H
#endif // IMG_DEM_H

View File

@ -30,7 +30,6 @@ using namespace IMG;
#define WATER 1
#define BLUR_RADIUS 3
#define DELTA 0.05 /* DEM3 resolution in degrees */
static const QColor textColor(Qt::black);
static const QColor haloColor(Qt::white);
@ -477,9 +476,11 @@ MatrixD RasterTile::elevation(int extend) const
for (int i = 0; i < ll.size(); i++)
rect = rect.united(ll.at(i));
// Extra margin for edge()
rect = rect.united(Coordinates(rect.right() + DELTA,
rect.bottom() - DELTA));
// Extra margin for always including the next DEM tile on the map tile
// edges (the DEM tile resolution is usally < 5% of the map tile)
double delta = rect.width() / 16;
rect = rect.united(Coordinates(rect.right() + delta,
rect.bottom() - delta));
_data->elevations(rect, _zoom, &tiles);

View File

@ -276,7 +276,10 @@ void VectorTile::elevations(const RectC &rect, const Zoom &zoom,
}
}
int level = _dem->level(zoom);
// Shift the DEM level to get better data then what the map defines for
// the given zoom (we prefer rendering quality rather than speed). For
// maps with a single level this has no effect.
int level = _dem->level(zoom) / 2;
QList<const DEMTile*> tiles(_dem->tiles(rect, level));
for (int i = 0; i < tiles.size(); i++) {
const DEMTile *tile = tiles.at(i);

View File

@ -8,7 +8,7 @@ class HillShading
{
public:
static QImage render(const MatrixD &m, int extend, quint8 alpha = 96,
double z = 0.3, double azimuth = 315, double elevation = 25);
double z = 0.6, double azimuth = 315, double elevation = 45);
};
#endif // HILLSHADING_H