[postgis-users] [ANN] PostGIS on Rails, another take...

Robert Thau rst at alum.mit.edu
Thu Apr 20 07:21:03 PDT 2006

Hi.  I'm announcing yet another take on getting PostGIS working with
Ruby on Rails.  Our goal (well, one of them) is to make it easy to
arrange for web-based presentation of geographic data, with
mouse-sensitive polygons, line-strings, and the like.  The code is
still quite new, but it's to the point that other people may find it
useful.  So, without further ado, the URL for the code:


and a demo:


The demo requires Firefox 1.5 or IE6.  It's a tiled map, which you've
seen before; the mouse sensitivity and highlighting of the parks
polygons, and railroads, are (we hope ;-), a bit more unusual.  The
data for the mouse-sensitive objects is being pulled live out of
PostGIS, and processed for display as SVG or VML, whichever the
browser supports --- just a simplify() for now, but more complicated
transforms and queries would be easy to arrange.

The background tiles are drawn by Mapserver, using Ruby MapScript, as
is the non-interactive "Roads" layer.  (There's no point hitting the
database for that).

What's also nice is that you don't have to write a whole lot of code
to achieve these effects.  The exact line count for the "Canada" demo
keeps changing as I fiddle with the APIs, but the Mapserver config
file controlling the background tile generation is still most of it.

Development of this code has been supported by Japan Spatial
Information Technology, Inc., and I've got their permission to release
it on the same terms as PostGIS --- that is, GPLed.  (We may be
switching to a less restrictive license later, as management permits,
but it's GPLed for now).  We hope you have fun with it.

Robert Thau
rst at alum.mit.edu

More information about the postgis-users mailing list