[mkgmap-dev] small issue with Way.getCofG()
From GerdP gpetermann_muenchen at hotmail.com on Tue Jan 6 20:23:57 GMT 2015
Hi Mike, I like the idea, but it seems to be slow. Is it possible that your algo suffers when no fast graphics card is available? On my netbook the performance is very poor, did not yet try on the PC, but that also has no high speed graphics. Gerd GerdP wrote > Hi Mike, > > 50% sounds better than my algo, but still quite a lot. I'll have a closer > look at your > algo later. > Please note that your change has a side effect on the house number > generator. > Up to now this doesn't contain a filter for generated POI, so each polygon > with a house number is processed twice, once because of the POI, once > because the Generator uses Way.getCofG(). If both have different positions > this might have a negative impact. > > Gerd > > > From: > mike at .co > To: > mkgmap-dev at .org > Date: Tue, 6 Jan 2015 14:56:30 +0000 > Subject: Re: [mkgmap-dev] small issue with Way.getCofG() > > I have a working solution for ensuring that the created point is placed > within the polygon when using --add-pois-to-areas, based on drawing the > polygon on to a small monochrome bitmap and then looking for the point > that > is furthest from the surrounding area. I used a 9x9 bitmap for polygons > having a small number of points and 15x15 for longer polygons. There is > however a performance penalty. My standard map takes about 1 hour 20 > minutes; using this algorithm the time increases by about 50% to about 2 > hours. I am not currently able to commit changes to SVN (perhaps someone > can > help out with that) but I have attached the code changes. I suggest that > due > to the performance penalty, if we adopt this, then the --add-pois-to-areas > option be extended to be --add-pois-to-areas[=centre|optimised] or > something > similar, with the default being centre and functioning as now and the > optimised option invoking the new code. Please try out the suggested > change. > Note I don't expect this to work properly where a polygon is formed from a > multiploygon relation, but the code could quite easily be adapted for this > circumstance. > > > Regards, > Mike > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at .org > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at .org > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- View this message in context: http://gis.19327.n5.nabble.com/small-issue-with-Way-getCofG-tp5828821p5829247.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
- Previous message: [mkgmap-dev] small issue with Way.getCofG()
- Next message: [mkgmap-dev] small issue with Way.getCofG()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list