Modify ↓
#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?
- Have a natural=water area inside another natural=water
- Select nothing and run validator (should produce warning)
- Select the outer way and run validator (should produce warning)
- Select the inner way and run validator
What is the expected result?
- should also produce a warning, like with building inside building
What happens instead?
- 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)
Change History (7)
Changed 17 months ago by
Attachment: | 20489.patch added |
---|
comment:1 Changed 17 months ago by
Milestone: | → 21.03 |
---|---|
Owner: | changed from team to GerdP |
Status: | new → assigned |
Summary: | Water area inside water area doesn't work well → Test "Water area inside water area" doesn't work well |
comment:2 Changed 17 months ago by
comment:3 Changed 17 months ago by
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 17 months ago by
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:6 Changed 17 months ago by
Milestone: | 21.03 → 21.02 |
---|
Note: See
TracTickets for help on using
tickets.
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.