Table of Contents

Class TakeoutRecords

Namespace
TCSystem.Gps
Assembly
TCSystem.Gps.dll

Contains Google Takeout location-history records and provides filtering and nearest-record lookup.

public class TakeoutRecords
Inheritance
TakeoutRecords
Inherited Members

Fields

FormFactorDesktop

The Takeout form-factor value for desktop devices.

public const string FormFactorDesktop = "DESKTOP"

Field Value

string

FormFactorPhone

The Takeout form-factor value for phones.

public const string FormFactorPhone = "PHONE"

Field Value

string

FormFactorTablet

The Takeout form-factor value for tablets.

public const string FormFactorTablet = "TABLET"

Field Value

string

FormFactorUnknown

The value used when Takeout does not specify a form factor.

public const string FormFactorUnknown = ""

Field Value

string

Properties

Locations

Gets all deserialized location records in their source order.

public IReadOnlyList<TakeoutLocation> Locations { get; }

Property Value

IReadOnlyList<TakeoutLocation>

Methods

FindNearestLocation(DateTime, string)

Finds the filtered location whose timestamp is closest to the requested timestamp.

public TakeoutLocation FindNearestLocation(DateTime timestamp, string formFactor)

Parameters

timestamp DateTime

The timestamp to locate.

formFactor string

The requested Takeout form factor.

Returns

TakeoutLocation

The nearest matching location.

Exceptions

ArgumentException

No records match formFactor.

FindNearestLocation(TakeoutLocation[], DateTime)

Finds the record whose timestamp is closest to the requested timestamp.

public static TakeoutLocation FindNearestLocation(TakeoutLocation[] locations, DateTime timestamp)

Parameters

locations TakeoutLocation[]

Locations sorted in ascending timestamp order.

timestamp DateTime

The timestamp to locate.

Returns

TakeoutLocation

The nearest location. Equidistant records resolve to the earlier record.

Exceptions

ArgumentException

locations is empty.

GetFilteredLocations(string)

Gets records for a form factor, including records for which Takeout did not specify a form factor.

public TakeoutLocation[] GetFilteredLocations(string formFactor)

Parameters

formFactor string

The Takeout form factor to include.

Returns

TakeoutLocation[]

The matching records sorted in ascending timestamp order.