logo separator

[mkgmap-dev] error in NumberPreparer?

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Apr 21 16:32:30 BST 2015

Hi Steve,

I was surprised to see that these values are written.
I've assumed that NONE means something like
"don't try to read start and end" to safe some bits,
but it seems the values are written (and read) and because of our
tests we want to (have to) be able to distinguish between 
N,0,0 and N,-1,-1 .
Well, I can change the patch so that a null pointer means
"N,0,0" so that we don't have to waste memory for that default.
I did not yet try to find out if there is a best value regarding the
number of bits.

Gerd

From: steve at parabola.me.uk
Date: Tue, 21 Apr 2015 11:04:04 +0100
To: mkgmap-dev at lists.mkgmap.org.uk
Subject: Re: [mkgmap-dev] error in NumberPreparer?

Hi Gerd

The -1 is used by convention in the Polish format. It doesn't have any meaning to the img format itself.





On 21 April 2015 10:36:32 GMT+01:00, Gerd Petermann <gpetermann_muenchen at hotmail.com> wrote:



Hi Steve,

thanks, 
problem occurs when one side has NONE and the other hasn't.
I think the test should not produce values which the normal
program never does (NONE  with -1 for start + end).
Or do you find such data in Garmin maps?
In that case meaby it has a special meaning?

Gerd


> Date: Tue, 21 Apr 2015 10:24:47 +0100
> From: steve at parabola.me.uk
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] error in NumberPreparer?
> 
> 
> Hi Gerd
> 
> > it seems that NumberPreparer (in trunk) doesn't completely ignore
> > the start/end values when numberStyle == NONE.
> 
> I was just going to post that the patch failed with NumberRangeTest,
> wheras trunk passes.  It seems you may have found the answer but I
> don't think this code should be reached when both styles are N
 ONE
> since it should have exited at numbers.isEmpty() -- at least in the
> original code.
> 
> > See line 116:
> >          if (first.getLeftStart() > first.getLeftEnd() ||
> > first.getRightStart() > first.getRightEnd())
> >              initial = Math.max(initial, rightStart);
> >          else if (rightStart > 0)
> >              initial = Math.min(initial, rightStart);
> 
> I've got to go out now, I will try to have a look at it later.
> 
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
            

mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150421/c12743cc/attachment.html>


More information about the mkgmap-dev mailing list