LocationSimulator.Gpx (LocationSimulator v1.1.0)

Copy Markdown View Source

Gpx is a module that provides functions for parsing GPX file.

Summary

Functions

Reads a GPX file and returns the list of %LocationSimulator.Gpx.GpsPoint{}.

Parses GPX content and returns the list of %LocationSimulator.Gpx.GpsPoint{}.

Expands a GPX glob pattern to matching files.

Functions

read_gpx(file)

@spec read_gpx(Path.t()) :: [LocationSimulator.Gpx.GpsPoint.t()]

Reads a GPX file and returns the list of %LocationSimulator.Gpx.GpsPoint{}.

Raises when the file cannot be read.

read_string_gpx(content)

@spec read_string_gpx(String.t()) :: [LocationSimulator.Gpx.GpsPoint.t()]

Parses GPX content and returns the list of %LocationSimulator.Gpx.GpsPoint{}.

resolve_files!(pattern)

@spec resolve_files!(String.t()) :: [Path.t()]

Expands a GPX glob pattern to matching files.

Raises when nothing matches, so misconfiguration fails fast.