Modify

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

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

comment:1 by taylor.smock, 22 months ago

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

in reply to:  1 comment:2 by Klumbumbus, 22 months 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 taylor.smock, 22 months ago

Something like this will probably work (and we should probably add a mapcss check):

  • resources/data/defaultpresets.xml

     
    91079107            <space />
    91089108            <text key="addr:housenumber" text="House number" match="key" auto_increment="-2,-1,+1,+2" />
    91099109            <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"/>
    91109111            <optional>
    91119112                <text key="addr:city" text="City name" use_last_as_default="force" match="key" />
    91129113                <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.

Last edited 22 months ago by taylor.smock (previous) (diff)

comment:4 by taylor.smock, 22 months 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  
    91079107            <space />
    91089108            <text key="addr:housenumber" text="House number" match="key" auto_increment="-2,-1,+1,+2" />
    91099109            <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"/>
    91109111            <optional>
    91119112                <text key="addr:city" text="City name" use_last_as_default="force" match="key" />
    91129113                <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] {  
    4444  assertMatch: "way addr:housenumber=unknown";
    4545  assertMatch: "way addr:housenumber=Palace of Westminster";
    4646  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:5 by Klumbumbus, 22 months ago

Resolution: fixed
Status: newclosed

In 18460/josm:

fix #22076 - Add nohousenumber=yes checkbox, warn about combinations of nohousenumber=yes + addr:housenumber=* and noref=yes + ref=* (based on patch by taylor.smock)

comment:6 by Klumbumbus, 22 months ago

Milestone: 22.0622.05

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.