[mkgmap-dev] Commit r4914: no_hp-overflow_v2.patch by Ticker Berkin (with modified javadoc and updated unit tests):

2023-10-07 Thread svn commit
Version mkgmap-r4914 was committed by gerd on Sun, 08 Oct 2023

no_hp-overflow_v2.patch by Ticker Berkin (with modified javadoc and updated 
unit tests): 
Improve conversion between degrees and mapunit or high precision values. 
This fixes spurious artifacts (gaps or zig-zagging) and typically reduces RGN 
size slightly.

http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=4914
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] Gaps in surfaces

2023-10-07 Thread Ticker Berkin
Hi Gerd

I've looked through all the places I could find that took [highPrec]coord vals, 
manipulated them
and then converted back and they all seem safe with my patch.

There might be slight differences where, using Java2DConverter or similar, a 
calculated value
converts to a different/adjacent highPrec value from the old code; I don't 
think this matters.
Original values will be restored to the same highPrec value.

I'll try and remember not to use +ve and -ve; it is very common shorthand in 
English

Ticker

On Sat, 2023-10-07 at 07:07 +, Gerd Petermann wrote:
> Hi Ticker,
> 
> I did some tests and your patch really seems to solve the problem without 
> introducing new ones
> :)
> 
> Just one remark: Please try to avoid terms like "+ve" in javadoc. I had to 
> read this
> two times to understand that it means positive ;)
> 
> So, if you don't find furher things to change I would be happy to commit the 
> patch, although I
> don't yet understand
> why it also fixes the MP gaps issue.
> 
> Gerd

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] Gaps in surfaces

2023-10-07 Thread Gerd Petermann
Hi Ticker,

I did some tests and your patch really seems to solve the problem without 
introducing new ones :)

Just one remark: Please try to avoid terms like "+ve" in javadoc. I had to read 
this
two times to understand that it means positive ;)

So, if you don't find furher things to change I would be happy to commit the 
patch, although I don't yet understand
why it also fixes the MP gaps issue.

Gerd




Von: mkgmap-dev  im Auftrag von Ticker 
Berkin 
Gesendet: Freitag, 6. Oktober 2023 17:22
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Gaps in surfaces

Hi Gerd

Sorry - bit hasty in my reply

I need to look at the other places that use DELTA_SHIFT and check their 
arithmetic/rounding etc
is consistent with the corrected highPrecCoord and uniform in rounding 
behaviour.

Ticker

On Fri, 2023-10-06 at 16:15 +0100, Ticker Berkin wrote:
> Hi Gerd
>
> My change to toMapUnit should be almost undetectable. Imagining mapUnits [x] 
> as degrees over
> the
> real range -2.5 .. +2.5, the original implementation resulted in:
>
> -2.5 <  [-2] <= -1.5 <  [-1] <= -0.5 <  [0] <  -0.5 <= [1] <  +1.5 <= [2] <  
> +2.5
>
> I've changed it to give:
>
> -2.5 <= [-2] <  -1.5 <- [-1] <  -0.5 <= [0] <  -0.5 <= [1] <  +1.5 <= [2] <  
> +2.5
>
> The change to highPrecCoord is so that 64 highPrecCoords are exactly within 
> the appropriate
> mapUnit, with deltas of -31..+32 according to the existing delta calculations.
>
> Ticker
>
> On Fri, 2023-10-06 at 14:34 +, Gerd Petermann wrote:
> > Hi Ticker,
> >
> > your patch rounds the problematic point to a different position, the same 
> > that is assigned
> > to
> > the new Coord instance that is derived from the cutOutInnerPolygons() method
> > which involves singularAreaToPoints() and thus another place where rounding 
> > happens:
> > int latHp = (int)Math.round(res[1] * 
> > (1< > int lonHp = (int)Math.round(res[0] * 
> > (1< >
> > I think we have to check all nodes which are part of an inner and change 
> > position because of
> > your different rounding method, right? I wouldn't be surprised to find 
> > cases where a gap
> > occurs
> > with (just) your patch. I'll try to find an example...
> > If I can't we may just use your patch, although it's much harder to 
> > understand compared to
> > the
> > original code.
> >
> > Gerd
>
> ___
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Commit r4913: adapt test values to reflect recent changes. RGN sizes decreesed a bit with the changes in r4909

2023-10-07 Thread svn commit
Version mkgmap-r4913 was committed by gerd on Sat, 07 Oct 2023

adapt test values to reflect recent changes. RGN sizes decreesed a bit with the 
changes in r4909

http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=4913
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev