[OSM-talk] Osm.org Routing Demo
Nic Roets
nroets at gmail.com
Fri Jul 2 15:30:22 BST 2010
On Fri, Jul 2, 2010 at 3:51 PM, Ian Dees <ian.dees at gmail.com> wrote:
> On Fri, Jul 2, 2010 at 8:47 AM, Richard Weait <richard at weait.com> wrote:
>>
>> On Fri, Jul 2, 2010 at 9:03 AM, Nic Roets <nroets at gmail.com> wrote:
>> > I made a demonstration of how the yournavigation.org website can be
>> > embedded inside osm.org. Check it out:
>> >
>> >
>> > http://nroets.dev.openstreetmap.org/demo/?lat=52.32796&lon=5.62046&zoom=15&layers=B000FTFT
>>
>> Nick, This is wonderful! I just did a "reasonable" route and it was
>> blindingly fast. Fantastic.
>>
>
> Yes, this is quite nice! I wish there was a way to make it more obvious that
> routing exists on the home page, but I understand your concerns about
> performance.
> Can you give more details about what is involved in doing driving
> directions?
It's a text to text transformation. So you can use your favourite
language and your favourite debugger.
I've included an example of the routing engine output below. The first
column is latitude and the second column is longitude.
>From the first two lines you can calculate the direction of travel. It
looks like South East to me, but there are simple formulas that
calculate that I can give to you. You can also calculate the distance
for each segment. The lower case 'j's indicate that it's not a
junction and the capital 'J's indicate there is a junction. So the
first few instructions may look like this:
1. Travel 500m South East on Westdijk.
2. Turn right at the junction and travel 1km South West on Westerweg.
...
As you can see, the first 4 lines are combined into 1 entry.
So you calculate the Azimuth angle (0 degree=North, 90=East, 180=South
and 270=West) and then you look at how much it changes with every
segment, if the name changes, junction type etc. Then you look up the
appropriate string with the i18n library of your choice and format the
output.
--
As for the load: Most of the time Errol is using half a core right now
and it has 16 ! I think when Richard did Amsterdam to Girona, most of
the data was swapped out and he had to wait a few seconds for it to be
swapped back in. Under full production we may choose to lock the data
in RAM.
--
Mike N wrote:
> It should be noted that this is neither the shortest or fastest route, so there may need to be a new option?
> There's talk of several back end routing engines (Gosmore/etc), so I'm not sure if I should look at modifying one
> of these engines, or if I would need to add a new one?
To solve such a problem with mathematics and computers, we need a goal
function. And it may be impossible to collect all the relevant
information objectively. (For example, this hiking trail is long, but
it has spectacular views). So I don't have time to work on something
like this on my spare time and I doubt someone will get far in hacking
it into Gosmore.
A better solution is to post the trail on a website, like gpsies.com
with photos and descriptions so that it will get the attention of
tourists.
Regards,
Nic
Input:
QUERY_STRING='flat=52.672938&flon=4.814691&tlat=50.765825&tlon=4.304728&fast=1&v=motorcar'
/home/nroets/gosmore/gosmore
Gosmore Output:
Content-Type: text/plain
^M52.673050,4.813020,j,tertiary,8856,Westdijk
^M52.672800,4.815380,j,tertiary,8845,Westdijk
^M52.672170,4.822010,j,tertiary,8814,Westdijk
^M52.672110,4.822420,j,tertiary,8812,Westdijk
^M52.672000,4.822630,J,primary,8810,Westerweg
^M52.671160,4.820630,J,primary,8802,Westerweg
^M52.670990,4.820080,j,primary,8800,Westerweg
^M52.670790,4.819590,j,primary,8798,Westerweg
^M52.670030,4.818010,J,primary,8791,Westerweg
^M52.669910,4.817820,J,primary,8789,Westerweg
^M52.669460,4.816960,j,primary,8785,Westerweg
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
>
More information about the talk
mailing list