1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-08 11:13:02 +02:00

Compare commits

..

No commits in common. "ece1fdbbd39d3534474a86603c16d7a0580ce7c5" and "f07f3de19f6c74ac53ab7a6b3a4588ae58f5ee45" have entirely different histories.

7 changed files with 13 additions and 14 deletions

View File

@ -172,10 +172,12 @@ PathItem *MapView::addTrack(const Track &track)
return 0; return 0;
} }
QColor color(_palette.nextColor());
TrackItem *ti = new TrackItem(track, _map); TrackItem *ti = new TrackItem(track, _map);
_tracks.append(ti); _tracks.append(ti);
_tr |= ti->path().boundingRect(); _tr |= ti->path().boundingRect();
ti->setColor(_palette.nextColor()); ti->setColor(color);
ti->setWidth(_trackWidth); ti->setWidth(_trackWidth);
ti->setPenStyle(_trackStyle); ti->setPenStyle(_trackStyle);
ti->setVisible(_showTracks); ti->setVisible(_showTracks);

View File

@ -146,7 +146,6 @@ bool VKXParser::parse(QFile *file, QList<TrackData> &tracks,
} }
tracks.append(segment); tracks.append(segment);
tracks.last().setFile(file->fileName());
return true; return true;
} }

View File

@ -213,7 +213,5 @@ bool VTKParser::parse(QFile *file, QList<TrackData> &tracks,
} }
tracks.append(segment); tracks.append(segment);
tracks.last().setFile(file->fileName());
return true; return true;
} }

View File

@ -19,13 +19,13 @@ public:
const Polygon &path() const {return _path;} const Polygon &path() const {return _path;}
uint type() const {return _type;} uint type() const {return _type;}
const Attributes &attributes() const {return _attr;} const Attributes &attributes() const {return _attr;}
uint huni() const {return _huni;} uint HUNI() const {return _HUNI;}
private: private:
uint _type; uint _type;
Polygon _path; Polygon _path;
Attributes _attr; Attributes _attr;
uint _huni; uint _HUNI;
}; };
class Line { class Line {

View File

@ -215,7 +215,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
|| type == SUBTYPE(RESARE, 25) || type == SUBTYPE(I_RESARE, 25) || type == SUBTYPE(RESARE, 25) || type == SUBTYPE(I_RESARE, 25)
|| type == SUBTYPE(RESARE, 26) || type == SUBTYPE(I_RESARE, 26)) || type == SUBTYPE(RESARE, 26) || type == SUBTYPE(I_RESARE, 26))
points->append(MapData::Point(baseType, polygon->bounds().center(), points->append(MapData::Point(baseType, polygon->bounds().center(),
polygon->attributes(), polygon->huni(), true)); polygon->attributes(), polygon->HUNI(), true));
return true; return true;
} }
@ -466,7 +466,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
} }
MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr, MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr,
uint HUNI) : _path(path), _attr(attr), _huni(HUNI) uint HUNI) : _path(path), _attr(attr), _HUNI(HUNI)
{ {
uint subtype = 0; uint subtype = 0;

View File

@ -84,7 +84,7 @@ Polyconic::Polyconic(const Ellipsoid &ellipsoid, double latitudeOrigin,
sin2lat = POLY_COEFF_TIMES_SIN(_c1, 2.0, _latitudeOrigin); sin2lat = POLY_COEFF_TIMES_SIN(_c1, 2.0, _latitudeOrigin);
sin4lat = POLY_COEFF_TIMES_SIN(_c2, 4.0, _latitudeOrigin); sin4lat = POLY_COEFF_TIMES_SIN(_c2, 4.0, _latitudeOrigin);
sin6lat = POLY_COEFF_TIMES_SIN(_c3, 6.0, _latitudeOrigin); sin6lat = POLY_COEFF_TIMES_SIN(_c3, 6.0, _latitudeOrigin);
_m0 = POLY_M(lat, sin2lat, sin4lat, sin6lat); _M0 = POLY_M(lat, sin2lat, sin4lat, sin6lat);
} }
PointD Polyconic::ll2xy(const Coordinates &c) const PointD Polyconic::ll2xy(const Coordinates &c) const
@ -107,7 +107,7 @@ PointD Polyconic::ll2xy(const Coordinates &c) const
if (Latitude == 0.0) { if (Latitude == 0.0) {
return PointD(_a * dlam + _falseEasting, return PointD(_a * dlam + _falseEasting,
-_m0 + _falseNorthing); -_M0 + _falseNorthing);
} else { } else {
NN = _a / sqrt(1.0 - _es2 * (slat * slat)); NN = _a / sqrt(1.0 - _es2 * (slat * slat));
NN_OVER_tlat = NN / tan(Latitude); NN_OVER_tlat = NN / tan(Latitude);
@ -118,7 +118,7 @@ PointD Polyconic::ll2xy(const Coordinates &c) const
MM = POLY_M(lat, sin2lat, sin4lat, sin6lat); MM = POLY_M(lat, sin2lat, sin4lat, sin6lat);
EE = dlam * slat; EE = dlam * slat;
return PointD(NN_OVER_tlat * sin(EE) + _falseEasting, return PointD(NN_OVER_tlat * sin(EE) + _falseEasting,
MM - _m0 + NN_OVER_tlat * (1.0 - cos(EE)) + _falseNorthing); MM - _M0 + NN_OVER_tlat * (1.0 - cos(EE)) + _falseNorthing);
} }
} }
@ -146,11 +146,11 @@ Coordinates Polyconic::xy2ll(const PointD &p) const
dx = p.x() - _falseEasting; dx = p.x() - _falseEasting;
dx_OVER_Poly_a = dx / _a; dx_OVER_Poly_a = dx / _a;
if (FLOAT_EQ(dy,-_m0,1)) { if (FLOAT_EQ(dy,-_M0,1)) {
Latitude = 0.0; Latitude = 0.0;
Longitude = dx_OVER_Poly_a + _longitudeOrigin; Longitude = dx_OVER_Poly_a + _longitudeOrigin;
} else { } else {
AA = (_m0 + dy) / _a; AA = (_M0 + dy) / _a;
BB = dx_OVER_Poly_a * dx_OVER_Poly_a + (AA * AA); BB = dx_OVER_Poly_a * dx_OVER_Poly_a + (AA * AA);
PHIn = AA; PHIn = AA;

View File

@ -23,7 +23,7 @@ private:
double _es2; double _es2;
double _es4; double _es4;
double _es6; double _es6;
double _m0; double _M0;
double _c0; double _c0;
double _c1; double _c1;
double _c2; double _c2;