﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10821	[PATCH] ImproveWayAccuracy produces self-intersecting ways	akks	team	"Reported by '''Vitalts''' on forum:
http://forum.openstreetmap.org/viewtopic.php?pid=469490#p469490

How to reproduce: 
1. Open attached .osm file
2. Enter Improve Way Accuracy mode ``W`` and hold ``Ctrl``
3. Move mouse near the east node (see animated gif by  '''Vitalts''') 

Self-intersecting ways are not expected to appear.


Solution:
There is some rounding error in sin/cos based Geometry.getSegmentAltituteIntersection (transferred from IWA 
plugin? misprint also...)

The function does actually the same as ``closesPointTo`` but returns null sometimes. It is used only in IWA mode and in NanoLog plugin.

 - One solution is to remove this function and use closestPointToSegment and additional checks.
 - Another solution is to keep separate function but use the code from closestPointToSegment (no other class changing will be neeeded, patch attached)

@team: could someone check the patch with the second solution?


"	defect	closed	normal	14.11	Core		fixed	ImproveWayAccuracy	
