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

Added missing DEM rect adjustment

This commit is contained in:
Martin Tůma 2024-06-07 19:29:13 +02:00
parent 3d898bd482
commit cb90523ef7

View File

@ -18,6 +18,7 @@ using namespace IMG;
#define EPSILON 1e-6 #define EPSILON 1e-6
#define TILE_SIZE 384 #define TILE_SIZE 384
#define DELTA 1e-3
static RectC limitBounds(const RectC &bounds, const Projection &proj) static RectC limitBounds(const RectC &bounds, const Projection &proj)
{ {
@ -274,8 +275,8 @@ double IMGMap::elevation(const Coordinates &c)
if (d->hasDEM()) { if (d->hasDEM()) {
QList<MapData::Elevation> tiles; QList<MapData::Elevation> tiles;
d->elevations(RectC(Coordinates(c), Coordinates(c)), d->zooms().max(), d->elevations(RectC(c, Coordinates(c.lon() + DELTA, c.lat() - DELTA)),
&tiles); d->zooms().max(), &tiles);
DEMTree tree(tiles); DEMTree tree(tiles);
return tree.elevation(c); return tree.elevation(c);