
February 10, 2026
Introduction
libgd-gis now supports legends, introducing a fundamental building block in map communication. With the release of v0.4.1, legends become a first-class feature of the rendering pipeline, pushing the library one step closer to covering the essential capabilities expected from a modern GIS engine.
Legends are not just a visual accessory. They provide semantic context, clarify meaning, and allow a map to explain itself without relying on external descriptions or UI layers.
This addition reflects the ongoing evolution of libgd-gis: a server-side, Ruby-native approach to map rendering that prioritizes clarity, explicit design, and high-quality visual output.
Maps as visual artifacts

In many systems today, maps are treated primarily as interactive UI components:
- embedded widgets
- screenshots
- browser-dependent views
- JavaScript-heavy pipelines
But there are many scenarios where interactivity is unnecessary — or even undesirable.
Sometimes what you need is a finished image:
- a report snapshot
- a logistics status overview
- documentation
- an exported artifact
- something that can be shared, archived, or embedded as-is
In libgd-gis, maps are treated as visual artifacts, not UI elements.
This distinction shapes the entire design.
SPONSOR LOGISTIC INTELLIGENCE:

A clear rendering pipeline
At its core, libgd-gis follows a simple and explicit pipeline:
- Geographic data Coordinates, features, layers, semantics.
- Style Visual rules describing how things should look.
- Rendering Map#render produces an image based strictly on data and style.
- Post-processing (optional) The resulting image can be manipulated further without touching the GIS logic.
Each step has a single responsibility.
This separation is what makes features like legends and framing feel natural rather than bolted on.
Why legends matter

A map without a legend is incomplete.
Without explanation:
- colors are arbitrary
- symbols are ambiguous
- meaning depends on external context
Starting with libgd-gis v0.4.1, legends are rendered directly into the image, as part of the server-side rendering process.
This means:
- no frontend overlays
- no HTML or CSS
- no external UI dependencies
The exported image already contains its own explanation.
The map becomes self-describing.
Style-driven consistency
A key design decision is that legends reuse the same visual configuration as map labels.
Typography, font size, and color definitions come from style.global.label.
This ensures:
- a single source of truth
- consistent visual language
- predictable output
If the style changes, both the map and its legend change together.
This is not a convenience feature — it’s a deliberate design principle.
From map render to finished image

Once Map#render completes, the underlying image is accessible through map.image.
This is an important boundary.
The GIS engine finishes its job, and from that point on, the image can be treated like any other graphic.
This enables post-render operations such as:
- adding borders or frames
- applying a “polaroid” style layout
- inserting captions or signatures
- watermarking
- embedding metadata visually
All of this happens without polluting the map rendering logic.
The result is a clean pipeline:
- deterministic rendering
- flexible final composition
Examples across cities
The same rendering logic and design principles were applied to different cities:
- Buenos Aires — logistics status using color-coded points and legends
- Paris — the same scenario adapted to a dense European layout
- Paraná, Entre Ríos — a local example showing how easily the approach scales and adapts
In every case:
- only the data changes
- the style and rendering pipeline remain identical
That consistency is one of the strongest signals of a stable design.
Why this matters for Ruby
For years, Ruby gradually lost visibility in the space of image generation and map rendering.
Features like built-in legends (v0.4.1), style-driven rendering, and explicit pipelines show that Ruby can still:
- generate high-quality images
- render maps entirely server-side
- produce clear, shareable outputs
- do so with readable, maintainable code
No JavaScript. No headless browsers. No screenshots.
Just Ruby rendering pixels.
libgd-gis — Server-side map rendering for Ruby
libgd-gis is an open-source, MIT-licensed Ruby library for rendering maps entirely on the server. It focuses on clarity, explicit design, and producing finished images — not screenshots or embeds.
- Built-in legends (since v0.4.1)
- Style-driven rendering pipeline
- No frontend, no JavaScript
- Post-processing via
map.image
Closing thoughts

As part of the ongoing evolution of the library, introducing new tools to manipulate and enrich maps is essential — but always without losing sight of the original design goals.
Legends in libgd-gis v0.4.1 are a natural extension of that philosophy.
It is also important to remember that a map does not end at render time. Through map.image, the rendered output becomes a canvas for post-processing, enabling everything from subtle visual enhancements to the addition of contextual information.
From watermarks to captions, frames, or custom annotations, these elements can be layered on top without compromising the clarity or predictability of the GIS pipeline.
The goal remains the same: to generate maps that are explicit, self-contained, and useful — where every visual element adds meaning rather than unnecessary complexity.
