Changeset 18921 in josm for trunk/resources/data/validator


Ignore:
Timestamp:
2023-12-20T19:04:18+01:00 (13 months ago)
Author:
taylor.smock
Message:

Fix #23308: Fix a false positive for "Water area inside water area" validation (patch by gaben, modified)

A coastline as an area follows the right-side rule like coastlines as a way.
This means that a water area inside the area, as defined for almost every other
area tag, may be valid, depending upon the directionality of the coastline way.

Modifications are as follows:

  • Look for water areas inside oceans (coastline is drawn in clockwise direction)
    • This is anticipated to be a rare occurrence since most coastlines are expected to be part of a large area.
  • Add non-regression test
  • Keep previous spacing for easier svn blame usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/geometry.mapcss

    r18914 r18921  
    199199
    200200/* Overlapping areas (spatial test) */
    201 area[natural =~ /^(water|wetland|coastline)$/], area[waterway=riverbank], area[landuse=reservoir] {
     201area[natural =~ /^(water|wetland)$/],
     202area[natural=coastline]:clockwise,
     203area[waterway=riverbank],
     204area[landuse=reservoir] {
    202205  set water_area;
    203206}
     
    211214
    212215/* Water area inside water area (spatial test) */
    213 area:closed[natural =~ /^(water|wetland|coastline)$/] ⊆  area:closed.water_area,
     216area:closed[natural =~ /^(water|wetland)$/]           ⊆  area:closed.water_area,
     217area:closed[natural=coastline]:clockwise              ⊆  area:closed.water_area,
    214218area:closed[waterway=riverbank]                       ⊆  area:closed.water_area,
    215219area:closed[landuse=reservoir]                        ⊆  area:closed.water_area,
    216 area:closed[natural =~ /^(water|wetland|coastline)$/] ⊇  area:closed.water_area,
     220area:closed[natural =~ /^(water|wetland)$/]           ⊇  area:closed.water_area,
     221area:closed[natural=coastline]:clockwise              ⊇  area:closed.water_area,
    217222area:closed[waterway=riverbank]                       ⊇  area:closed.water_area,
    218223area:closed[landuse=reservoir]                        ⊇  area:closed.water_area {
Note: See TracChangeset for help on using the changeset viewer.