DEV Community

Admin Supafast
Admin Supafast

Posted on

Rendering a live 3D earthquake globe on iOS from the USGS feed

I wanted to see earthquakes the way they actually happen: as points lighting up on a spinning planet, in near real time. That became Earthquake: Live Seismic Monitor, an iOS app that renders a 3D globe of recent quakes straight from the USGS feed. No backend of my own - just the public data and the device. Here's how it comes together.

The data source

The USGS publishes earthquake data as GeoJSON feeds, updated continuously, at several time/magnitude cutoffs (past hour, past day, 2.5+, 4.5+, etc). Each feature has coordinates, magnitude, depth and time. That's everything you need to place a quake on a globe - no custom API required.

The app polls the appropriate feed, diffs against what it already has, and updates the scene. Because USGS does the heavy lifting, the whole thing is effectively serverless from my side.

Putting quakes on a globe

The core mapping problem is turning (latitude, longitude) into a point on a sphere. Once you have that, each earthquake becomes a marker whose size and color encode magnitude and depth, so a glance tells you "big and shallow" vs "small and deep".

Design decisions that mattered:

  • Encode magnitude visually. Radius and color do more than any label. A magnitude 6 should look like a magnitude 6.
  • Cluster sensibly. Active regions produce swarms; markers need to stay readable when dozens land in one area.
  • Keep the globe interactive. Rotate, zoom, tap a quake for details. It should feel like an object, not a chart.

Real-time without a server

Every network-dependent app has to answer: what happens offline, and how fresh is "live"? My rules:

  • Cache the last good feed so the globe still renders with no connection.
  • Refresh on foreground and on an interval, and show the data's own timestamp so "live" is honest.
  • Never block the UI on the network - render what you have, then update.

Why no backend

It's tempting to proxy the feed through your own server "for control". But USGS is reliable, public, and built for exactly this. Skipping a backend meant no servers to run, no scaling to worry about, and no place for me to introduce staleness. The device talks to the source directly.

Takeaways

  • Great public datasets (USGS here) can carry an entire app - look for them before building infrastructure.
  • Encode the important variable (magnitude) into shape and color, not text.
  • Be honest about "real time": show the source timestamp instead of implying instant.

The app is at https://earthquakes.site

If you've built globe or map visualizations, I'd love to hear how you handle dense clusters of points without the map turning to mush.

Top comments (0)