Introducing LandTransportKit
A Swift package for accessing real-time and static data from Singapore's Land Transport Authority (LTA) DataMall API. It provides strongly typed interfaces to common transport datasets such as Bus Arrival times, Traffic Images, Carpark Availability, Taxi Locations, and more.

LandTransportKit is the first Swift package that I’ve submitted to the Swift Package Index. Given that I’ve been using Swift and relying on Swift packages since, well, the Swift epoch began, this is ridiculous.
Let me explain what it’s capable of.
First, it lets developers in the Apple ecosystem make use of all four—keep reading!—of the LTA DataMall APIs that I make use of for Singapore Buses:
- In a Mac app, I download all bus stops, services, and routes for Singapore Buses which I then package in an
sqlite
database and bundle with the iOS app; and, - Retrieving bus arrival estimates in the Singapore Buses app.
Second, outside of those four APIs (stops, services, routes, and arrivals), I’ve expanded the package to support 21 additional APIs covering a host of additional functionality—from available car parking spaces to faulty traffic lights to current traffic camera images:
LTA Ref | Description | Supported |
2.1 | BUS ARRIVALS | ✅ |
2.2 | BUS SERVICES | ✅ |
2.3 | BUS ROUTES | ✅ |
2.4 | BUS STOPS | ✅ |
2.5 | PASSENGER VOLUME BY BUS STOPS | ✅ |
2.6 | PASSENGER VOLUME BY ORIGIN DESTINATION BUS STOPS | ✅ |
2.7 | PASSENGER VOLUME BY ORIGIN DESTINATION TRAIN STATIONS | ✅ |
2.8 | PASSENGER VOLUME BY TRAIN STATIONS | ✅ |
2.9 | TAXI AVAILABILITY | ✅ |
2.10 | TAXI STANDS | ✅ |
2.11 | TRAIN SERVICE ALERTS | ✅ |
2.12 | CARPARK AVAILABILITY | ✅ |
2.13 | ESTIMATED TRAVEL TIMES | ✅ |
2.14 | FAULTY TRAFFIC LIGHTS | ✅ |
2.15 | PLANNED ROAD OPENINGS | ✅ |
2.16 | APPROVED ROAD WORKS | ✅ |
2.17 | TRAFFIC IMAGES | ✅ |
2.18 | TRAFFIC INCIDENTS | ✅ |
2.19 | TRAFFIC SPEED BANDS | ✅ |
2.20 | VMS / EMAS | ✅ |
2.21 | BICYCLE PARKING | ✅ |
2.22 | GEOSPATIAL WHOLE ISLAND | ❌ |
2.23 | FACILITIES MAINTENANCE | ✅ |
2.24 | STATION CROWD DENSITY REAL TIME | ✅ |
2.25 | STATION CROWD DENSITY FORECAST | ✅ |
2.26 | TRAFFIC FLOW | ❌ |
2.27 | PLANNED BUS ROUTES | ✅ |
There’s a small amount of DocC in the package (more is coming, hence the 0.9.0
tag) and I have an example app in the works (for macOS, iPad, and iPhone) that provides some examples of how to make use of the package.


Third—and we’re into the weeds—sometimes the LTA provides latitude and longitude as Double
and sometimes as String
. LandTransportKit
handles it for you, just access location
for a CLLocation
, or coordinate2D
for a CLCoordinate2D
struct
.
What’s Not Supported and Why:
- GEOSPATIAL WHOLE ISLAND:
SHP
files need to be converted to.geojson
for usage in Maps. That conversion isn’t in scope of the package. - TRAFFIC FLOW: This is meant to be updated quarterly but the last update was September 2024 (as of July 2025). If it wheezes into life, I’ll include it.
The AI Disclaimer
I wrote most of this package in Xcode 26, though based on version numbers being tied to years, it is being automatically tested on a version of Xcode 11 years notwithstanding1. I used the ChatGPT integration to write the documentation for most of struct
, class
, and func
definitions. It hasn’t been used for the code itself, the test cases, or DocC2.
- Xcode 15. ↩︎
- I could fill an article, let alone a footnote, with how I feel about AI in coding. It’s great for exploration of ideas. It’s great for writing code documentation (the more mundane side of creativity). It’s great at explaining code already written. It’s bad for me as a programmer if I let go beyond that and, as a friend put it, become a crutch. ↩︎
Discussion