Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.
/ gpx_ex Public archive
forked from velomapa/gpx_ex

elixir GPX parser

License

Notifications You must be signed in to change notification settings

felt/gpx_ex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GpxEx

Small Elixir library for parsing GPX files. GPX schema definition: https://www.topografix.com/GPX/1/1

Roadmap

There is no Roadmap yet. Any PR is welcome. The only requirement is that it should follow GPX schema definition.

Installation

NOT ON HEX YET.

Add to deps inside your mix.exs

defp deps do
  {:gpx_ex, git: "[email protected]:caspg/gpx_ex.git", tag: "0.4.0"}
end

Usage

iex(1)> {:ok, gpx_doc} = File.read("./my_track.gpx")
iex(2)> {:ok, gpx} = GpxEx.parse(gpx_doc)
iex(3)> gpx

%GpxEx.Gpx{
  tracks: [
    %GpxEx.Track{
      name: "Track's name",
      segments: [
        %GpxEx.TrackSegment{
          points: [
            %GpxEx.TrackPoint{
              ele: 10.2,
              lat: 54.519848,
              lon: 18.539699,
              time: "2020-02-02T10:37:13Z"
            },
            %GpxEx.TrackPoint{
              ele: 10.2,
              lat: 54.519854,
              lon: 18.53973,
              time: "2020-02-02T10:37:14Z"
            }
          ]
        }
      ]
    }
  ]
}

License

The project is available as open source under the terms of the MIT License.

Packages

No packages published

Languages

  • Elixir 100.0%