GeoRuby
- GeoRuby provides data types intended to hold data returned from PostGIS and the Spatial Extensions of MySql. The data model roughly follows the OGC Simple Features for SQL specification, although without any kind of advanced functionalities (such as geometric operators or reprojections). The library inputs and outputs EWKB, HexEWKB and EWKT. A recent version also includes input and output of GeoRSS and KML. The latest versions have added support for reading and writing ESRI shapefiles.
- RubyForge project page
- YM4R + GeoRuby + Spatial Adapter Tutorial
-
The current version is 1.3.0. Installation:
gem install GeoRuby
- Documentation
- If you run on a PowerPC Mac with Mac OS X 10.4 (Tiger) and use the Ruby shipped with it, the WKB parsing and output will not work as intended, due to the unpack/pack issue detailed here. It also means the PostGIS Adapter, which relies on this feature, will not work. This issue might have been resolved by Apple (I would not know since I am not on a Mac) but if it has not (and apparently this is the case, since I have recently received reports pointing at this problem), your best bet is to build and install your own Ruby or use Darwinports or Fink.
Spatial Adapter for Rails (works with MySql and PostGIS)
- The project is now officially maintained by Pete Deffendol at http://github.com/fragility/spatial_adapter/. You can use the bug tracker there to report issues and the wiki for the documentation.
- It is a plugin for Rails which manages MySql Spatial and PostGIS geometric columns in a transparent way (that is like the other base data type columns). It also provides a way to manage these columns in migrations
-
Installation:
script/plugin install git://github.com/fragility/spatial_adapter.git
- For MySql versions before 5.0.16, geometric columns are only supported on tables using the MyISAM engine. For versions after 5.0.16, any engine (including INNODB) can be used.