Modify

Opened 2 years ago

Last modified 6 weeks ago

#13165 new defect

[Patch needs work] Validator did not warn about overlapping multipolygons

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: template_report, multipolygon Cc:

Description

What steps will reproduce the problem?

  1. Open attached file and validate.

What is the expected result?

6 warnings about "overlapping identical landuses.
6 other messages about overlapping areas.

What happens instead?

Only two messages of each kind for closed way overlapping closed way.
No warnings about closed way overlapping multipolygon or multipolygon overlapping multipolygon.

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

In general closed ways and multipolygons should always be handled the same way in tests.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-07-13 23:20:15 +0200 (Wed, 13 Jul 2016)
Build-Date:2016-07-14 01:31:48
Revision:10531
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10531 en) Linux Ubuntu 15.10
Memory Usage: 622 MB / 876 MB (207 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14, Oracle Corporation, OpenJDK Server VM
VM arguments: [-Djosm.restart=true, -Djosm.home=<josm.pref>, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
- ColumbusCSV (32359)
- FastDraw (32639)
- HouseNumberTaggingTool (32584)
- Mapillary (32639)
- OpeningHoursEditor (32583)
- RoadSigns (32584)
- apache-commons (32584)
- apache-http (32584)
- buildings_tools (32639)
- contourmerge (1014)
- imagery-xml-bounds (32489)
- imagery_offset_db (32528)
- pbf (32584)
- poly (32584)
- public_transport (32639)
- reltoolbox (32639)
- reverter (32584)
- terracer (32426)
- turnlanes (32584)
- turnrestrictions (32629)
- utilsplugin2 (32584)

Tagging presets:
- https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1
- https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Traffic_signs&zip=1

Last errors/warnings:
- W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways@41069fff, code=601, message=Crossing buildings]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways@41069fff, code=601, message=Crossing buildings]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=org.openstreetmap.josm.data.validation.tests.CrossingWays$Ways@41069fff, code=601, message=Crossing buildings]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[area:closed:areaStyle >LinkSelector{conditions=null} area:closed:areaStyle], declaration=Declaration [instructions=[throwOther: ArrayFunction~tr(class java.lang.String <Overlapping Areas>);], idx=11]]], code=3000, message=Overlapping Areas]. java.lang.UnsupportedOperationException

Attachments (5)

overlapping multipolygon.osm (4.2 KB) - added by mdk 2 years ago.
13165_alpha.patch (6.1 KB) - added by GerdP 2 years ago.
overlapping_multipolygon2.osm (23.3 KB) - added by GerdP 2 years ago.
13165_v0.patch (16.0 KB) - added by GerdP 2 years ago.
13165_v1.patch (14.7 KB) - added by GerdP 2 years ago.

Download all attachments as: .zip

Change History (24)

Changed 2 years ago by mdk

comment:1 Changed 2 years ago by GerdP

I'll have a look at this.

Changed 2 years ago by GerdP

Attachment: 13165_alpha.patch added

comment:2 Changed 2 years ago by GerdP

Hmm, this is quite complex. The attached patch is a solution for your examples, but it will not work with incomplete multipolygons, all members must be complete. I'll try to find a better solution....

Changed 2 years ago by GerdP

Changed 2 years ago by GerdP

Attachment: 13165_v0.patch added

comment:3 Changed 2 years ago by GerdP

Summary: Validator did not warn about overlapping multipolygons[Patch] Validator did not warn about overlapping multipolygons

OK, v0 still needs complete multipolygons, but I've fixed a few errors and added code to improve the "zoom to error" function. This is very useful when two complex ways or multipolygons overlap. I have no more time for coding from now to middle of October, so maybe someone else continues with this.

comment:4 Changed 2 years ago by Don-vip

Milestone: 16.09

comment:5 Changed 2 years ago by simon04

Milestone: 16.0916.10

comment:6 Changed 2 years ago by simon04

Milestone: 16.1016.11

Milestone renamed

Changed 2 years ago by GerdP

Attachment: 13165_v1.patch added

comment:7 Changed 2 years ago by GerdP

Patch v1 seems to find all problems, but I see a few problems:
1) It will produce duplicate errors if no element is selected or if both overlapping areas are selected.
2) The new code in Selector somehow repeats itself, esp. the two blocks for "check mp-way intersection" and "check way-mp intersection" are probably not both needed if one can make sure that one block is visited with exchanged parms. Looking at it later.
3) I'd prefer to hilite only the way segments which are part of the intersection, but for now the ways forming the rings are used.

comment:8 Changed 2 years ago by GerdP

I've noticed that the current implementation of the checks doesn't allow to find more than one intersection.
This is quite confusing when you select a way which intersects two (or more) other ways and start the validator. I would expect to get two (or more) warnings, one for each other way, but I'll get only one.
Is that intended?

comment:9 Changed 2 years ago by Don-vip

Milestone: 16.1116.12

Milestone renamed

comment:10 Changed 2 years ago by Don-vip

Milestone: 16.1217.01

comment:11 Changed 23 months ago by Don-vip

Milestone: 17.0117.02

comment:12 Changed 22 months ago by Don-vip

Milestone: 17.0217.03

comment:13 Changed 21 months ago by bastiK

Milestone: 17.0317.04

comment:14 Changed 20 months ago by Don-vip

Milestone: 17.0417.05

comment:15 Changed 20 months ago by bastiK

Summary: [Patch] Validator did not warn about overlapping multipolygons[Patch needs work] Validator did not warn about overlapping multipolygons

comment:16 Changed 19 months ago by Don-vip

Milestone: 17.05

comment:17 Changed 4 months ago by Don-vip

Keywords: multipolygon added

comment:18 Changed 6 weeks ago by StefanB

Is #16884 a duplicate of this ?
I uploaded a test case there.

comment:19 Changed 6 weeks ago by GerdP

Yes, it probably is. To be honest I don't understand the programming concept of visitors good enough, so my work on the patch came to a halt.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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 mdk
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.