logo separator

[mkgmap-dev] [PATCH v1] Decide in style file if a way is closed automatically

From WanMil wmgcnfg at web.de on Sat Oct 27 12:59:56 BST 2012

> Hi
>
>> Well, if this doesnt take too much calculation time, please go ahead :-)
>
> OK here is a first attempt.
>
> The parsers are modified to save a flag on the way if it is actually
> closed. It also aggressively refuses to make anything into a polygon
> that is not closed.
>
> So there should be errors as a result of splitter. But on the other hand
> there may be more due to OSM data errors. Will have to investigate this
> and adjust if necessary.
>
> Attached is the before and after results of my test and the patch.
>
> A precompiled jar is at:  http://files.mkgmap.org.uk/download/72/mkgmap.jar
>
> ..Steve
>

Afer a quick code inspection I would say: Looks good! The only thing 
that must be checked carefully is the new meaning of the isClosed() 
method. I am quite sure that there are some places at least in the 
multipolygon code that relies on
isClosed() == true => 
getPoints().get(0).equals(getPoints().get(getPoints().size()-1))

WanMil




More information about the mkgmap-dev mailing list