<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Mike,<br><br>50% sounds better than my algo, but still quite a lot. I'll have a closer look at your<br>algo later.<br>Please note that your change has a side effect on the house number generator.<br>Up to now this doesn't contain a filter for generated POI, so each polygon<br>with a house number is processed twice, once because of the POI, once<br>because the Generator uses Way.getCofG(). If both have different positions<br>this might have a negative impact.<br><br>Gerd<br><br><br><div>From: mike@tvage.co.uk<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Date: Tue, 6 Jan 2015 14:56:30 +0000<br>Subject: Re: [mkgmap-dev] small issue with Way.getCofG()<br><br><pre>I have a working solution for ensuring that the created point is placed<br>within the polygon when using --add-pois-to-areas, based on drawing the<br>polygon on to a small monochrome bitmap and then looking for the point that<br>is furthest from the surrounding area. I used a 9x9 bitmap for polygons<br>having a small number of points and 15x15 for longer polygons. There is<br>however a performance penalty. My standard map takes about 1 hour 20<br>minutes; using this algorithm the time increases by about 50% to about 2<br>hours. I am not currently able to commit changes to SVN (perhaps someone can<br>help out with that) but I have attached the code changes. I suggest that due<br>to the performance penalty, if we adopt this, then the --add-pois-to-areas<br>option be extended to be --add-pois-to-areas[=centre|optimised] or something<br>similar, with the default being centre and functioning as now and the<br>optimised option invoking the new code. Please try out the suggested change.<br>Note I don't expect this to work properly where a polygon is formed from a<br>multiploygon relation, but the code could quite easily be adapted for this<br>circumstance.<br> <br> <br>Regards,<br>Mike<br></pre><br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div>                                               </div></body>
</html>