Popularity
2.5
Growing
Activity
6.2
Declining
28
3
7
Description
Package go-gpx provides convenince methods for creating and writing GPX documents.
Programming language: Go
License: MIT License
go-gpx alternatives and similar packages
Based on the "GIS" category.
Alternatively, view go-gpx alternatives based on common mentions on social networks and blogs.
-
go-geom
Package geom implements efficient geometry types for geospatial applications. -
polyline
Package polyline implements a Google Maps Encoding Polyline encoder and decoder. -
go-kml
Package kml provides convenience methods for creating and writing KML documents. -
UTM
Bidirectional UTM-WGS84 converter for golang :earth_africa: :globe_with_meridians: -
go-sypexgeo
SypexGeo library for Go (provides access data from SypexGeo IP database files)
Collect and Analyze Billions of Data Points in Real Time
Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Promo
www.influxdata.com
Do you think we are missing an alternative of go-gpx or a related project?
Popular Comparisons
README
go-gpx
Package gpx
provides convenince methods for reading and writing GPX documents.
Read example
r := bytes.NewBufferString(`
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="ExpertGPS 1.1 - http://www.topografix.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<wpt lat="42.438878" lon="-71.119277">
<ele>44.586548</ele>
<time>2001-11-28T21:05:28Z</time>
<name>5066</name>
<desc>5066</desc>
<sym>Crossing</sym>
<type>Crossing</type>
</wpt>
</gpx>
`)
t, err := gpx.Read(r)
if err != nil {
fmt.Printf("err == %v", err)
return
}
fmt.Printf("t.Wpt[0] == %+v", t.Wpt[0])
// Output:
// t.Wpt[0] == &{Lat:42.438878 Lon:-71.119277 Ele:44.586548 Time:2001-11-28 21:05:28 +0000 UTC MagVar:0 GeoidHeight:0 Name:5066 Cmt: Desc:5066 Src: Link:[] Sym:Crossing Type:Crossing Fix: Sat:0 HDOP:0 VDOP:0 PDOP:0 AgeOfDGPSData:0 DGPSID:[] Extensions:<nil>}
Write example
g := &gpx.GPX{
Version: "1.0",
Creator: "ExpertGPS 1.1 - http://www.topografix.com",
Wpt: []*gpx.WptType{
{
Lat: 42.438878,
Lon: -71.119277,
Ele: 44.586548,
Time: time.Date(2001, 11, 28, 21, 5, 28, 0, time.UTC),
Name: "5066",
Desc: "5066",
Sym: "Crossing",
Type: "Crossing",
},
},
}
if _, err := os.Stdout.WriteString(xml.Header); err != nil {
fmt.Printf("err == %v", err)
}
if err := g.WriteIndent(os.Stdout, "", " "); err != nil {
fmt.Printf("err == %v", err)
}
// Output:
// <?xml version="1.0" encoding="UTF-8"?>
// <gpx version="1.0" creator="ExpertGPS 1.1 - http://www.topografix.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
// <wpt lat="42.438878" lon="-71.119277">
// <ele>44.586548</ele>
// <time>2001-11-28T21:05:28Z</time>
// <name>5066</name>
// <desc>5066</desc>
// <sym>Crossing</sym>
// <type>Crossing</type>
// </wpt>
// </gpx>
License
MIT
*Note that all licence references and agreements mentioned in the go-gpx README section above
are relevant to that project's source code only.