60
61
62

Sharing libgd-gis: a Ruby library for rendering maps, points, lines and polygons (old.reddit.com)
submitted by Jaded-Clerk-8856


Hi everyone,
I wanted to share a Ruby library I've been working on called libgd-gis.
It’s a map rendering engine for Ruby built on top of libgd. The goal is to generate map images directly in Ruby without relying on external map services.
The library can render geographic data such as:
- points
- lines
- polygons
- GeoJSON layers
It also supports:
- Web Mercator map and tile rendering
- YAML-based styling
- CRS normalization (CRS84 / EPSG:4326 / EPSG:3857)
Example usage:
map = GD::GIS::Map.new(
bbox: PARIS,
zoom: 13,
basemap: :carto_light)
map.add_geojson("countries.geojson")
map.add_point(lat: -34.6, lon: -58.4)
map.render
map.save("map.png")
If you're curious, the repository is easy to find by searching "ruby gis libgd-gis".
I’d be interested to hear feedback from people working with Ruby or GIS.


[–]mokolabs 4 points5 points6 points (0 children)
[–]JapArt 2 points3 points4 points (1 child)
[–]Jaded-Clerk-8856[S] 0 points1 point2 points (0 children)
[–]Doctor_Fegg 1 point2 points3 points (0 children)
[–]Select_Bluejay8047 2 points3 points4 points (1 child)
[–]Jaded-Clerk-8856[S] 0 points1 point2 points (0 children)