
January 7, 2026
How libgd-gis turns Ruby into a real GIS engine
For many years, Ruby quietly missed something important.
Yes, Ruby is amazing at APIs, data processing, background jobs, and web platforms — but when it came to maps, graphics, and spatial data, Ruby was forced to step aside and let other languages do the work.
If you wanted to draw a map, generate tiles, or visualize geographic data, you had to reach for:
- ImageMagick
- QGIS
- Python
- Node
- or external GIS pipelines
Ruby was no longer a first-class citizen in the world of images and maps.
That changed when I built ruby-libgd, bringing a real native raster engine back to Ruby.
And now, with libgd-gis, Ruby doesn’t just draw images — it draws the world.
Advertise on RubyStackNews
RubyStackNews is a niche publication read by Ruby and Rails developers worldwide. Our audience includes senior engineers, tech leads, and decision-makers from the US, Europe, and Asia.
Sponsorship Options
Your brand featured inside a technical article (clearly marked as sponsored).
Highlighted sponsor section embedded within an article.
Logo + link displayed site-wide in the sidebar.
- Highly targeted Ruby / Rails audience
- Organic traffic from search and developer communities
- No ad networks — direct sponsorships only
Interested in sponsoring RubyStackNews?
Contact via WhatsAppIt started with something simple: ice cream 🍦
I didn’t start this project with satellites or scientific datasets.
I started with a simple question:
What if I map all the ice-cream shops in my city?
Everyone loves ice cream. And suddenly GIS doesn’t feel scary — it feels fun.
Using libgd-gis, I took a dataset of ice-cream shops in Paraná (Argentina) and generated this map:
Paraná — Ice Cream Map

Each pin on that map is:
- read from data
- projected from longitude and latitude
- drawn as an icon
- labeled with its name
- rendered into a PNG
All done in Ruby. No external GIS software. No cloud services. No Mapbox.
Just Ruby drawing a map.
From ice cream to museums
Once you can map ice-cream shops, the next step is obvious:
What else can we map?
So I mapped museums.
This produced:
Paraná — Museums Map

Now this isn’t just playful — it’s cultural data. It shows how GIS connects geography to meaning.
This is what spatial computing really is: not just coordinates, but stories on a map.
Then I tried something bigger… the whole planet
After mapping a city, a dangerous thought appears:
If Ruby can map a city… can it map the world?
So I took a dataset of the highest mountain peaks on Earth and told Ruby to draw them.
The result:
World Peaks Map (insert world_peaks.png)
And then regional versions:
- America

- Europe

- Asia

This is not a toy anymore. This is cartography — powered by Ruby.
The Ruby that draws maps
Here is the exact code that produced one of those world maps:
require "json"
require "gd/gis"
AMERICA = [-170, -60, -30, 75]
map = GD::GIS::Map.new(
bbox: AMERICA,
zoom: 4,
basemap: :carto_light
)
peaks = JSON.parse(File.read("picks.json"))
map.add_points(
peaks,
lon: ->(p) { p["longitude"] },
lat: ->(p) { p["latitude"] },
icon: "peak.png",
label: ->(p) { p["name"] },
font: "./fonts/DejaVuSans.ttf",
size: 10,
color: [0,0,0]
)
map.render
map.save("output/america.png")
This is GIS written in Ruby.
No Python. No Mapnik. No QGIS. No shell scripts.
Ruby → C → pixels → maps.
What is libgd-gis?
libgd-gis is a geospatial rendering layer for Ruby, built on top of ruby-libgd.
ruby-libgd gives Ruby:
- fast pixel access
- image formats
- filters
- shapes
- native performance
libgd-gis adds:
- geographic projections
- bounding boxes
- basemaps
- icon layers
- labels
- map rendering
Together, they turn Ruby into a map engine.
The gem is live:
https://rubygems.org/gems/libgd-gis
The API and specs are still being stabilized — but the engine already works, and every image in this article was generated using it.
Why this matters
Ruby is used to build:
- logistics platforms
- fintech systems
- city dashboards
- tourism apps
- disaster-response software
- scientific tools
All of those need maps.
For years, Ruby had to hand that work to other ecosystems.
Now it doesn’t.
With libgd-gis, Ruby can render spatial data, generate map tiles, and produce cartographic images inside its own runtime.
Ruby is becoming a visual, spatial language again.
And it all started with ice cream.
