<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,<br><br>forgot to attach the patch.<br>Note that points added by --add-pois-to-areas are more likely <br>in the middle of a shape.<br><br>@Steve:<br>The routine was initially created for the --check-roundabouts option.<br><br>Later it was also used for --add-pois-to-areas and the --housenumbers option.<br>I got the impression that it might be better to calculate the center<br>of the way bbox for those two, I am not so sure about the roundabout code.<br>What do you think?<br><br>Gerd<br><br><div>> Date: Fri, 2 Jan 2015 21:34:14 -0700<br>> From: gpetermann_muenchen@hotmail.com<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: [mkgmap-dev] small issue with Way.getCofG()<br>> <br>> Hi all,<br>> <br>> We use the method Way.getCofG() to calculate a single <br>> coordinate for shapes, e.g. for buildings with house numbers.<br>> The routine calculates the avg. latitude and longitude of<br>> all points, which typically gives a point somewhere close <br>> to the middle of the shape, but it seems to ignore<br>> the fact that the first and last point in a shape are equal<br>> to close it, means, the result will be a bit too close to that<br>> closing point.<br>> Is there a good reason for this? <br>> <br>> We use it also to calculate the POI in --add-pois-to-areas.<br>> <br>> Gerd<br>> P.S. I guess a better formular could calculate the convex hull<br>> first, but I doubt that the additional CPU time would <br>> really improve the result that much.<br>> <br>> <br>> <br>> --<br>> View this message in context: http://gis.19327.n5.nabble.com/small-issue-with-Way-getCofG-tp5828821.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></body>
</html>