[mkgmap-dev] small issue with Way.getCofG()
From GerdP gpetermann_muenchen at hotmail.com on Sat Jan 3 04:34:14 GMT 2015
Hi all, We use the method Way.getCofG() to calculate a single coordinate for shapes, e.g. for buildings with house numbers. The routine calculates the avg. latitude and longitude of all points, which typically gives a point somewhere close to the middle of the shape, but it seems to ignore the fact that the first and last point in a shape are equal to close it, means, the result will be a bit too close to that closing point. Is there a good reason for this? We use it also to calculate the POI in --add-pois-to-areas. Gerd P.S. I guess a better formular could calculate the convex hull first, but I doubt that the additional CPU time would really improve the result that much. -- View this message in context: http://gis.19327.n5.nabble.com/small-issue-with-Way-getCofG-tp5828821.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
- Previous message: [mkgmap-dev] africa map
- Next message: [mkgmap-dev] small issue with Way.getCofG()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list