1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

A much more accurate overlap delta value

This commit is contained in:
Martin Tůma 2024-05-20 21:13:27 +02:00
parent 1af2c130b0
commit b28217a026

View File

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