Package-level declarations

Types

Link copied to clipboard
data class Author(val name: String? = null, val email: Email? = null, val link: Link? = null)

Represents information about the author of the GPX file.

Link copied to clipboard
@SerialName(value = "bounds")
data class Bounds(val minLatitude: Double, val minLongitude: Double, val maxLatitude: Double, val maxLongitude: Double)

Represents the minimum and maximum coordinates that describe the extent of the data in a GPX file.

Link copied to clipboard
data class Copyright(val author: String, val year: String? = null, val license: String? = null)

Represents copyright and license information governing the use of the GPX file.

Link copied to clipboard
data class Document(val schemaLocation: String = "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd", val version: String = "1.1", val creator: String = "org.maplibre.spatialk.gpx", val metadata: Metadata? = null, val tracks: List<Track> = listOf(), val routes: List<Route> = listOf(), val waypoints: List<Waypoint> = listOf(), val extensions: Element? = null)

Represents the root element of a GPX file.

Link copied to clipboard
data class Email(val id: String, val domain: String)

Represents an email address, broken into two parts.

Link copied to clipboard
data object Gpx

A utility object for serializing and deserializing GPX (GPS Exchange Format) data.

Link copied to clipboard
data class Link(val href: String, val text: String? = null, val type: String? = null)

Represents a link to an external resource. This allows a GPX file to be associated with a web page, photo, or any other information on the web.

Link copied to clipboard
data class Metadata(val name: String? = null, val description: String? = null, val author: Author? = null, val copyright: Copyright? = null, val link: List<Link> = listOf(), val timestamp: Instant? = null, val keywords: String? = null, val bounds: Bounds? = null, val extensions: Element? = null)

Represents metadata about the GPX file. This information is about the file itself, not the data within it.

Link copied to clipboard
data class Route(val name: String?, val comment: String?, val description: String?, val source: String?, val link: String?, val number: Int?, val type: String?, val points: List<Waypoint>, val extensions: Element? = null)

Represents a route - an ordered list of waypoints representing a series of turn points leading to a destination.

Link copied to clipboard
data class Track(val name: String? = null, val comment: String? = null, val description: String? = null, val source: String? = null, val link: Link? = null, val number: Int? = null, val type: String? = null, val segments: List<TrackSegment> = listOf(), val extensions: Element? = null)

Represents a GPX track (trk element), an ordered list of points describing a path.

Link copied to clipboard
data class TrackSegment(val points: List<Waypoint>, val extensions: Element? = null)

A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.

Link copied to clipboard
data class Waypoint(val latitude: Double, val longitude: Double, val elevation: Double? = null, val timestamp: Instant? = null, val magneticVariation: Double? = null, val geoIdHeight: Double? = null, val name: String? = null, val comment: String? = null, val description: String? = null, val source: String? = null, val link: Link? = null, val symbol: String? = null, val type: String? = null, val fix: String? = null, val satelliteCount: Int? = null, val horizontalDop: Double? = null, val verticalDop: Double? = null, val positionDop: Double? = null, val dgpsAge: Double? = null, val dgpsId: Double? = null, val extensions: Element? = null)

Represents a waypoint, point of interest, or named feature on a map. This corresponds to the wptType in the GPX 1.1 schema.

Functions

Link copied to clipboard

Converts a list of Waypoint objects into a GeoJSON FeatureCollection.

Converts this Route to a GeoJSON Feature with a GeometryCollection of Points.

Converts this Track object into a GeoJSON Feature object.

Converts this TrackSegment into a GeoJSON Feature.

Converts a Waypoint into a GeoJSON Feature with a Point geometry.