﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22872	Incorrect 'overlapping water ways' validation warning	tmerc58	team	"==== What steps will reproduce the problem?
1. Create a new layer
2. Draw a polygon (you can draw triangles for all areas); tag as a pond
3. Draw an adjacent polygon, such that it shares at least one side with the pond. Tag as wetland.
4. Draw a third polygon inside the pond, with no shared node/side; tag as wetland.
5. Validate layer - you get a 'water area inside water area' warning (as expected)
6. Join the pond and inner wetland into a multi-polygon (select both, ctrl+b).
7. Validate the layer - you get an 'overlapping water areas' warning (not expected). 
    Note that the highlighted way on the shared side(s) may appear to have false nodes. See attached image for examples.  In these, the ponds have just three nodes and three segments.
8. Modify the pond. Move, add or delete a node, or reverse way direction, on either the outer or inner way; or, add a tag. 
9. Validate the layer - no warnings are indicated (as expected)
10. Undo the last change (ctrl+z).
11. Validate the layer - no warnings (as expected)

In step 8, changing the adjacent wetland un-shared geometry has no effect.
If you save the layer to a file at step 7, it is no different than the the file saved at step 9 (except for the edit).
If you delete the layer, then load the step 7 file, it will validate cleanly.

This bug has been present for at least two years. It is quirky; the above sequence will normally behave as described, but once in a while not - it may have something to do with shared node order. It is also aggravating, because although the circumstance occurs infrequently while actually editing, when it does it can involve large areas - you end up spending a lot of time chasing a ghost!

This may be related to ticket #9534.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-03-01 15:17:42 +0100 (Wed, 01 Mar 2023)
Revision:18678
Build-Date:2023-03-02 02:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18678 en) Linux Mint 19.1 Tessa
Memory Usage: 434 MB / 3000 MB (205 MB allocated, but free)
Java version: 11.0.16+8-post-Ubuntu-0ubuntu118.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1200 (scaling 1.00×1.00) :0.1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: X-Cinnamon
Java package: openjdk-11-jre:amd64-11.0.16+8-0ubuntu1~18.04
fonts-noto: fonts-noto:all-20171026-2
Dataset consistency test: No problems found

Plugins:
+ apache-commons (36034)
+ buildings_tools (36011)
+ centernode (v1.0.4)
+ ejml (35924)
+ geotools (36028)
+ jackson (36034)
+ jaxb (35952)
+ jts (36004)
+ measurement (35978)
+ opendata (36025)
+ utilsplugin2 (36011)

Tagging presets:
+ ${HOME}/dev/map/josm/Custom/MyPresets.xml

Map paint styles:
+ ${HOME}/dev/map/josm/Custom/hicontrast.mapcss
}}}
"	defect	new	normal		Core validator			validation overlapping waterway	
