[Georuby-devel] GeoJSON

Craig Taverner craig at amanzi.com
Wed Jun 25 17:22:58 EDT 2008


Hi,

I saw on geojson.org that georuby was listed as a 'user', so I hoped that
meant it supported geojson input/output, but having now installed georuby,
spatial adapter and gotten the google maps howto working, I see that there
is in fact no support for geojson. I looked through the code briefly and it
looks like it might not be too hard to add an 'as_geojson' method to a few
key classes (I'm guessing envelope.rb and geometry.rb, since I found
'as_georss' methods there). A google search also lead me to your
georuby-devel archives for Nov2007, and someone there offered to submit a
patch for exactly this, but I see no sign of it in 1.3.3. So I was wondering
if anyone has make a patch for this, or if I should consider going ahead and
writing one myself? I also don't know (yet) how you are unit testing, so if
I do go ahead and write a patch, could you give me some pointers to your
testing procedures.

As a side note, the homepage references 1.3.0 as the latest version, so I
guess a small update is called for. And the tutorial at
http://ym4r.rubyforge.org/tutorial_ym4r_georuby.html for getting google maps
working does not work without modifications. The syntax of form_remote_tag
failed on my rails 2.0.2 installation, and needed to be changed to block
syntax (ie. end_form_tag no longer exists). I also changed the @params to
params in the find method, and needed to change a bunch of ` characters to '
from the code copied from the web page. Other than that, the howto was a
great way to see everything pulled together and an excellent advert for
using georuby and the spatial adapter.

Cheers, Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/georuby-devel/attachments/20080625/2ccb3cb1/attachment.html>


More information about the Georuby-devel mailing list