Modify

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#9667 closed enhancement (fixed)

[Patch] Verify interpolation range/values (via MapCSS?)

Reported by: naoliv Owned by: team
Priority: normal Milestone: 14.03
Component: Core validator Version:
Keywords: mapcss Cc:

Description

Could JOSM verify the range/values of address housenumber interpolations?
Using the attached example, it's clear to see that 300 is way out of the range.
Maybe verify if the values in the range are sorted? (and if not give a warning)

Attachments (2)

interpolation.osm (1.3 KB) - added by naoliv 5 years ago.
9667.patch (7.5 KB) - added by simon04 5 years ago.

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by naoliv

Attachment: interpolation.osm added

comment:1 Changed 5 years ago by naoliv

Could also test for the node values. If the interpolation is even, the numbers should be even (it doesn't make sense to have an odd number in an even range, for example).

comment:2 Changed 5 years ago by Don-vip

Milestone: 14.02

comment:3 Changed 5 years ago by simon04

Keywords: mapcss added
Summary: Verify interpolation range/values[Patch] Verify interpolation range/values (via MapCSS?)

The attached patch adds a child selector node_{i} + node_{i+1} in a way, similar to the + of CSS. Then

*[tag("addr:housenumber") > child_tag("addr:housenumber")][regexp_test("even|odd", parent_tag("addr:interpolation"))] + *[addr:housenumber]

matches nodes with a decrease of addr:housenumber within addr:interpolation=even/odd. Short and simple, isn't it? ;-)

Last edited 5 years ago by simon04 (previous) (diff)

Changed 5 years ago by simon04

Attachment: 9667.patch added

comment:4 Changed 5 years ago by naoliv

And what about addr:interpolation=all and addr:interpolation=alphabetic? Will it be possible to warn about a addr:interpolation=all with nodes having the values 1 2 4 3 5, for example? (note that we have a wrong sequency of numbers in 3 and 4)

comment:5 Changed 5 years ago by simon04

Letters in house numbers do not work with this method. addr:interpolation=all has just to be enabled. I do not fully grasp the example 1 2 4 3 5 – how does that conceptually differ from attachment:interpolation.osm?

comment:6 Changed 5 years ago by naoliv

1 2 4 3 5 is just an example of an all interpolation with numbers in wrong order, but nothing different from before.
My doubt was that I saw an even|odd and thought if all could also be verified.

comment:7 Changed 5 years ago by Don-vip

Milestone: 14.0214.03

comment:8 Changed 5 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 6927/josm:

fix #9667 - Verify addresses interpolation range/values via MapCSS (patch by simon04)

comment:10 Changed 5 years ago by Don-vip

In 6949/josm:

see #9667 - fix unit test

comment:11 Changed 3 years ago by Klumbumbus

In 10084/josm:

fix #10232, see #9667 - remove wrong "Decreasing house numbers in addresses interpolation" warning; add "Even housenumber in odd address interpolation." warning and vice versa; add addr:interpolation info

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.