Hi,


> Date: Sat, 21 Jan 2012 21:52:14 +0000
> From: steve@parabola.me.uk
> To: mkgmap-dev@lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] gmapsupp + index and Berlin/Friedrichstr.
>
> > Ok, you are right. I change my question. What do you think: Where should
> > we put the code to link addresses to the correct node? I am more familar
> > with OSM code using tags etc (all before the style system) so synthetic
>
> Right, it might be better to this after or during the roads being
> created in StyledConverter. I believe (not 100% sure) that numbers can
> only be attached to the nodes in a way, so it might be best to step
> down the way and find the nearest housenumber rather than look at all
> the housenumbers and try to match them to a road.

Ok, but you have to make sure that the house number belongs to that street, else
you may assign the number to multiple streets.


>
> This would mean that you may have to keep around a lot of information
> around for longer than if you did the housenumber step early on.
> I don't know the answer of the best way to do it.

I think this is a general point. If I got this right, mkgmap is doing a lot of
complex calculations more than once. At some execution point, ways are split, at other
points, ways are re-combined, sometimes distances are calculated, sometimes nearest
nodes are searched. Maybe it is possible to find a good data structure (e.g. the quadtree
used in LocationHook) that can be kept to aid such calculations?


> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev