Modify

Opened 3 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#20489 closed defect (fixed)

Test "Water area inside water area" doesn't work well

Reported by: GerdP Owned by: GerdP
Priority: normal Milestone: 21.02
Component: Core validator Version:
Keywords: template_report Cc: Klumbumbus, skyper

Description

What steps will reproduce the problem?

  1. Have a natural=water area inside another natural=water
  2. Select nothing and run validator (should produce warning)
  3. Select the outer way and run validator (should produce warning)
  4. Select the inner way and run validator

What is the expected result?

  1. should also produce a warning, like with building inside building

What happens instead?

  1. doesn't produce a warning

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

The bigger problem is when you draw a new polygon inside an existing one and press upload -> No warning.
If I got that right the problem is the usage of the operator in combination with the water_area class. If is replaced by everything works fine.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-12-28 22:03:23 +0100 (Mon, 28 Dec 2020)
Build-Date:2020-12-30 02:30:55
Revision:17428
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17428 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2004 (19041)
Memory Usage: 1036 MB / 3641 MB (830 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 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
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20210215_150952.jfr]
Dataset consistency test: No problems found

Plugins:
+ buildings_tools (35669)
+ o5m (35640)
+ pbf (35650)
+ poly (35640)
+ reltoolbox (35640)
+ reverter (35688)
+ undelete (35640)
+ utilsplugin2 (35691)

Validator rules:
+ c:\josm\core\resources\data\validator\geometry.mapcss

Attachments (1)

20489.patch (795 bytes) - added by GerdP 3 weeks ago.

Download all attachments as: .zip

Change History (7)

Changed 3 weeks ago by GerdP

Attachment: 20489.patch added

comment:1 Changed 3 weeks ago by GerdP

Milestone: 21.03
Owner: changed from team to GerdP
Status: newassigned
Summary: Water area inside water area doesn't work wellTest "Water area inside water area" doesn't work well

comment:2 Changed 3 weeks ago by GerdP

Forget the patch, with it the 4. step works fine but the 3. step doesn't work. Seems we cannot use the .water_area at all with this test.

comment:3 Changed 3 weeks ago by GerdP

Cc: Klumbumbus skyper added

So far the only thing that works is to list every combination:

/* Water area inside water area (spatial test) */
/* cannot use .water_area here, see #20489 */
area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]   area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/],
area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]   area:closed:areaStyle[landuse=reservoir],
area:closed:areaStyle[landuse=reservoir]                          area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/],
area:closed:areaStyle[landuse=reservoir]                          area:closed:areaStyle[landuse=reservoir] {
  throwWarning: tr("Water area inside water area");
}

A possible alternative would be a new operator that matches when either the left is in the right or the right is in the left.

comment:4 Changed 3 weeks ago by GerdP

This one is a bit better:

/* Water area inside water area (spatial test) */
area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]   area:closed:areaStyle.water_area,
area:closed:areaStyle[landuse=reservoir]                          area:closed:areaStyle.water_area,
area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/]   area:closed:areaStyle.water_area,
area:closed:areaStyle[landuse=reservoir]                          area:closed:areaStyle.water_area {
  throwWarning: tr("Water area inside water area");
}

comment:5 Changed 2 weeks ago by GerdP

Resolution: fixed
Status: assignedclosed

In 17503/josm:

fix #20489: Test "Water area inside water area" doesn't work well

  • we have to check both combinations (right inside left and left inside right) when using class ".water_area" because this only matches for the right

comment:6 Changed 2 weeks ago by GerdP

Milestone: 21.0321.02

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.