Documentation
¶
Overview ¶
gpx is a package to parse .gpx file as defined in http://www.topografix.com/GPX/1/1
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bounds ¶
type Bounds struct { MinLat float64 `xml:"minlat,attr"` MinLon float64 `xml:"minlon,attr"` MaxLat float64 `xml:"maxlat,attr"` MaxLon float64 `xml:"maxlon,attr"` }
Bounds is two lat/lon pairs defining the extent of an element.
type Copyright ¶
type Copyright struct { Author string `xml:"author,attr"` Year string `xml:"year"` License string `xml:"license"` }
Copyright represents information about copyright holder and license.
type Gpx ¶
type Gpx struct { XMLName xml.Name `xml:"gpx"` Version string `xml:"version,attr"` Creator string `xml:"creator,attr"` Metadata *Metadata `xml:"metadata"` Wpt []*Wpt `xml:"wpt"` Rte []*Rte `xml:"rte"` Trk []*Trk `xml:"trk"` }
Gpx is a root node in .gpx document.
type Link ¶
type Link struct { Href string `xml:"href,attr"` Text string `xml:"text"` Type string `xml:"type"` }
Link is a link to external resource with additional information
type Metadata ¶
type Metadata struct { Name string `xml:"name"` Desc string `xml:"desc"` Author *Person `xml:"author"` Copyright *Copyright `xml:"copyright"` Link []*Link `xml:"link"` Time time.Time `xml:"time"` Keywords string `xml:"keywords"` Bounds *Bounds `xml:"bounds"` }
Metadata holds information about .gpx file.
type Rte ¶
type Rte struct { Name string `xml:"name"` Cmt string `xml:"cmt"` Desc string `xml:"desc"` Src string `xml:"src"` Link []*Link `xml:"link"` Number uint `xml:"number"` Type string `xml:"type"` Rtept []*Wpt `xml:"rtept"` }
Rte represents route - an ordered list of waypoints representing a series of turn points leading to a destination.
type Trk ¶
type Trk struct { Name string `xml:"name"` Cmt string `xml:"cmt"` Desc string `xml:"desc"` Src string `xml:"src"` Link []*Link `xml:"link"` Number uint `xml:"number"` Type string `xml:"type"` Trkseg []*Trkseg `xml:"trkseg"` }
Trk represents a track - an ordered list of points describing a path.
type Trkseg ¶
type Trkseg struct {
Trkpt []*Wpt `xml:"trkpt"`
}
Trkseg holds a list of Track Points which are logically connected in order.
type Wpt ¶
type Wpt struct { Lat float64 `xml:"lat,attr"` Lon float64 `xml:"lon,attr"` Ele float64 `xml:"ele"` Time time.Time `xml:"time"` Magvar float64 `xml:"magvar"` GeoIDHeight float64 `xml:"geoidheight"` Name string `xml:"name"` Cmt string `xml:"cmt"` Desc string `xml:"desc"` Src string `xml:"src"` Link []*Link `xml:"link"` Sym string `xml:"sym"` Type string `xml:"type"` Fix string `xml:"fix"` // http://www.topografix.com/gpx/1/1/#type_fixType Sat uint `xml:"sat"` Hdop float64 `xml:"hdop"` Vdop float64 `xml:"vdop"` Pdop float64 `xml:"pdop"` AgeOfGPSData float64 `xml:"ageofgpsdata"` DGPSID uint `xml:"dgpsid"` }
Wpt represents a waypoint, point of interest, or named feature on a map.