[OSM-dev] Finding closet node for PyrouteLib?

Tareq Ismail hellotheretareq at gmail.com
Wed Feb 10 22:36:55 GMT 2010


Thanks OJ!
That has solved my issue, you're wonderful.

I'm going to change how pyroutelib works so that it also accepts lat/lon in
addition to nodes.
If I wanted to contribute my code to pyroute lib, how would I do so? Do you
think it would be useful enough to contribute?

Tareq

On Wed, Feb 10, 2010 at 2:18 PM, OJ W <ojwlists at googlemail.com> wrote:

> The "data" object in that routing module should have a findNode()
> function that gives the nearest routable node for your chosen
> transport type.  This function is located in loadOsm.py
>
> (don't just choose the nearest OSM node since that might be a county
> boundary or something - the findNode function returns the nearest node
> which is on a path that you can travel)
>
>
>
>
>
>
>
> On Wed, Feb 10, 2010 at 9:30 PM, Tareq Ismail <hellotheretareq at gmail.com>
> wrote:
> > Hello all!
> >
> > I'm new to OSM and am glad to be a part of the community! I posted the
> > following question on the newbies thread and was told to post it here
> > instead.
> >
> > I have an application that has many addresses that I have geocoded. I am
> > trying to use Pyroutelib (see here:
> > http://wiki.openstreetmap.org/wiki/PyrouteLib) to find routing distances
> > from one address to another. It seems that the library does not accept
> > lat/lon (from the addresses I geocoded) as an input and only does node to
> > node routing. I thought I should then try to find the closet node to my
> > lat/lon position for my address, then send that node in to Pyroutelib for
> > routing.
> >
> > Any suggestions as to how to do this? Is there something simple that I
> > haven't thought of?
> > Thanks all!
> >
> >
> > Tareq
> >
> > _______________________________________________
> > dev mailing list
> > dev at openstreetmap.org
> > http://lists.openstreetmap.org/listinfo/dev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100210/d3ba0aee/attachment.html>


More information about the dev mailing list