- Notifications
You must be signed in to change notification settings - Fork160
Geospatial data library for Ruby
License
rgeo/rgeo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
RGeo is a geospatial data library for Ruby.
Contributors Wanted!
If you use RGeo and are interested in contributing, please check out ouropen issues to see if there's anything you're able to help with.
RGeo is a key component for writing location-aware applications in the Rubyprogramming language. At its core is an implementation of the industrystandard OGC Simple Features Specification, which provides datarepresentations of geometric objects such as points, lines, and polygons,along with a set of geometric analysis operations. This makes it ideal formodeling geolocation data. It also supports a suite of optional add-on modulesthat provide various geolocation-related services.
Use the corergeo gem to:
- Represent spatial and geolocation data objects such as points, lines, andpolygons in your Ruby application.
- Perform standard spatial analysis operations such as findingintersections, creating buffers, and computing lengths and areas.
- Correctly handle spherical geometry, and compute geographic projectionsfor map display and data analysis.
- Read and write location data in the WKT and WKB representations used byspatial databases.
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 GEOSis 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.) Somefunctions will not be available without it. This C/C++ library may beavailable 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 candownload it fromhttp://trac.osgeo.org/geos - On some platforms, you should install the ffi-geos gem (version 1.2.0 orlater recommended.) JRuby requires this gem to link properly with Geos,and Windows builds probably do as well.
Install the RGeo gem:
gem install rgeo
or include it in your Gemfile:
gem"rgeo"
If you are using proj.4 extensions, includergeo-proj4
:
gem"rgeo-proj4"
Seedoc/Upgrading-to-v3.md for a checklist of changes to make before upgrading to RGeo 3.0.
For a brief overview of the changes, seeNEWS.md.
For a comprehensive list of all changes, seeHistory.md.
TheRGeo organization provides several gems that extend RGeo:
Proj4 extensions
Read and write GeoJSON
Read ESRI shapefiles
ActiveRecord connection adapter for PostGIS, based on postgresql (pg gem)
ActiveRecord connection adapter for MySQL Spatial Extensions, based on mysql2
ActiveRecord connection adapter for SpatiaLite, based on sqlite3 (*not maintained)
RDoc Documentation is available athttps://www.rubydoc.info/gems/rgeo
Contributions are welcome. Please read theContributing guidelines.
Support may be available on thergeo-users google groupor onStack Overflow.
You can see more in-depth documentation in thedoc
folder. Factories andmethods are documented inline, you should consider checkinghttps://rubydoc.info/gems/rgeo with the version you are currently using. Orgenerate documentation locally if you're working on RGeo:yardoc server
.
Here's the current list of available topics:
- An introduction to Spatial Programming With RGeo
- Enable GEOS and Proj4 on Heroku
- Installing GEOS
- Factory Compatibility
- Which factory should I use?
- Geometry validity handling
- Upgrading to Version 3
- Examples
- Who uses
rgeo
?
You can see an exhaustive and up to date list athttps://rubydoc.info/gems/rgeo/index.
Daniel Azuma created RGeo.Tee Parham is a former maintainer.Keith Doggett,Ulysse Buonomo are current maintainers.
Development is supported by:
- Klaxit
- Goldfish Ads
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; moreinformation is available onOSGeo's web site.
JRuby support is made possible by the ffi-geos (and upcoming ffi-proj4) gems,byJ Smith.
Copyright (c) Daniel Azuma, Tee Parham
About
Geospatial data library for Ruby