{"id":32150624,"url":"https://github.com/rccoop/rcgpx","last_synced_at":"2025-10-21T10:12:01.266Z","repository":{"id":63051062,"uuid":"384541290","full_name":"RCCoop/RCGPX","owner":"RCCoop","description":"A library for reading/writing GPX files in Swift","archived":false,"fork":false,"pushed_at":"2023-03-28T21:01:06.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-01T06:09:57.210Z","etag":null,"topics":["gpx","gpx-files","swift","waypoints"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RCCoop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-09T20:11:43.000Z","updated_at":"2024-11-04T16:43:02.000Z","dependencies_parsed_at":"2022-11-11T21:15:44.636Z","dependency_job_id":null,"html_url":"https://github.com/RCCoop/RCGPX","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RCCoop/RCGPX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RCCoop%2FRCGPX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RCCoop%2FRCGPX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RCCoop%2FRCGPX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RCCoop%2FRCGPX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RCCoop","download_url":"https://codeload.github.com/RCCoop/RCGPX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RCCoop%2FRCGPX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280241146,"owners_count":26296708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpx","gpx-files","swift","waypoints"],"created_at":"2025-10-21T10:11:59.042Z","updated_at":"2025-10-21T10:12:01.259Z","avatar_url":"https://github.com/RCCoop.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RCGPX\n\n![GitHub](https://img.shields.io/github/license/RCCoop/RCGPX)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FRCCoop%2FRCGPX%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/RCCoop/RCGPX)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FRCCoop%2FRCGPX%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/RCCoop/RCGPX)\n\nA simple library for reading \u0026 writing GPX tracks and waypoints in Swift, specifically designed for simplicity and ease of use.\n\n\n# Index\n\n- [Installation](#installation)\n- [GPXDocument](#gpxdocument)\n  - [GPX Types](#gpx-types)\n- [Reading GPX Files](#reading-gpx-files)\n- [Writing GPX Files](#writing-gpx-files)\n- [Dependencies](#dependencies)\n\n# Installation\n\nSwift Package Manager:\n```\n.package(url: \"https://github.com/RCCoop/RCGPX.git\", .upToNextMajor(from: \"1.0.0\"))\n```\n\n# GPXDocument\n\nThe root of a GPX file is represented by the `GPXDocument` struct, which is used as a container for any number of waypoints and tracks.\n\nWhen creating a GPXDocument from scratch (rather than reading from an existing file), you may optionally add a name for the person or program that created the file, as well as the arrays of tracks and waypoints.\n\n```swift\npublic struct GPXDocument {\n    public var creator: String?\n    public var waypoints: [GPXWaypoint]\n    public var tracks: [GPXTrack]\n    public var routes: [GPXRoute]\n}\n```\n\n# GPX Types\n\n- GPXTrack\n    - .Segment\n    - .Point\n- GPXRoute\n    - .Point\n- GPXWaypoint\n\n# Reading GPX Files\n\n```swift\nlet fileUrl = ...\nlet fileData = try Data(contentsOf: fileUrl)\nlet gpxString = try? String(contentsOf: fileUrl, encoding: .utf8)\n\nlet documentFromData = try? GPXDocument(fileData)\nlet documentFromFileUrl = try? GPXDocument(fileUrl)\nlet documentFromString = try? GPXDocument(gpxString)\n```\n\n# Writing GPX Files\n\n```swift\nlet gpxDoc = GPXDocument(...)\n\nlet asData = gpxDoc.gpxData()\nlet asString = gpxDoc.gpxString()\n```\n\n## Dependencies\n\n- [AEXML](https://github.com/tadija/AEXML) for reading and writing XML files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frccoop%2Frcgpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frccoop%2Frcgpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frccoop%2Frcgpx/lists"}