logo separator

[mkgmap-dev] render closed waterway polygons?

From WanMil wmgcnfg at web.de on Sun Oct 28 20:25:42 GMT 2012

Hi Steve,

I think the multipolygon code must be changed to work in the same way as 
unpatched.

The problem is the detection which member polygon lies within which 
other member polygon. See attached picture. The left side shows an mp 
with two members - one outer and one inner polygon. Due to the splitting 
process only the nodes within the overlap are known by the mp algorithm. 
So the mp alg sees the green and red polygon. Nor green neither red 
contain the other polygon completely. The problem lies in the overlap so 
the current mp algorithm ignores this and assumes that green contains 
red - but only if the original green way is not closed.

To cut a long story short: Some parts of the mp algorithm must adapt the 
new meaning of isClosed() and isComplete(). This will improve the 
algorithm because the isComplete() information was not available before.

I will have a look on it. Can you create a branch? That will make it 
easier for me to add my changes.

WanMil



> Hi
>
> Attached is my latest version of the patch.
>
> I've tried it out on the Netherlands with this style:
>
> <<<version>>>
> 0
> <<<lines>>>
> waterway=canal & natural!=water   [0x1f resolution 18 continue]
>
> <<<polygons>>>
> waterway=canal  [0x3c resolution 18]
>
>
> Before the patch there are numerous obvious problems where waterways
> cross the tile boundaries, but I am unable to find a single one
> with the patch.
>
> This patch differs from the first, now the isClosed() routine works
> exactly the same as before *except* when the way is incomplete, in
> which case the previously set closed flag is returned.
>
> So all generated ways (coastlines, multipolygons etc) should be unaffected,
> and of course all generated polygons should be complete, unless they
> were derived from incomplete ways.
>
> Pre-built jar at: http://files.mkgmap.org.uk/download/74/mkgmap.jar
>
> ..Steve
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp_wayclosed.png
Type: image/png
Size: 16851 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121028/fb892a47/attachment.png 


More information about the mkgmap-dev mailing list