#22076 closed enhancement (fixed)
[RFC PATCH] Add `nohousenumber` to the address preset
Reported by: | ma-rt-in | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.05 |
Component: | Internal preset | Version: | latest |
Keywords: | Cc: |
Description
I request that the internal preset for address be expanded to include the following points:
noaddress=yes
nohousenumber=yes
Please also adapt the JOSM checker accordingly.
Here are the links to taginfo and the wiki
https://taginfo.openstreetmap.org/keys/?key=noaddress
https://wiki.openstreetmap.org/wiki/Key:noaddress
https://wiki.openstreetmap.org/wiki/Key:nohousenumber
https://taginfo.openstreetmap.org/keys/?key=nohousenumber
Attachments (0)
Change History (6)
follow-up: 2 comment:1 by , 3 years ago
comment:2 by , 3 years ago
Replying to taylor.smock:
Having looked at the UI for addresses, I'm not seeing a good place to add it.
We already use noref
and noname
on some major road presets simply with a checkbox below the ref
/name
text box e.g.: source:trunk/resources/data/defaultpresets.xml@18449:742-746#L738
I also don't think we currently have a way to specify that one preset element conflicts with another preset element (I could be wrong about this), so someone could check the box for
noaddress
/nohousenumber
, and then add address information (addr:housenumber
/addr:housename
).
This is handled then by the validator and if "Run data validator on user input" (taggingpreset.validator
) is set to true (default is false
though) then such an error is even already indicated in the preset window with the yellow warning icon.
(Btw. I just noticed that only the validator test for name=*
+ noname=yes
is present, but the one for ref=*
+ noref=yes
is missing.)
comment:3 by , 3 years ago
Something like this will probably work (and we should probably add a mapcss check):
-
resources/data/defaultpresets.xml
9107 9107 <space /> 9108 9108 <text key="addr:housenumber" text="House number" match="key" auto_increment="-2,-1,+1,+2" /> 9109 9109 <text key="addr:street" text="Street name" use_last_as_default="force" match="key" alternative_autocomplete_keys="name" /> 9110 <check key="nohousenumber" text="House has no address" disable_off="true"/> 9110 9111 <optional> 9111 9112 <text key="addr:city" text="City name" use_last_as_default="force" match="key" /> 9112 9113 <text key="addr:postcode" text="Post code" use_last_as_default="force" match="key" />
I think we can probably ignore noaddress
-- most of the usage came in a very short spike (probably an import) in January 2021.
EDIT: For reference, ~35k out of ~44k tags are in Centre County, Pennsylvania.
comment:4 by , 3 years ago
Milestone: | → 22.06 |
---|---|
Summary: | Detail extension in the address preset → [RFC PATCH] Add `nohousenumber` to the address preset |
-
resources/data/defaultpresets.xml
diff --git a/resources/data/defaultpresets.xml b/resources/data/defaultpresets.xml index 3f639962a2..e53133d270 100644
a b 9107 9107 <space /> 9108 9108 <text key="addr:housenumber" text="House number" match="key" auto_increment="-2,-1,+1,+2" /> 9109 9109 <text key="addr:street" text="Street name" use_last_as_default="force" match="key" alternative_autocomplete_keys="name" /> 9110 <check key="nohousenumber" text="House has no address" disable_off="true"/> 9110 9111 <optional> 9111 9112 <text key="addr:city" text="City name" use_last_as_default="force" match="key" /> 9112 9113 <text key="addr:postcode" text="Post code" use_last_as_default="force" match="key" /> -
resources/data/validator/addresses.mapcss
diff --git a/resources/data/validator/addresses.mapcss b/resources/data/validator/addresses.mapcss index 3337c36bce..f6286bf2c1 100644
a b way[addr:interpolation] >[index=-1] node[!addr:housenumber] { 44 44 assertMatch: "way addr:housenumber=unknown"; 45 45 assertMatch: "way addr:housenumber=Palace of Westminster"; 46 46 assertMatch: "way addr:housenumber=S/N"; 47 } 48 No newline at end of file 47 } 48 49 *[addr:housenumber][nohousenumber?] { 50 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 51 group: tr("suspicious tag combination"); 52 assertMatch: "way addr:housenumber=1 nohousenumber=yes"; 53 assertNoMatch: "way addr:housenumber=2"; 54 }
A better spot for the validator might be source:trunk/resources/data/validator/combinations.mapcss
comment:6 by , 3 years ago
Milestone: | 22.06 → 22.05 |
---|
I presume you want us to modify source:trunk/resources/data/defaultpresets.xml@18449:9105-9129#L9105 .
Having looked at the UI for addresses, I'm not seeing a good place to add it. I also don't think we currently have a way to specify that one preset element conflicts with another preset element (I could be wrong about this), so someone could check the box for
noaddress
/nohousenumber
, and then add address information (addr:housenumber
/addr:housename
).