mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 17:15:14 +01:00
Properly handle axis order in geo URIs
This commit is contained in:
parent
db2d81042b
commit
213ab73ceb
@ -158,8 +158,7 @@ Data::Data(const QString &fileName, bool tryUnknown)
|
||||
Data::Data(const QUrl &url)
|
||||
{
|
||||
bool caOk, cbOk, ccOk;
|
||||
Coordinates c;
|
||||
Projection proj;
|
||||
Projection proj(GCS::WGS84());
|
||||
|
||||
_valid = false;
|
||||
|
||||
@ -205,7 +204,9 @@ Data::Data(const QUrl &url)
|
||||
}
|
||||
}
|
||||
|
||||
c = proj.isValid() ? proj.xy2ll(PointD(ca, cb)) : Coordinates(cb, ca);
|
||||
CoordinateSystem::AxisOrder ao = proj.coordinateSystem().axisOrder();
|
||||
PointD p(ao == CoordinateSystem::XY ? PointD(ca, cb) : PointD(cb, ca));
|
||||
Coordinates c(proj.xy2ll(p));
|
||||
if (!c.isValid()) {
|
||||
_errorString = "Invalid coordinates";
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user