mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correctly parse GPS coordinates with a ',' between lat and lon
We use this in our own HTML export - and Google uses that in their standard way of describing GPS coordinates. With this the new test passes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5d2436b504
commit
088c9003c0
1 changed files with 7 additions and 0 deletions
|
@ -425,6 +425,13 @@ static bool parseCoord(const QString& txt, int& pos, const QString& positives,
|
||||||
value += number / 3600.0;
|
value += number / 3600.0;
|
||||||
numberDefined = false;
|
numberDefined = false;
|
||||||
secondsDefined = true;
|
secondsDefined = true;
|
||||||
|
} else if ((numberDefined || minutesDefined || secondsDefined) &&
|
||||||
|
(txt[pos] == ',' || txt[pos] == ';')) {
|
||||||
|
// next coordinate coming up
|
||||||
|
// eat the ',' and any subsequent white space
|
||||||
|
while (txt[++pos].isSpace())
|
||||||
|
/* nothing */ ;
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue