Closed bbrouwer closed 5 years ago
Google's export seems to have an overflow.
If the number is greater than 1800000000 you need to subtract 2^32 (=4294967296) and you get the correct latitudeE7 or longitudeE7.
eg:
if item["latitudeE7"] > 1800000000:
item["latitudeE7"] = item["latitudeE7"] - 4294967296
if item["longitudeE7"] > 1800000000:
item["longitudeE7"] = item["longitudeE7"] - 4294967296
That was it exactly. Thank you so much for the solution.
Recently, when exporting location history, the Longitude values being exported seem to be invalid. I believe it may be a problem with the JSON being exported from Google, but was wondering if you had seen this before. Here is an example record from the exported JSON:
Exporting to KML, GPX, whatever, simply gives me longitude values of 343.xxxxxxx when valid values are supposed to be -180 to 180. The actual longitude I'm expecting is somewhere around -85.xxxxxxx. Simple math of subtracting 360 doesn't even work as that only gives me about -16.xxxxxxx.
Have you seen this before? Is this something your tool was designed to handle?