You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use RGeo and are interested in contributing, please check out our open issues to see if there's anything you're able to help with.
Summary
RGeo is a key component for writing location-aware applications in the Ruby
programming language. At its core is an implementation of the industry
standard OGC Simple Features Specification, which provides data
representations of geometric objects such as points, lines, and polygons,
along with a set of geometric analysis operations. This makes it ideal for
modeling geolocation data. It also supports a suite of optional add-on modules
that provide various geolocation-related services.
Use the core rgeo gem to:
Represent spatial and geolocation data objects such as points, lines, and
polygons in your Ruby application.
Perform standard spatial analysis operations such as finding
intersections, creating buffers, and computing lengths and areas.
Correctly handle spherical geometry, and compute geographic projections
for map display and data analysis.
Read and write location data in the WKT and WKB representations used by
spatial databases.
Dependencies
RGeo works with the following Ruby implementations:
MRI Ruby 2.6.0 or later.
Partial support for JRuby 9.0 or later. The FFI implementation of GEOS
is available (ffi-geos gem required) but CAPI is not.
See earlier versions for support for older ruby versions.
Some features also require the following:
GEOS 3.2 or later is highly recommended. (3.3.3 or later preferred.) Some
functions will not be available without it. This C/C++ library may be
available via your operating system's package manager (sudo aptitude install libgeos-dev for debian based Linux distributions, yum install geos geos-devel for redhat based Linux distributions), or you can
download it from https://trac.osgeo.org/geos
On some platforms, you should install the ffi-geos gem (version 1.2.0 or
later recommended.) JRuby requires this gem to link properly with Geos,
and Windows builds probably do as well.
Installation
Install the RGeo gem:
gem install rgeo
or include it in your Gemfile:
gem"rgeo"
If you are using proj.4 extensions, include
rgeo-proj4:
gem"rgeo-proj4"
Upgrading to Version 3.0
See doc/Upgrading-to-v3.md for a checklist of changes to make before upgrading to RGeo 3.0.
You can see more in-depth documentation in the doc folder. Factories and
methods are documented inline, you should consider checking
https://rubydoc.info/gems/rgeo with the version you are currently using. Or
generate documentation locally if you're working on RGeo: yardoc server.
RGeo calls the GEOS library to handle most Cartesian geometric calculations,
and the Proj4 library to handle projections and coordinate transformations.
These libraries are maintained by the Open Source Geospatial Foundation; more
information is available on OSGeo's web site.
JRuby support is made possible by the ffi-geos (and upcoming ffi-proj4) gems,
by J Smith.