[Georuby-devel] GeoJSON

Andrew Turner ajturner at highearthorbit.com
Wed Jun 25 17:25:50 EDT 2008

You're right, it's not hard.

Here is the patch for adding it that we use in Mapufacture.

On Wed, Jun 25, 2008 at 5:22 PM, Craig Taverner <craig at amanzi.com> wrote:
> 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
> _______________________________________________
> Georuby-devel mailing list
> Georuby-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/georuby-devel

Andrew Turner
mobile: 248.982.3609
andrew at mapufacture.com

http://mapufacture.com Helping build the Geospatial Web
Introduction to Neogeography - http://oreilly.com/catalog/neogeography
-------------- next part --------------
A non-text attachment was scrubbed...
Name: georuby_json.rb
Type: text/x-ruby-script
Size: 1083 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/georuby-devel/attachments/20080625/cea74786/attachment.bin>

More information about the Georuby-devel mailing list