This is a broad question to get me started in the right direction: I would like to provide a location-based service so that users can tag articles with a location (the place where the article took place), and search (or list) articles by location. This raises some questions: - Presumably best practice is to allow the user not to type free-form locations, but to help them pick a location from a list? - Are there any frameworks that handle geographical hierarchies? For example, an article may be tagged with a city name, and a user may want to list all articles for a county, we''d need to know all of the cities in each county or we''d return nothing. The simplest thing may be to just have a flat list of places, with no hierarchy, a list of cities and major towns for example? Any broad advice on what''s out there to provide any geographical/location services would be much appreciated! Thanks! -- Posted via http://www.ruby-forum.com/.
Peter Laurens wrote:> This is a broad question to get me started in the right direction: > > I would like to provide a location-based service so that users can tag > articles with a location (the place where the article took place), and > search (or list) articles by location. > > This raises some questions: > > - Presumably best practice is to allow the user not to type free-form > locations, but to help them pick a location from a list? > > - Are there any frameworks that handle geographical hierarchies? For > example, an article may be tagged with a city name, and a user may want > to list all articles for a county, we''d need to know all of the cities > in each county or we''d return nothing. > > The simplest thing may be to just have a flat list of places, with no > hierarchy, a list of cities and major towns for example? > > Any broad advice on what''s out there to provide any > geographical/location services would be much appreciated! >I''m not going to be able to help this yet, but just to add to it. What level of granularity do you want to provide? Can people search by the places within a city? How about different shops/ outlets within a city? Does it matter which branch generated the document? Cheers, Mohit. 8/23/2009 | 8:08 PM.
> I''m not going to be able to help this yet, but just to add to it. What > level of granularity do you want to provide?For me, I could really get away with a flat list of worldwide cities, which I guess would be the least level of granularity possible. However, a 2-level service would be good so we would have a hierarchy of county/parish<->city. Of course, for very large cities such as London, it would be good to be able to split them further. So in a nutshell, for my needs I think I could get by with a sensible worldwide flat list, but if there''s a good, easy to integrate, worldwide 2-level service/framework, that would be great for me. As for shops and outlets, that level of granularity would be a bit too much for me, but actually, thinking about it, might be interesting! I guess I was fishing around for clues on what was available. -- Posted via http://www.ruby-forum.com/.
are you looking to connect with something like: www.geonames.org On Aug 23, 2009, at 08:45 AM, Peter Laurens wrote:> > So in a nutshell, for my needs I think I could get by with a sensible > worldwide flat list, but if there''s a good, easy to integrate, > worldwide > 2-level service/framework, that would be great for me. > > As for shops and outlets, that level of granularity would be a bit too > much for me, but actually, thinking about it, might be interesting!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Marion Taylor wrote:> are you looking to connect with something like: www.geonames.orgThat is pretty good! There appear to be some basic ways of digging through the hierarchy too (e.g. finding the country for a city etc.). This looks like what I needed, thanks. -- Posted via http://www.ruby-forum.com/.
Peter if www.geonames.org is what you need, also check out: www.gis.com GNIS Feature Search (which seems to be an application using geonames.org) and others via google: geographical database On Aug 23, 2009, at 09:24 AM, Peter Laurens wrote:> > Marion Taylor wrote: >> are you looking to connect with something like: www.geonames.org > > That is pretty good! > > There appear to be some basic ways of digging through the hierarchy > too > (e.g. finding the country for a city etc.). > > This looks like what I needed, thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You may or may not have seen this too, but it is a big part of every geocoding Rails app I build: http://geokit.rubyforge.org/ It adds a number of geocode-specific methods to ActiveRecord which allow you to query records based on their proximity to a location (e.g. @locations = Location.find(:all, :origin => @address, :within => @within, :order => ''distance'')). It can also automatically geocode a location upon create using either Google, Yahoo, or GeoNames. You provide your API key and GeoKit handles the grunt work. Very handy tool. :-) Good luck with your project. On Aug 23, 7:54 am, Peter Laurens <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> This is a broad question to get me started in the right direction: > > I would like to provide a location-based service so that users can tag > articles with a location (the place where the article took place), and > search (or list) articles by location. > > This raises some questions: > > - Presumably best practice is to allow the user not to type free-form > locations, but to help them pick a location from a list? > > - Are there any frameworks that handle geographical hierarchies? For > example, an article may be tagged with a city name, and a user may want > to list all articles for a county, we''d need to know all of the cities > in each county or we''d return nothing. > > The simplest thing may be to just have a flat list of places, with no > hierarchy, a list of cities and major towns for example? > > Any broad advice on what''s out there to provide any > geographical/location services would be much appreciated! > > Thanks! > -- > Posted viahttp://www.ruby-forum.com/.
I second Geokit, I''ve used it in almost every application I''ve built. However, the main purpose of geokit is for getting the latitude and longitude of a location and then performing distance calculations between that location and other locations (such as finding all locations within a certain distance of another location). If you want to do something such as list cities or counties, you''ll probably need to get something like a ''location database'' and slice and dice it for your needs. Unfortunately they usually cost money. An alternative solution to showing all the articles in the same county as a city would be to use geokit to show all the articles within a certain distance of a city. That could provide your users with a similar experience. Hope that helps. On Mon, Aug 24, 2009 at 9:46 AM, Billee D. <william.dodson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > You may or may not have seen this too, but it is a big part of every > geocoding Rails app I build: > > http://geokit.rubyforge.org/ > > It adds a number of geocode-specific methods to ActiveRecord which > allow you to query records based on their proximity to a location > (e.g. @locations = Location.find(:all, :origin => @address, :within => > @within, :order => ''distance'')). It can also automatically geocode a > location upon create using either Google, Yahoo, or GeoNames. You > provide your API key and GeoKit handles the grunt work. Very handy > tool. :-) > > Good luck with your project. > > On Aug 23, 7:54 am, Peter Laurens <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > This is a broad question to get me started in the right direction: > > > > I would like to provide a location-based service so that users can tag > > articles with a location (the place where the article took place), and > > search (or list) articles by location. > > > > This raises some questions: > > > > - Presumably best practice is to allow the user not to type free-form > > locations, but to help them pick a location from a list? > > > > - Are there any frameworks that handle geographical hierarchies? For > > example, an article may be tagged with a city name, and a user may want > > to list all articles for a county, we''d need to know all of the cities > > in each county or we''d return nothing. > > > > The simplest thing may be to just have a flat list of places, with no > > hierarchy, a list of cities and major towns for example? > > > > Any broad advice on what''s out there to provide any > > geographical/location services would be much appreciated! > > > > Thanks! > > -- > > Posted viahttp://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---