#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)
Change History (13)
by , 12 years ago
| Attachment: | interpolation.osm added |
|---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Milestone: | → 14.02 |
|---|
comment:3 by , 12 years ago
| 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? ;-)
by , 12 years ago
| Attachment: | 9667.patch added |
|---|
comment:4 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
| Milestone: | 14.02 → 14.03 |
|---|
comment:9 by , 12 years ago
Mmm I didn't notice this commit makes a test fail:
http://donvip.fr/jenkins/job/JOSM/780/testReport/junit/org.openstreetmap.josm.data.validation.tests/MapCSSTagCheckerTest/testInit/



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).