Geo-Rails part 1: A Call To Revolution

It was about a year ago that I released the first public version of RGeo, a geospatial framework for Rails and Ruby applications, along with a bunch of add-on libraries and ActiveRecord adapters designed to work with it.

RGeo has enjoyed some success so far. But over the past year, I’ve fielded a number of questions from folks struggling with it, and I’ve come to realize that it is not very easy to learn or use. A lot of that is my fault. The core RGeo framework is fairly complex, and neither RGeo itself nor its add-on libraries are particularly well documented. Furthermore, geospatial technology is not an easy topic in general. A number of concepts and a fair amount of math has to be understood before you can really get off the ground with a location-aware application beyond the most simple display of a few pushpins on a Google map.

My hope is to start changing that.

For the past few months, I’ve been heads-down on the product releases for Pirq, where I’m the chief architect. But as those projects ease up a bit, I’m going to try to spend more time giving RGeo some love. And as part of that, I’m starting up a series of articles on doing geospatial programming in Ruby and Rails apps, using RGeo.

Continue reading

Introducing RGeo: A Geospatial Data Library For Ruby

At GeoPage, we’ve been doing location-aware and geospatial applications using Rails for several years now. I’m pleased to announce that we’ve released one of our core components, the RGeo library, under a liberal BSD-style license. This library should be very useful for developers working with location data in a Rails application.

What is RGeo?

RGeo is, at its heart, a representation of spatial vector data in Ruby. It implements the industry standard OGC Simple Feature Access Specification, providing classes for points, lines, polygons, and other geometric objects, as well as a full set of geometric operations such as finding intersections, creating buffers, calculating distances, etc. It also provides the tools needed to work with geographic coordinate systems and projections, and to read and write data in the well-known formats understood by spatial databases. Continue reading

Switching to WordPress…

I’m switching my blog to WordPress. Some older posts will not be available for a few days while I move them over. The rest of my website will also not be available for a few days because I’m in the process of porting it to Rails 3.

Ruby Version Numbers Done Right?

Summary: Introducing Versionomy, a new rubygem offering robust parsing, interpretation, manipulation, and comparison of version numbers. It features an adaptive parser with enough flexibility to handle a variety of syntaxes, including prerelease (e.g. alpha, beta) syntax, patchlevels, and nonstandard delimiters. Try it out and feel free to leave feedback. Continue reading

Ruby 1.8.7 IO#select threading bug

I just spent most of a day tracking down a rather obscure Ruby interpreter bug involving multiple threads calling IO#select. Basically, what happens is, if you are running Ruby 1.8.7p160 through 1.8.7p174 (and possibly some later versions), and you have multiple threads calling IO#select on different and disjoint sets of IO objects, the calls may fail to return results even though there are results to return. Continue reading