1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-18 21:04:24 +02:00

Add support for GeoTIFF images

This commit is contained in:
2018-01-08 23:47:45 +01:00
parent 84f41b5aa9
commit 5fa52b0166
44 changed files with 5295 additions and 762 deletions

View File

@ -8,6 +8,7 @@
#include "map/downloader.h"
#include "map/ellipsoid.h"
#include "map/datum.h"
#include "map/pcs.h"
#include "opengl.h"
#include "gui.h"
#include "config.h"
@ -35,6 +36,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
OnlineMap::setDownloader(new Downloader(this));
OPENGL_SET_SAMPLES(4);
loadDatums();
loadPCSs();
_gui = new GUI();
}
@ -107,3 +109,26 @@ void App::loadDatums()
if (!ok)
qWarning("Maps based on a datum different from WGS84 won't work.");
}
void App::loadPCSs()
{
QString file;
if (QFile::exists(USER_PCS_FILE))
file = USER_PCS_FILE;
else if (QFile::exists(GLOBAL_PCS_FILE))
file = GLOBAL_PCS_FILE;
else {
qWarning("No PCS file found.");
return;
}
if (!PCS::loadList(file)) {
if (PCS::errorLine())
qWarning("%s: parse error on line %d: %s", qPrintable(file),
PCS::errorLine(), qPrintable(PCS::errorString()));
else
qWarning("%s: %s", qPrintable(file), qPrintable(
Datum::errorString()));
}
}