logo separator

[mkgmap-dev] Way.isClosed()

From WanMil wmgcnfg at web.de on Tue Dec 17 17:01:00 GMT 2013

>  > > Do you agree?
>  > >
>  >
>  > Yes. I wonder if hasEqualEndPoints() is required?
> not If all routines that create shapes make sure that
> they add the identical point to close the shape. In trunk,
> this is not always the case, so I use it find those cases.
> I'll post a patch later to show my results.
>  >
>  > But you need to take care about any way copy made within mkgmap. I think
>  > the closed flag is copied very seldom (which is wrong).
>  >
> hmm, yes, and the docu for is_closed says
> "+true+ the way is closed. +false+ the way is not closed and cannot be
> processed as polygon."
> that would imply that we should use something like
> way.getPoints.size() > 2 && way.hasIdenticalEndPoints()
> to evalute is_closed()

The docu only tells you that the way cannot be processed as polygon when 
isClosed() returns false. It does not give any polygon related statement 
when it returns true. (This is nit-picking but in this case I think it 
was the intention of the author (me?!??!)).

So I vote for making the docu more precise and continue with the 


> Gerd

More information about the mkgmap-dev mailing list