﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10515	AlignInLine action gives unexpected results with circular ways	DeeHants	team	"Following on from case #9605, the new code to pick the furthest nodes along a way (change r6894) gets ""confused"" when dealing with a circular way.
In my case, one of the end nodes in my selection was the first/last node in the way. All other nodes were towards the end of the way.
This resulted in it picking the ""first"" node and the penultimate node as the ""furthest"" away instead of the string of 4 consecutive nodes:

[[Image(AlignInLine oddity.png)]]

What steps will reproduce the problem?
 1. Create a circular way with nodes a,b,c,d,e,f,g,a
 2. Select nodes e,f,g,a
 3. perform the AlignInLine action

What is the expected result?
The nodes should have been aligned in a line between e and a (Both as furthest distance, and seemingly furthest along the way)

What happens instead?
A line is calculated between g and a with all other nodes aligned to that.

{{{
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-08-31 21:55:55
Last Changed Author: Don-vip
Revision: 7480
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-08-31 23:51:24 +0200 (Sun, 31 Aug 2014)
Last Changed Rev: 7480

Identification: JOSM/1.5 (7480 en_GB) Windows 8 32-Bit
Memory Usage: 328 MB / 989 MB (36 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- AddrInterpolation (30416)
- DirectDownload (30416)
- FixAddresses (30416)
- OpeningHoursEditor (30609)
- gpxfilter (30416)
- imagery_offset_db (30534)
- imageryadjust (30416)
- notes (v0.9.4)
- tagging-preset-tester (30592)
- turnrestrictions (30454)

Last errors/warnings:
- W: org.openstreetmap.josm.plugins.ohe.parser.ParseException: Encountered ""<EOF>"" at line 1, column 1.
}}}"	defect	closed	normal		Core	tested	duplicate	aligninline circular_way	bastiK Balaitous
