Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Thilo Hannemann
Hi Mark, Am 16.06.2009 um 08:33 schrieb Mark Burton: Recently, Coord.distance() was replaced with a much speedier implementation because a lot of cpu cycles were being wasted there. The newer function appears to be accurate enough for our purposes. The DP code contains another distance

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Mark Burton
Hi Thilo, The DP code contains another distance calculation. What you must calculate there is the distance of one point to a line. The Coord.distance() is used in that formula, but I do not understand the formula itself. Maybe it's some genius trick to simplify the calculation, but

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Thilo Hannemann
Hi Mark, Am 16.06.2009 um 09:18 schrieb Mark Burton: At the distances we're (mostly) interested in, the curvature of the earth's surface has a tiny effect (much less than the effect of hills valleys) so I guess (hope) that leaving out that factor is OK. The curvature may have a tiny

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Mark Burton
Hi Thilo, At the distances we're (mostly) interested in, the curvature of the earth's surface has a tiny effect (much less than the effect of hills valleys) so I guess (hope) that leaving out that factor is OK. The curvature may have a tiny effect, but nonetheless you should

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Mark Burton
On Tue, 16 Jun 2009 17:19:21 +0100 Mark Burton ma...@ordern.com wrote: In the example above, I would argue that taking the sqrt and division outside of the loop doesn't make the code harder to understand and may yield some speedup. Well, a quick test showed a barely perceptible gain so may

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Marco Certelli
--- Mar 16/6/09, Mark Burton ma...@ordern.com ha scritto: Da: Mark Burton ma...@ordern.com Oggetto: Re: [mkgmap-dev] Overview map: tiny patch/review series A: mkgmap-dev@lists.mkgmap.org.uk Data: Martedì 16 giugno 2009, 18:19 Hi Thilo, At the distances we're (mostly) interested in,

Re: [mkgmap-dev] route recalculation senstivity bug found

2009-06-16 Thread Paul
Change line 170 of src/uk/me/parabola/imgfmt/app/trergn/TREHeader.java to output 0x170401 instead of 0x110301. I'm happy to try this but won't be able to report back for a few days So I finally got chance to try this out and after a brief test I would say that at best it's the same as

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Elrond
On Tue, Jun 16, 2009 at 07:58:24AM +0200, Thilo Hannemann wrote: Hi Elrond, [...] The problem of distorted polygons does not only appear in the overview map, it appears at all zoom levels. [...] Hi, Okay, about the DP code, I have some speculation, why it performs bad. It's a variation on

Re: [mkgmap-dev] Filters for overview map

2009-06-16 Thread Elrond
Hi Johann, first some introduction to the overview map: It's only used in mapsource. If you have multiple tiles (for different areas) there is exactly one polygon (rectangle) for each tile. The name for the polygon is the name of the tile plus its map name (the eight digit name). It has a

Re: [mkgmap-dev] Filters for overview map

2009-06-16 Thread Elrond
Hi, My current conclusions from both thread parts: 1) I should only disable the SizeFilter (we really, really don't want to drop any polygon). 2) We should fix DP. Does that make sense? Elrond ___ mkgmap-dev mailing list

Re: [mkgmap-dev] Filters for overview map

2009-06-16 Thread Thilo Hannemann
Hi, Am 16.06.2009 um 20:39 schrieb Elrond: My current conclusions from both thread parts: 1) I should only disable the SizeFilter (we really, really don't want to drop any polygon). For the overview map obviously not. 2) We should fix DP. From what you explained about the overview map

Re: [mkgmap-dev] Overview map: tiny patch/review series

2009-06-16 Thread Thilo Hannemann
Am 16.06.2009 um 18:33 schrieb Marco Certelli: Just speculation: I've a and b that defines a line. I look for the distance between a point p and the line. Given the triangle p-a-b where p is the vertex and a-b is the base, the area of the triangle can be calculated from the lenght of

Re: [mkgmap-dev] Filters for overview map

2009-06-16 Thread Elrond
Hi, On Tue, Jun 16, 2009 at 10:49:45PM +0200, Thilo Hannemann wrote: Hi, Am 16.06.2009 um 20:39 schrieb Elrond: My current conclusions from both thread parts: 1) I should only disable the SizeFilter (we really, really don't want to drop any polygon). For the overview map obviously