[mkgmap-dev] help needed for graphical problem
From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Feb 12 09:20:27 GMT 2015
Hi all, for improvements in the housenumber2 branch I have to split a road segment into two parts. Given: the two (Garmin) points p1 and p2 that build the road segment and a distance d with d < p1.distance(p2). The normal way to calculate the wanted point is to use the Coord.makeBetweenPoint() method. The problem: the simple algo in makeBetweenPoint() calculates the point without looking at the rounding for the Garmin raster, so for line segments with a small slope the calculated point might be too far away from the displayed line. The effect is that the splitted line has a rather large angle while the originial line looks - of course - perfectly straight. I am sure this problem was already solved, but up to now I did not find an algo that works without a loop to calculate a set of points and chose the best one, e.g. using the Bresenham algo. Any hints? Gerd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150212/2fa2eca2/attachment.html>
- Previous message: [mkgmap-dev] variable contained with variable test
- Next message: [mkgmap-dev] help needed for graphical problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list