<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Mike,<br><br>on my PC the performance of your algo is quite good. <br>Attached is a patch that contains your patch as well as my quick implementation<br>of the algo described here:<br><a href="http://arxiv.org/ftp/arxiv/papers/1212/1212.3193.pdf" target="_blank">http://arxiv.org/ftp/arxiv/papers/1212/1212.3193.pdf</a><br><br>The patch tests only performance, it computes the center with the 3 different algos,<br>I've commented the part that prints times and GPX data for debug purposes.<br><br>I noticed that the results between both algos are very different, I did not<br>yet try to find out which one is better, but mine is much slower on my PC.<br>I also noticed that your algo doesn't always calculate a point in the polygon,<br>see e.g. way 178708143.<br><br>If you like, please try to find a better compromise, I like to fix a problem in<br>splitter first.<br>I also did not yet look at the effect on the house number code, as there are many<br>more small open problems, but I think it should be easy to sort that out.<br><br>Gerd<br><br><br><div>> Date: Tue, 6 Jan 2015 13:23:57 -0700<br>> From: gpetermann_muenchen@hotmail.com<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] small issue with Way.getCofG()<br>> <br>> Hi Mike,<br>> <br>> I like the idea, but it seems to be slow.<br>> Is it possible that your algo suffers when no fast graphics card is<br>> available?<br>> On my netbook the performance is very poor, did not yet<br>> try on the PC, but that also has no high speed graphics.<br>> <br>> Gerd<br>> <br>> <br>> GerdP wrote<br>> > Hi Mike,<br>> > <br>> > 50% sounds better than my algo, but still quite a lot. I'll have a closer<br>> > look at your<br>> > algo later.<br>> > Please note that your change has a side effect on the house number<br>> > 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>> > From: <br>> <br>> > mike@.co<br>> <br>> > To: <br>> <br>> > mkgmap-dev@.org<br>> <br>> > Date: Tue, 6 Jan 2015 14:56:30 +0000<br>> > Subject: Re: [mkgmap-dev] small issue with Way.getCofG()<br>> > <br>> > 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<br>> > 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<br>> > can<br>> > help out with that) but I have attached the code changes. I suggest that<br>> > 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<br>> > 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<br>> > 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>> > <br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> <br>> > mkgmap-dev@.org<br>> <br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev                                            <br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> <br>> > mkgmap-dev@.org<br>> <br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> <br>> <br>> <br>> <br>> <br>> --<br>> View this message in context: http://gis.19327.n5.nabble.com/small-issue-with-Way-getCofG-tp5828821p5829247.html<br>> Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div></div>
                                           </div></body>
</html>