Skip to content

Commit 8410c08

Browse files
authored
Merge pull request #21 from pkolmann/suburb-fix
Update address handling to use addr:suburb for ambiguous municipalities
2 parents 54c8d71 + e3269bd commit 8410c08

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/org/openstreetmap/josm/plugins/austriaaddresshelper/AustriaAddressHelperAction.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,15 @@ public static Map<String, String> loadAddress(OsmPrimitive selectedObject){
130130
final Map<String, String> newObject = new TreeMap<>();
131131

132132
newObject.put("addr:country", country);
133+
newObject.put("addr:city", municipality);
133134

134135
// Some municipalities have a specific combination of postcode and street multiple times in several
135136
// localities. For example, the street "Feldgasse" in the municipality of Großebersdorf with the
136137
// the postcode 2203 exists four times, namely in the localities Eibesbrunn, Großebersdorf,
137-
// Manhartsbrunn, and Putzing. If this is the case, we need to set the "addr:city" tag to the value of
138-
// the locality and not the municipality so that the address is unique. If there is one such case in a
139-
// municipality, all addresses in the municipality have the locality in the addr:city tag (such
140-
// municipalities get the attribute "municipality_has_ambiguous_addresses").
138+
// Manhartsbrunn, and Putzing. If this is the case, we need to add the "addr:suburb" tag to the value of
139+
// the locality.
141140
if (firstAddress.getBoolean("municipality_has_ambiguous_addresses")) {
142-
newObject.put("addr:city", locality);
143-
} else {
144-
newObject.put("addr:city", municipality);
141+
newObject.put("addr:suburb", locality);
145142
}
146143

147144
newObject.put("addr:postcode", postcode);

0 commit comments

Comments
 (0)