MetadataForensics / Google-Location-History-Data-Parser

This free tool parses Google Takeout Location History Exports or Google Semantic Location History Warrant Return Data in a forensic manner.
Other
19 stars 3 forks source link

Kml file timestamp definition #2

Open andyzukunft opened 2 days ago

andyzukunft commented 2 days ago

Hey all,

your app is a godsend as I try to digest the Google Takeout for location data.

However I have a problem with an application to use your exported kml data. The app works with the Google Timeline kml export which provides a TimeSpan node to every Placemark. The only time element you provide is as a Description to the Placemark . The application also expects a TimeSpan node to be present to represent the location in time.

Your kml export:

<Placemark id="4147107">
    <name>Location 2073552</name>
    <description>Timestamp: 2024-03-22 07:42:14
Accuracy: 243
Device Tag: 905072558
File Name: Records.json</description>
    <Point id="4147106">
        <coordinates>140.3182827,35.7854709,0.0</coordinates>
    </Point>
</Placemark>

Google Timeline kml export (example, removed additional data):

<Placemark>
    <name/>
    <address/>
    <ExtendedData />
    <description/>
    <LineString>
        <altitudeMode/>
        <extrude/>
        <tesselate />
        <coordinates/>
    </LineString>
    <Point>
                <coordinates>140.3182827,35.7854709,0</coordinates>
        </Point>
        <TimeSpan>
                <begin>2024-03-22T05:20:02.000Z</begin>
                <end>2024-03-22T06:55:39.000Z</end>
        </TimeSpan>
</Placemark>

Is it possible to adjust your conversion to adher to the Google Timeline kml export for the TimeSpan node?

MetadataForensics commented 22 hours ago

@andyzukunft Thanks very much for your feedback! Always happy to add support for issues such as this. If you can provide a little bit more additional information it would assist in the pending update. What application are you using to examine the kml files? (Just curious in general what is being used with the tool's outputs). Also, are you able to provide which data points should have TimeSpan data added? (i.e., Records.json, parking events, road segments, etc.) If you are able to add context based on the kml name or csv name it would clarify the issue fastest. Thanks again!

andyzukunft commented 18 hours ago

Hey, thanks for taking an interest.

I am trying to add gps locations to photos. We are talking about a few thousands of raw and jpeg photos taken over the last couple of years. As a data origin I want to access the Google Timeline data using Google Takeout. The .kml file provided by Google Timeline as a single day export is a hassle (only a single day) and does not provide a lot of details (e.g. a short day trip east of Tokyo for a couple of hours resulted in four "coordinate points" for the whole day) as only "semantic data" is easily accessible in the Google export without parsing the other files (as you do).

As a result I looked for an option to parse the Google Takeout data into some kind gps trace file - such as kml. Your tool does the job (even though it consumes more RAM than most people have ;-)). However the export of Activity_Segment_Waypoints.kml provides no timespan-node for automated data extraction but only as a description text. The Google Timeline day export does contain such a node.

In my opinion all of the export kml files which export Placemark entries should get a form of defined time node.