Modify

Opened 2 days ago

#23761 new defect

Merging a way fails and leaves stranded nodes if a shared node in the target layer has been modified

Reported by: b1tw153 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Create Data Layer 1 as a new layer
  2. Draw a first way with 30 nodes
  3. Draw a second way with 30 nodes and connect the last node of the way to an intermediate node of the first way
  4. Create Data Layer 2 as a new layer
  5. Merge the first way from Data Layer 1 to Data Layer 2
  6. In Data Layer 2, move the node that is shared between the first and second ways
  7. Return to Data Layer 1 and select the second way
  8. Merge the second way from Data Layer 1 to Data Layer 2
  9. Acknowledge the error message (screen shot attached) and close the error window

What is the expected result?

Three possible results could be "correct," but of the three, one result would be best.

  1. None of the data from the second way is present in Data Layer 2
  2. The second way is merged from Data Layer 1 to Data Layer 2 with the last (shared) node in its original position as if it had been split from the first way
  3. The second way is merged from Data Layer 1 to Data Layer 2 with the last (shared) node in the new position, still shared with the first way

It seems that the intention was that #1 would be the result. However, this is inconvenient when working with data sets where several items are merged into the OSM later and each item is edited after it is merged. If #1 is the result, merging the second way will always fail after the first way is modified. This means that the merge operation cannot be used for the second way.

If #1 is implemented as the result, this forces the user to copy the second way from Data Layer 1 to Data Layer 2 as a workaround instead of merging it. Copying the second way from Data Layer 1 and pasting it into Data Layer 2 at the original location will produce result #2.

The better result would be #3. The "merge" operation implies that data will be conflated. Since the data ends up in the target layer, the data in the target layer should take priority over incoming data during the merge. This will produce result #3.

Note that if the data in the source layer takes priority over the data in the target layer during the merge operation, this produces a different result which reverts the change that was made to the first way in Data Layer 2. This is not desirable.

If either #2 or #3 is implemented, the merge operation should be on the undo stack so that it can be undone.

What happens instead?

All of the nodes except the last node of the second way are present in Data Layer 2 after the failed merge operation. The second way itself is not present in Data Layer 2. Since merge operations are not on the undo stack, there addition of these stranded nodes cannot be undone. The user must find all these nodes and manually delete them.

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-06-03 18:08:14 +0200 (Mon, 03 Jun 2024)
Revision:19096
Build-Date:2024-06-07 01:31:15
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19096 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 22H2 (19045)
Memory Usage: 452 MB / 2014 MB (293 MB allocated, but free)
Java version: 21.0.3+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djava.security.manager=allow]
Dataset consistency test: No problems found

Plugins:
+ apache-commons (36273)
+ ejml (36176)
+ geotools (36273)
+ jackson (36273)
+ jaxb (36118)
+ jts (36004)
+ opendata (36256)
+ reverter (36256)
+ utilsplugin2 (36241)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Mountainbike&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/MtbSingletrack&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NonMotorizedRoutes&zip=1

Last errors/warnings:
- 00000.948 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF'
- 00000.951 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.953 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00005.722 W: Unable to request certificate of https://roottest-g3.pkioverheid.nl
- 00007.024 W: Unable to request certificate of https://roottest-g3.pkioverheid.nl
- 06148.331 E: org.openstreetmap.josm.io.IllegalDataException: Line 98 column 31: Open quote is expected for attribute "action" associated with an  element type  "way".. Cause: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[98,31]
- 06148.389 E: Error - <html>Could not read file 'abuse2.osm'.<br>Error is:<br>Line 98 column 31: Open quote is expected for attribute "action" associated with an  element type  "way".</html>
- 490420.950 E: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Unable to add primitive {Node id=-25399 version=0 MV lat=35.926769717343646,lon=-118.57237091050537} to the dataset because it is already included (changed by the following commands: [Sequence: Add a new node to an existing way], [Move 1 node])
- 490573.850 E: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Unable to add primitive {Node id=-25460 version=0 MV lat=35.78849618775447,lon=-118.33225967353779} to the dataset because it is already included (changed by the following commands: [Sequence: Add a new node to an existing way], [Move 1 node])

OSM API: https://master.apis.dev.openstreetmap.org/api

Attachments (1)

JOSM Error 2024-06-28.png (10.7 KB ) - added by b1tw153 2 days ago.
Error message when merge fails because a shared node in the target layer has been modified

Download all attachments as: .zip

Change History (1)

by b1tw153, 2 days ago

Attachment: JOSM Error 2024-06-28.png added

Error message when merge fails because a shared node in the target layer has been modified

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to b1tw153.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.