Opened 11 years ago

Last modified 11 years ago

#10515 closed defect

AlignInLine action gives unexpected results with circular ways — at Version 3

Reported by: DeeHants Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: aligninline circular_way Cc: bastiK, Balaitous

Description (last modified by DeeHants)

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:

Screenshot of circluar ways that triggers the problem

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.

Change History (5)

by DeeHants, 11 years ago

Attachment: AlignInLine oddity.png added

Screenshot of circluar ways that triggers the problem

by DeeHants, 11 years ago

Attachment: Broken align.osm added

Test case OSM file that demonstrates the issue.

comment:1 by Don-vip, 11 years ago

Description: modified (diff)

comment:2 by Don-vip, 11 years ago

Cc: bastiK Balaitous added
Description: modified (diff)

comment:3 by DeeHants, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.