1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2018-01-09 23:19:24 +01:00
parent 89878fade1
commit fc80bd1b7c

View File

@ -176,16 +176,16 @@ bool MapFile::createProjection(const QString &name,
else if (name == "(A)Lambert Azimuthual Equal Area") else if (name == "(A)Lambert Azimuthual Equal Area")
_projection = Projection::projection(_datum, 9820, setup); _projection = Projection::projection(_datum, 9820, setup);
else if (name == "(UTM) Universal Transverse Mercator") { else if (name == "(UTM) Universal Transverse Mercator") {
Projection::Setup s; int zone;
if (points.first().zone) if (points.first().zone)
s = UTM::setup(points.first().zone); zone = points.first().zone;
else if (!points.first().ll.isNull()) else if (!points.first().ll.isNull())
s = UTM::setup(UTM::zone(points.first().ll)); zone = UTM::zone(points.first().ll);
else { else {
_errorString = "Can not determine UTM zone"; _errorString = "Can not determine UTM zone";
return 0; return 0;
} }
_projection = Projection::projection(_datum, 9807, s); _projection = Projection::projection(_datum, 9807, UTM::setup(zone));
} else if (name == "(NZTM2) New Zealand TM 2000") } else if (name == "(NZTM2) New Zealand TM 2000")
_projection = Projection::projection(_datum, 9807, Projection::Setup( _projection = Projection::projection(_datum, 9807, Projection::Setup(
0, 173.0, 0.9996, 1600000, 10000000, NAN, NAN)); 0, 173.0, 0.9996, 1600000, 10000000, NAN, NAN));