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

Print a warning on invalid subdiv bounds

This commit is contained in:
Martin Tůma 2020-11-01 23:47:44 +01:00
parent de7664ccc7
commit 80f5bbfbce

View File

@ -202,8 +202,12 @@ bool TREFile::load(int idx)
double min[2], max[2];
RectC bounds(Coordinates(LB(lon - width), toWGS24(lat + height)),
Coordinates(RB(lon + width), toWGS24(lat - height)));
if (!bounds.isValid())
if (!bounds.isValid()) {
qWarning("%s: invalid subdiv bounds (level %d; pos %f,%f; size %fx%f)",
qPrintable(fileName()), level.level, toWGS24(lon), toWGS24(lat),
toWGS24(width), toWGS24(height));
goto error;
}
min[0] = bounds.left();
min[1] = bounds.bottom();