Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#23252 closed defect (fixed)

[patch] Ignore line_management=transition|termination in UnconnectedPower test

Reported by: gaben Owned by: team
Priority: minor Milestone: 23.11
Component: Core Version:
Keywords: template_report power line_management Cc: francois.lacombe

Description (last modified by gaben)

What steps will reproduce the problem?

  1. Load the test file
  2. Validate the data

What is the expected result?

No warning, as the end nodes are not meant to be directly connected

What happens instead?

Three warnings.

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

Key:line_management

  • src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

     
    201201
    202202        @Override
    203203        protected boolean ignoreUnconnectedEndNode(Node n) {
    204             return n.hasTag("power", "terminal") || n.hasTag("location:transition", "yes");
     204            return n.hasTag("power", "terminal") || n.hasTag("location:transition", "yes") || n.hasTag("line_management", "transition", "termination");
    205205        }
    206206    }
Revision:18882
Is-Local-Build:true
Build-Date:2023-10-29 20:41:39

Attachments (1)

power_endnode.osm (1.7 KB ) - added by gaben 2 years ago.

Download all attachments as: .zip

Change History (6)

by gaben, 2 years ago

Attachment: power_endnode.osm added

comment:1 by gaben, 2 years ago

Description: modified (diff)

add wiki link

comment:2 by francois.lacombe, 2 years ago

Hi

I couldn't agree more, it's a good point.

I don't see any possible addition by the way, it's ok.

comment:3 by gaben, 2 years ago

Keywords: line_management added

Thank you for the input!

comment:4 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18885/josm:

Fix #23252: Ignore line_management=transition|termination in UnconnectedPowerTest (patch by gaben, modified)

Modifications are as follows:

  • Lint fixes
  • Performance enhancements (profiling done with validator and an overpass download of Mesa County, Colorado)
    • Iterating over an array is much more efficient than using streams. For methods that may be frequently called, using Arrays.stream is currently not a good idea.
      • hasTagDifferent: 2.09 MB -> 0
      • hasTag: 125MB -> 0
      • hasKey: 879MB -> 0

comment:5 by taylor.smock, 2 years ago

Milestone: 23.1023.11

Ticket retargeted after milestone deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.