mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Missing file changes...
This commit is contained in:
parent
60f107d7cd
commit
8f815a6af0
@ -151,7 +151,8 @@ SOURCES += src/main.cpp \
|
||||
src/tar.cpp \
|
||||
src/atlas.cpp \
|
||||
src/mercator.cpp \
|
||||
src/transversemercator.cpp
|
||||
src/transversemercator.cpp \
|
||||
src/utm.cpp
|
||||
RESOURCES += gpxsee.qrc
|
||||
TRANSLATIONS = lang/gpxsee_cs.ts \
|
||||
lang/gpxsee_sv.ts
|
||||
|
@ -128,6 +128,12 @@ int OfflineMap::parseMapFile(QIODevice &device, QList<ReferencePoint> &points,
|
||||
bool OfflineMap::createProjection(const QString &projection,
|
||||
const ProjectionSetup &setup, QList<ReferencePoint> &points)
|
||||
{
|
||||
if (points.count() < 2) {
|
||||
qWarning("%s: insufficient number of reference points",
|
||||
qPrintable(_name));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (projection == "Mercator")
|
||||
_projection = new Mercator();
|
||||
else if (projection == "Transverse Mercator")
|
||||
@ -135,9 +141,16 @@ bool OfflineMap::createProjection(const QString &projection,
|
||||
setup.falseEasting, setup.falseNorthing);
|
||||
else if (projection == "Latitude/Longitude")
|
||||
_projection = new LatLon();
|
||||
else if (projection == "(UTM) Universal Transverse Mercator")
|
||||
_projection = new UTM(setup.zone);
|
||||
else {
|
||||
else if (projection == "(UTM) Universal Transverse Mercator") {
|
||||
if (setup.zone)
|
||||
_projection = new UTM(setup.zone);
|
||||
else if (!points.first().ll.isNull())
|
||||
_projection = new UTM(points.first().ll);
|
||||
else {
|
||||
qWarning("%s: Can not determine UTM zone", qPrintable(_name));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
qWarning("%s: %s: unsupported map projection", qPrintable(_name),
|
||||
qPrintable(projection));
|
||||
return false;
|
||||
@ -152,11 +165,7 @@ bool OfflineMap::createProjection(const QString &projection,
|
||||
|
||||
bool OfflineMap::computeTransformation(const QList<ReferencePoint> &points)
|
||||
{
|
||||
if (points.count() < 2) {
|
||||
qWarning("%s: insufficient number of reference points",
|
||||
qPrintable(_name));
|
||||
return false;
|
||||
}
|
||||
Q_ASSERT(points.count() >= 2);
|
||||
|
||||
Matrix c(3, 2);
|
||||
c.zeroize();
|
||||
|
@ -3,6 +3,15 @@
|
||||
#include "wgs84.h"
|
||||
#include "transversemercator.h"
|
||||
|
||||
|
||||
TransverseMercator::TransverseMercator()
|
||||
{
|
||||
_centralMeridian = 0;
|
||||
_scale = 1.0;
|
||||
_falseEasting = 0;
|
||||
_falseNorthing = 0;
|
||||
}
|
||||
|
||||
TransverseMercator::TransverseMercator(double centralMeridian, double scale,
|
||||
double falseEasting, double falseNorthing)
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
class TransverseMercator : public Projection
|
||||
{
|
||||
public:
|
||||
TransverseMercator();
|
||||
TransverseMercator(double centralMeridian, double scale,
|
||||
double falseEasting, double falseNorthing);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user