Classes
The following classes are available globally.
-
Declaration
Swift
public final class GPXAuthor : GPXPerson
-
A value type that represents bounds based off GPX v1.1 schema’s
boundsType
.This is meant for having two pairs of longitude and latitude, signifying the maximum and minimum, defining the extent / boundaries of a particular element.
See moreDeclaration
Swift
public final class GPXBounds : GPXElement, Codable
-
Simple class for some basic lossy compression.
See moreDeclaration
Swift
public class GPXCompression
-
A value type for representing copyright info
Copyight information also includes additional attributes.
Supported attributes:
- Year of first publication
- License of the file
Declaration
Swift
public final class GPXCopyright : GPXElement, Codable
-
A root class for all element types
All element types such as waypoints, tracks or routes are subclasses of
GPXElement
. This class brings important methods that aids towards creation of a GPX file.Note
This class should not be used as is. To use its functionalities, please subclass it instead.Declaration
Swift
open class GPXElement : NSObject
-
Used for handling email types
Email is seperated as two variables in order to prevent email harvesting. The GPX v1.1 schema requires that.
For example, an email of “yourname@thisisawebsite.com”, would have an id of ‘yourname’ and a domain of ‘thisisawebsite.com’.
See moreDeclaration
Swift
public final class GPXEmail : GPXElement, Codable
-
For adding/obtaining data stored as extensions in GPX file.
Typical GPX extended data, would have data that should be inbetween the open and close tags of <extensions>
This class represents the extended data in a GPX file.
See moreDeclaration
Swift
public final class GPXExtensions : GPXElement, Codable
-
A duplicated class of
GPXRawElement
This class is a public class as it is representative of all child extension tag types.
It is also inherits
See moreGPXElement
, and therefore, works like any other ‘native’ element types.Declaration
Swift
open class GPXExtensionsElement : GPXElement, Codable
-
Undocumented
See moreDeclaration
Swift
public final class GPXLegacyRoot : GPXElement, GPXRootElement
-
Undocumented
See moreDeclaration
Swift
public class GPXLegacyWaypoint : GPXElement, GPXWaypointProtocol
-
Undocumented
See moreDeclaration
Swift
public class GPXLegacyRoute : GPXElement, GPXRouteType
-
Undocumented
Declaration
Swift
public final class GPXLegacyRoutePoint : GPXLegacyWaypoint
-
Undocumented
See moreDeclaration
Swift
public final class GPXLegacyTrackPoint : GPXLegacyWaypoint
-
Undocumented
See moreDeclaration
Swift
public class GPXLegacyTrack : GPXElement
-
Undocumented
See moreDeclaration
Swift
public class GPXLegacyTrackSegment : GPXElement
-
A value type that can hold a web link to a external resource, or external information about a certain attribute.
In addition to having a URL as its attribute, it also accepts the following as child tag:
- type of content
- text of web link (probably a description kind of thing)
Declaration
Swift
public final class GPXLink : GPXElement, Codable
-
A value type that represents the metadata header of a GPX file.
Information about the GPX file should be stored here.
- Supported Info types:
- Name
- Description
Copyright
CopyrightDate
Date and TimeKeyword
Keyword- Bounds
- Also supports extensions
Declaration
Swift
public final class GPXMetadata : GPXElement, Codable
- Supported Info types:
-
An event-driven parser (SAX parser), currently parses GPX v1.1 files only.
This parser is already setted up, hence, does not require any handling, and will parse files directly as objects. To get the parsed data from a GPX file, simply initialize the parser, and get the
See moreGPXRoot
fromparsedData()
.Declaration
Swift
public final class GPXParser : NSObject
extension GPXParser: XMLParserDelegate
-
A value type that is designated to hold information regarding the person or organisation who has created the GPX file.
See moreDeclaration
Swift
public class GPXPerson : GPXElement, Codable
-
- This class (
ptType
) is added to conform with the GPX v1.1 schema.
See moreptType
of GPX schema. Not supported in GPXRoot, nor GPXParser’s parsing.Declaration
Swift
open class GPXPoint : GPXElement, Codable
- This class (
-
- This class (
ptsegType
) is added to conform with the GPX v1.1 schema.
See moreptsegType
of GPX schema. Not supported in GPXRoot, nor GPXParser’s parsing.Declaration
Swift
open class GPXPointSegment : GPXElement, Codable
- This class (
-
Creation of a GPX file or GPX formatted string starts here
See moreGPXRoot
holds allmetadata
,waypoints
,tracks
,routes
andextensions
types together before being packaged as a GPX file, or formatted as per GPX schema’s requirements.Declaration
Swift
public final class GPXRoot : GPXElement, Codable
-
Value type that represents a route, or
rteType
in GPX v1.1 schema.The route can represent the planned route of a specific trip.
See moreDeclaration
Swift
public final class GPXRoute : GPXElement, Codable, GPXRouteType
-
A route point is just like a waypoint or track point, but is suited to be part of a route.
These route points in collective, forms a valid route.
See moreDeclaration
Swift
public final class GPXRoutePoint : GPXWaypoint
-
Represents
trkType
of GPX v1.1 schema.A track can hold track segments, along with additional information regarding the track.
Tracks are meant to show the start and finish of a journey, through the track segments that it holds.
See moreDeclaration
Swift
public final class GPXTrack : GPXElement, Codable
-
A track point is just like a waypoint or route point, but is suited to be part of a track segment.
A bunch of track points can be used to form a track segement, while track segments form a track. (though a single track segment itself is enough to form a track.)
See moreDeclaration
Swift
public final class GPXTrackPoint : GPXWaypoint
-
A track segment that holds data on all track points in the particular segment.
Does not hold additional information by default.
See moreDeclaration
Swift
public final class GPXTrackSegment : GPXElement, Codable
-
A value type that represents waypoint based off GPX v1.1 schema’s
wptType
.According to the GPX schema, the waypoint type can represent the following:
- a waypoint
- a point of interest
- a named feature on a map
The waypoint should at least contain the attributes of both
See morelatitude
andlongitude
in order to be considered a valid waypoint. Most attributes are optional, and are not required to be implemented.Declaration
Swift
public class GPXWaypoint : GPXElement, GPXWaypointProtocol, Codable