logo separator

[mkgmap-dev] Way.isClosed()

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Dec 17 16:29:36 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() 

Gerd
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131217/9883c5c6/attachment.html>


More information about the mkgmap-dev mailing list