#23308 closed defect (fixed)
[patch] False positive results for "Water area inside water area" validation
Reported by: | b1tw153 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 23.12 |
Component: | Core validator | Version: | |
Keywords: | template_report water coastline | Cc: |
Description
What steps will reproduce the problem?
- Create a new layer in JOSM
- Create a closed counter-clockwise way and tag it with natural=coastline. This is an island.
- Create a second closed way inside the island and tag it with natural=water. This is a lake on the island.
- Click the Validation button
What is the expected result?
No validation warnings.
What happens instead?
There is a "Water area inside water area" warning for the two newly created ways.
Note that if you split the natural=coastline into two separate ways and rerun the validation, the warning goes away. The problem only occurs when the natural=coastline element is a single closed way.
Please provide any additional information below. Attach a screenshot if possible.
Revision:18822 Build-Date:2023-08-30 11:52:18 Identification: JOSM/1.5 (18822 en) Mac OS X 14.1.1 OS Build number: macOS 14.1.1 (23B81) Memory Usage: 1360 MB / 8192 MB (445 MB allocated, but free) Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 188823026 2048×1152 (scaling 1.00×1.00) Maximum Screen Size: 2048×1152 Best cursor sizes: 16×16→16×16, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=18822, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=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, -Djpackage.app-path=/Applications/JOSM.app/Contents/MacOS/JOSM] Dataset consistency test: No problems found Plugins: + MicrosoftStreetside (36176) + apache-commons (36176) + apache-http (36176) + ejml (36176) + geotools (36176) + graphview (36178) + jackson (36176) + javafx (36178) + jaxb (36118) + jna (36176) + jts (36004) + log4j (36176) + mapwithai-dev (1.9.16-1-g89c7d89) + opendata (36186) + reverter (36126) + routing (36178) + turnlanes (36126) + utilsplugin2 (36178) + wikipedia (605) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1 + ${HOME}/Documents/JOSM/TIGER Cleanup.mapcss + ${HOME}/Documents/JOSM/Track Completeness.mapcss + ${HOME}/Documents/JOSM/GNIS Cleanup.mapcss Validator rules: + ${HOME}/Desktop/GNIS Fixup Validator.mapcss Last errors/warnings: - 00010.065 W: Failed to add ${HOME}/Desktop/GNIS Fixup Validator.mapcss to tag checker - 00010.066 W: java.nio.file.NoSuchFileException: ${HOME}/Desktop/GNIS Fixup Validator.mapcss - 00011.733 E: Failed to locate image 'MapWithAI' - 00040.048 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00040.154 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png' - 00445.207 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out - 00445.208 W: Already here java.net.SocketTimeoutException: Read timed out - 00445.309 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png'
Attachments (1)
Change History (8)
comment:1 by , 12 months ago
comment:2 by , 12 months ago
Component: | Core → Core validator |
---|
by , 12 months ago
Attachment: | Water in Water Warning.osm added |
---|
Sample data set to demonstrate false positive warning and the case where the warning is not generated.
comment:4 by , 11 months ago
Summary: | False positive results for "Water area inside water area" validation → [patch] False positive results for "Water area inside water area" validation |
---|
There were duplicate warnings for crossing ways by the CrossingWay test and MapCSS validation. If you open the test data, move the coastlines on each other and merge the second, split coastline, you can check the behaviour.
-
resources/data/validator/geometry.mapcss
198 198 } 199 199 200 200 /* Overlapping areas (spatial test) */ 201 area[natural =~ /^(water|wetland |coastline)$/], area[waterway=riverbank], area[landuse=reservoir] {201 area[natural =~ /^(water|wetland)$/], area[waterway=riverbank], area[landuse=reservoir] { 202 202 set water_area; 203 203 } 204 204 … … 210 210 } 211 211 212 212 /* Water area inside water area (spatial test) */ 213 area:closed[natural =~ /^(water|wetland |coastline)$/] ⊆ area:closed.water_area,214 area:closed[waterway=riverbank] 215 area:closed[landuse=reservoir] 216 area:closed[natural =~ /^(water|wetland |coastline)$/] ⊇ area:closed.water_area,217 area:closed[waterway=riverbank] 218 area:closed[landuse=reservoir] 213 area:closed[natural =~ /^(water|wetland)$/] ⊆ area:closed.water_area, 214 area:closed[waterway=riverbank] ⊆ area:closed.water_area, 215 area:closed[landuse=reservoir] ⊆ area:closed.water_area, 216 area:closed[natural =~ /^(water|wetland)$/] ⊇ area:closed.water_area, 217 area:closed[waterway=riverbank] ⊇ area:closed.water_area, 218 area:closed[landuse=reservoir] ⊇ area:closed.water_area { 219 219 throwWarning: tr("Water area inside water area"); 220 220 }
Or if you still want a dedicated Overlapping Water Areas
warning for coastlines, I can look for other approaches.
comment:5 by , 11 months ago
I'm not sure I understand all the implications of these changes.
But it does seem that identifying a closed natural=coastline
way as a water area was incorrect. The only closed ways with natural=coastline
are islands, and the sense of the way has the water on the outside not the inside. (Unless the direction of the way is reversed, but there's a separate test for that.) Otherwise, ways with natural=coastline
are unclosed, and so wouldn't trigger any of these tests.
comment:7 by , 11 months ago
Milestone: | → 23.12 |
---|
Could you please upload an example dataset which triggers the error?