logo separator

[mkgmap-dev] Work on is_in branch

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue Feb 18 09:42:28 GMT 2020

Hi Gerd

Part of the reason for the methods is to group the IN/ON/OUT cases
together in various combinations for meaningful usability.

In IsInUtilTest.java is the table (for the sake of brevity, using
'camel' notation rather than underscores as in the actual method
keyword):
/* all=someInNoneOut, any=anyIn, none=someOutNoneIn
a) IN        all allInOrOn    any
b) IN ON     all allInOrOn    any
c) IN ON OUT                  any
d)    ON         allInOrOn on
e)    ON OUT                      none
f)       OUT                      none
*/

So the difference between ..,all)=true and ..,none)=false is what
happens to cases c) and d).

The methods "any", "on" and "allInOrOn" include these cases. Obvious
and sensible for the meaning of "any" and "on", "allInOrOn" is a bit
arbritary, but the idea is that a perimeter line can be picked up along
with the inside lines in one test if that is what is wanted. I didn't
think there was a need to pick up a perimeter line with the outside
lines, but this could be added easily.

Ticker

On Tue, 2020-02-18 at 00:28 -0700, Gerd Petermann wrote:
> Gerd Petermann wrote
> > Ticker Berkin wrote
> > > I suggest replacing ANY_IN_OR_ON with SOME_OUT_NONE_IN, giving it
> > > the
> > > method string "none", like SOME_IN_NONE_OUT is referenced as
> > > "all".
> > 
> > Yes, much better. 
> 
> Thinking again about it. What would be the difference between
> is_in(..all)=true and is_in(..none)=false?
> 
> My understanding is that we want to distinguish 5 or 6 cases. Three
> methods
> returning true or false should be enough for that.
> 
> Gerd
> 
> 
> 
> --
> Sent from: 
> http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list