i''m trying geokit and loving it, but i''m seeing really odd stuff on distances, I''m wondering about the coordinates i''ve got in my DB. I don''t think they''re standard format, they look like this. east 6''41.6 north 45''24.8 Can anyone advise please ? -- Posted via http://www.ruby-forum.com/.
Someone said i can convert these with a regex ? that right ? Maybe on the fly ? -- Posted via http://www.ruby-forum.com/.
I think geokit wants lat,lng as floats (or something it can easily convert into floats with to_f). It''s hard to tell from the API whether distance_from is processed in rails or using SQL trig functions. Since geokit does a lot of processing on the database side rather than in rails, it may be easier if you can find some way to store your data in that format. Also: this may be get you more expert help with geokit: http://groups.google.com/group/geokit On Sep 20, 12:19 am, bingo bob <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Someone said i can convert these with a regex ? that right ? > > Maybe on the fly ? > -- > Posted viahttp://www.ruby-forum.com/.
Ok, thanks, noted re the google group - good point. Anyone else help on this? Maybe I build a rake task to convert all the values to floats with a regex? OR just convert these on the fly to floats somehow with a regex. Either way I could do with a hand, don''t know how to do it. Quite happy to play around in script/console to check inputs and outputs of regex''s. -- Posted via http://www.ruby-forum.com/.