[Osmlib-devel] Measuring the length of a way

Frankie Roberto frankie at frankieroberto.com
Mon Jun 29 04:58:45 EDT 2009


On Mon, Jun 29, 2009 at 7:17 AM, Jochen Topf <jochen at remote.org> wrote:

> Thought I'd post a quick problem I'm trying to solve here, in case you can
> > help point me at a solution.  Given a way retrieved from OSM, what would
> be
> > the best way of calculating its total length (in say, metres or
> > kilometres)?  Does this formula look like the right one?:
> >
> http://stackoverflow.com/questions/27928/how-do-i-calculate-distance-between-two-latitude-longitude-points
>
> Haven't checked the formula, but "great-circle distance" and "Haversine"
> formula, are definitely right.
>

Thanks. Will investigate further.


> > Second question: any chance we could include this method in the gem? :-)
>
> osmlib is for OSM related stuff, calculating great-circle distance or other
> geometry functions should probably go into a geo library such as GeoRuby.


Fair point. I'll check out what existing Ruby geo gems there are out there.

Frankie

-- 
Frankie Roberto
Experience Designer, Rattle
0114 2706977
http://www.rattlecentral.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/osmlib-devel/attachments/20090629/eadcf873/attachment.html>


More information about the Osmlib-devel mailing list