Posts tagged Neogeography
Selected Saturday links
Feb 21st
It’s always a little embarassing to realise that two or more consecutive blog postings are nothing more than a collection of links, but that’s the way it is at the moment. Busy-ness, illness and distractedness have all kept me from the blog this week. There aren’t any clear themes in this week’s links either. Chatter around OAuth has continued apace, as have musings about fuzziness, location, time, and the web (represented well by Matt Jones’ piece), but mostly this is the (to be) usual random assortment that have spent more than a few seconds open in my newsreader or web browser
-
twitteroauth – PHP OAuth lib for Twitter
Further evidence that OAuth support for twitter is finally on its way in the form of a PHP library for interfacing with it.
-
Fixing OAuth
The author of my favourite iPhone twitter client (tweetie) outlines an idea for improving the usability of OAuth outside of web applications.
-
iPhoneFlow – iPhone Development Links
iPhoneFlow is a community link blog for iPhone developers. (via Mobile Orchard)
-
Interview with Matt Bauer, author of Data Processing and Visualization with Ruby
I’m really looking forward to this book.
-
CloudMade: Using OpenStreetMap to Chart the Future of Mapping
CloudMade is a new mapping service from some of the creators of Open Street Map. Lots of libraries for integration are available, along with a variety of services on top of the map data.
-
seed16 a new model for conferences
An interesting response to the ridiculous speed with which tickets for the next BarCamp London sold out, and the issues that that raises.
-
A new kind of front page
How Phil Gyford is currently experimenting with the front page of his site, pulling together his activities from across the web. I really like the way Phil approaches these sorts of projects and manages to pull things together in interesting ways.
-
Implementing Prototype’s Array Methods in jQuery
One less reason to use Prototype over jQuery if you’ve not already made the switch. Like Josh I find I rarely feel the absence of the array methods Prototype provides when I write javascript with jQuery, but there are some convenient shortcuts here.
-
Exporting the past into the future, or, “The Possibility Jelly lives on the hypersurface of the present”
A series of musings from Matt Jones on space, time and the web (in its biggest sense), “nowish”, “hereish” and all that. Also notable for having what may be the longest ’slug’ URL component of any article I’ve linked to from this blog.
New home for Rails ‘geo plugin comparison’
Oct 22nd
About eighteen months ago I compiled a series of reviews of Ruby on Rails plugins concerned with geography. I put together a comparison chart and posted it on this blog. It subsequently found a new home on a wiki, but lately that wiki has rarely been accessible so I decided it was time to move it all back into this site.
You can now find the comparison chart at: http://jystewart.net/process/resources/rails-geo-plugins/
A few updates have been lost along the way as they were solely made on the wiki, but hopefully it’s still of use. Since I published the original reviews and chart my attention has wandered a little from the geo plugin scene, so please do flag up any new plugins, changes in features or fixes that I may have missed. I’m going to be trying to check through all the existing listings to update them but that may take a while, so comments here may well encourage me to focus more quickly.
Rails Geo Plugins: GeoX
Oct 16th
GeoX is the latest kid on the Ruby on Rails geocoding block. The plugin was announced a couple of weeks ago and I’ve been meaning to explore it ever since, just in case it had any new features and also so that I can add it to my comparison chart.
The feature set of GeoX is fairly straightforward. It supports a number of geocoding back ends: obviously google and yahoo are covered, but also mapquest’s relatively recent API. The standard lookup process is much like that provided by several other plugins—the sample given is:
require 'geox' # uses the google engine geocoder = GeoX::Geocoder.new(:geoengine => GeoX::Google) location = {:address => '701 Ocean St', :post_code => '95060'} geocode = geocoder.geocode(location) # geocode will be a hash containing the geocode data returned from the server puts geocode.inspect
What is most notably lacking is any ActiveRecord integration such as that offered by acts_as_locateable or acts_as_geocodable. That is apparently by design as the intention is for the library to be usable outside rails but the plugin relies on the rails-specific blank? method and personally I prefer the graticule/acts_as_geocodable split where functionality equivalent to that of GeoX is bundled in the graticule gem and then ActiveRecord hooks are provided by the plugin. It is definitely nice to have geocoding handled manually when models are added or updated, but more than that it is very useful to have support provided for searching based on location.
Probably the most intriguing aspect of the plugin is the facility to compare the specificity of two different sets of coordinates. That’s achieved by returning an object type appropriate to the specificity. So if you have street-level data, the object returned is an instance of GeoX::Street. Operator overloading allow you to compare the objects:
puts "Street wins!" if GeoX::Street.new < GeoX::Block.new
The README file suggests putting the API keys in the file lib/geox_api_keys.rb within the plugin. That’s probably not the best of ideas, but it would be easy enough to rework it so that the configuration is done in the usual rails way and the plugin can be included with svn:externals or piston.
I can’t see myself switching to GeoX from the options I currently use and it’s a shame that its distinctive features weren’t submitted as patches to existing projects rather than adding yet another plugin to the increasingly crowded scene, but it’ll be interesting to see how it evolves over the coming months.
Comparing rails geo-plugins
Mar 4th
There seems to be quite a plethora of Ruby/Rails libraries appearing aiming to simplify handling geography and distances. In some cases these libraries do quite distinct things (zip codes vs. longitude/latitude, map output vs. distance calculations) but they’re frequently lumped together and it’s difficult to tell which will be best to use in your projects.
I’ve used several of these projects and have previously blogged about YM4R and acts_as_locateable, but I’m still not sure which I’d pick for new projects. So I thought it would be helpful to try to put together a comparison of which libraries offer what functionality. Here I’ll just offer a quick chart, but I’m hoping to write them up in a bit more detail over the coming days/weeks. If there’s sufficient interest, I’d consider moving this out to a wiki for more general use.
| Auto-geocoding ActiveRecord models | Multi-provider geo-coding | Distance based finds | Distance based :through finds | Google map output | Yahoo map output | |
|---|---|---|---|---|---|---|
| GeoKit (plugin index) |
Y | Y | Y | N | N | N |
|
acts_as_geocodable ( plugin index) |
Y | Y* | Y | N | N | N |
|
acts_as_geocode (plugin index) |
Website currently down | |||||
|
actsaslocateable (plugin index) |
N | N | Y | Y | N | N |
|
YM4R (plugin index) |
N | N | N | N | Y | Y |
(* through companion gem)
Also worth mentioning are SpatialAdapter and GeoRuby (from the same developer as YM4R) which respectively provide ActiveRecord support for MySql Spatial and PostGIS geometric columns, and ruby data types for that information.
A recent addition is this Ruby library for the Geonames API which provides a nice way to interface with the GeoNames database of 2.2 million populated places. Properly harnessed, that service begins to make it possible to allow your users to describe their location in natural language and convert that into machine-parseable co-ordinates.
Update (8th March): Updated versions of this comparison will now appear on the foss4r wiki
Update (October 2008): The chart now lives on a separate page within this site.