gitwtfhub

wtf is rgeo?

theoretick/rgeo — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2014-07-08

Audience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

A Ruby library for handling geographic data, points, lines, and areas, with spatial calculations like distance, overlap, and area.

Mindmap

mindmap
  root((rgeo))
    What it does
      Represents geo objects
      Spatial calculations
      Handles projections
    Tech stack
      Ruby
      GEOS
      Proj4
      PostgreSQL
    Use cases
      Location-based apps
      Delivery routing
      Real estate mapping
    Audience
      Ruby developers
    Data formats
      GeoJSON
      Shapefiles

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Build a delivery or real estate app that checks if locations fall within a service area.

REASON 2

Calculate the distance between two coordinates or the size of a mapped region.

REASON 3

Store and query geographic data efficiently in Rails using a PostGIS-backed database.

REASON 4

Read and write GeoJSON or shapefiles to exchange data with mapping tools.

What's in the stack?

RubyGEOSProj4PostgreSQL

How it stacks up

theoretick/rgeo0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2014-07-082022-10-032020-05-03
MaintenanceDormantDormantDormant
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 1h+

Requires system dependencies (GEOS, Proj4) and works best on Unix-like systems.

Wtf does this do

RGeo is a Ruby library that lets you work with location and geographic data in your applications. If you're building anything that needs to understand maps, coordinates, or spatial relationships, like a delivery app, real estate platform, or location-based service, this library handles the math and data structures for you. At its core, RGeo lets you represent geographic objects like points (a single location), lines (a route), and polygons (an area), and then perform common geographic operations on them. For example, you can check if two areas overlap, create a buffer zone around a point, calculate the distance between two locations, or measure the size of a region. It also handles the tricky part: correctly dealing with Earth's spherical shape rather than treating it as flat, and converting coordinates between different map projections (which matters when you're displaying locations on a flat screen). The library integrates naturally with popular Ruby tools for building web applications. If you're using Rails and a database like PostgreSQL with spatial extensions, or MySQL with spatial capabilities, RGeo has adapters that let your database store and query geographic data efficiently. It can also read and write standard geographic data formats like GeoJSON (which web mapping services understand) and shapefiles (which GIS professionals use). You'd use this if you're a Ruby developer building location-aware applications and need reliable, standards-based tools for handling geographic calculations and data. The library leans on trusted open-source geospatial libraries under the hood (GEOS for calculations and Proj4 for projections), so you get battle-tested geographic logic without having to implement it yourself. Installation requires a few system dependencies, and it works best on Unix-like systems, the README notes that Windows support is limited but possible with some extra setup.

Yoink these prompts

Prompt 1
Help me use RGeo to check whether two geographic areas overlap in my Ruby app.
Prompt 2
Show me how to set up RGeo with PostgreSQL and PostGIS in a Rails project.
Prompt 3
Explain how RGeo converts coordinates between different map projections.
Prompt 4
Walk me through reading a GeoJSON file into RGeo geometry objects.
Prompt 5
How do I calculate the distance between two points using RGeo?

Frequently asked questions

wtf is rgeo?

A Ruby library for handling geographic data, points, lines, and areas, with spatial calculations like distance, overlap, and area.

Is rgeo actively maintained?

Dormant — no commits in 2+ years (last push 2014-07-08).

How hard is rgeo to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is rgeo for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.