Opened 6 months ago

Last modified 5 months ago

#22872 new defect

Incorrect 'overlapping water ways' validation warning

Reported by: tmerc58 Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: validation overlapping waterway Cc:


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.

  1. Modify the pond. Move, add or delete a node, or reverse way direction, on either the outer or inner way; or, add a tag.
  2. Validate the layer - no warnings are indicated (as expected)
  3. Undo the last change (ctrl+z).
  4. 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)
Build-Date:2023-03-02 02:30:57

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

+ 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

Attachments (1)

BogusOverlaps.png (59.9 KB) - added by tmerc58 6 months ago.
Examples of bogus water area overlaps

Download all attachments as: .zip

Change History (3)

Changed 6 months ago by tmerc58

Attachment: BogusOverlaps.png added

Examples of bogus water area overlaps

comment:1 Changed 6 months ago by GerdP

See #22815 and #20054. I think this is the same scenario and it only happens with multipolygons because these involve multiple uses of the problematic java method area.intersect().

comment:2 Changed 5 months ago by SekeRob

Had several of these warnings editing complex bay. wetland, canal areas in Portugal. Put in an NB note in the CS commentary after fixing many inner/outer role issues, but this one was not going away. Satisfied though as the area renders proper in Carto standard and the OSM Inspector flags all went away. These edits were done with the stable release of either February or March i.e. is from before 18700 or 18678

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to tmerc58
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.