Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding unit field to USA #4235

Merged
merged 4 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions data/address-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
"dataAddressFormats": [
{
"format": [
["housenumber", "street"],
["housenumber", "street", "unit"],
["city", "postcode"]
]
},
{
"countryCodes": ["gb"],
"format": [
["housename"],
["housenumber", "street"],
["housenumber", "street", "unit"],
["city", "postcode"]
]
},
{
"countryCodes": ["ie"],
"format": [
["housename"],
["housenumber", "street"],
["housenumber", "street", "unit"],
["city"],
["postcode"]
]
Expand All @@ -31,46 +31,53 @@
"pt", "se", "si", "sk", "sm", "va"
],
"format": [
["street", "housenumber"],
["unit","street", "housenumber"],
["postcode", "city"]
]
},
{
"countryCodes": ["fr", "lu", "mo"],
"format": [
["housenumber", "street"],
["unit","housenumber", "street"],
["postcode", "city"]
]
},
{
"countryCodes": ["br"],
"format": [
["street"],
["street","unit"],
["housenumber", "suburb"],
["city", "postcode"]
]
},
{
"countryCodes": ["vn"],
"format": [
["housenumber", "street"],
["housenumber", "street","unit"],
Copy link
Collaborator

@1ec5 1ec5 Aug 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think we should include addr:unit in the Vietnam address format. There’s only one (mistaken) use of this tag in all of Vietnam, reflecting the fact that units aren’t numbered in that country. Floor numbers are sometimes given in addresses, but generally the smallest level of addressing is the building number.

Addresses can be quite granular even without addr:unit, because the addr:housenumber and addr:street tags are both hierarchical. For example, this is the address of building 8, alley 251, lane 48, Nguyễn Khang street:

Số 48/251/8 đường Nguyễn Khang
Xã Yên Hòa
Quận Cầu Giấy
Hà Nội

addr:housenumber=48/251/8
addr:street=Nguyễn Khang
addr:subdistrict=Yên Hòa
addr:district=Cầu Giấy
addr:city=Hà Nội

addr:housenumber can be even more complex, for example 7/14/12/3/23. On the other hand, some mappers prefer to put all the alley and lane numbers in addr:street so the map doesn’t look so cluttered, for example lane 19, Liễu Giai street.

More information about Vietnam’s address formats:

https://vi.wikipedia.org/wiki/Địa_chỉ
https://youbianku.com/files/upu/VNM.pdf
http://vforum.vn/diendan/showthread.php?91066-Thon-Xom-Ap-Xa-Phuong-Huyen-Quan-Tinh-Thanh-Pho-trong-tieng-Anh-la-gi-khi-viet-dia-chi-nha

/ref #2252

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks for the information, I removed it in #4242

["subdistrict"],
["district"],
["city"],
["province", "postcode"]
]
},
{
"countryCodes": ["au"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just combine this with "ca" (Canada), they're the same

"format": [
["housenumber", "street", "unit"],
["city", "province", "postcode"]
]
},
{
"countryCodes": ["us"],
"format": [
["housenumber", "street"],
["housenumber", "street", "unit"],
["city", "state", "postcode"]
]
},
{
"countryCodes": ["ca"],
"format": [
["housenumber", "street"],
["housenumber", "street","unit"],
["city", "province", "postcode"]
]
},
Expand All @@ -79,7 +86,7 @@
"format": [
["postcode", "city", "district"],
["place", "street"],
["housenumber", "floor"]
["housenumber", "floor","unit"]
]
},
{
Expand Down Expand Up @@ -107,22 +114,22 @@
"countryCodes": ["tr"],
"format": [
["neighbourhood"],
["street", "housenumber"],
["street", "housenumber", "unit"],
["postcode", "district", "city"]
]
},
{
"countryCodes": ["ua"],
"format": [
["housenumber", "postcode"],
["street"]
["street", "unit"]
]
},
{
"countryCodes": ["cn"],
"format": [
["postcode", "province"],
["city"],
["city", "unit"],
["district"],
["street", "housenumber"]
]
Expand Down
4 changes: 3 additions & 1 deletion data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ en:
# access=*
label: Access
address:
# 'addr:block_number=*, addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:county=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*'
# 'addr:block_number=*, addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:county=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*, addr:unit=*'
label: Address
placeholders:
block_number: Block Number
Expand Down Expand Up @@ -117,6 +117,7 @@ en:
subdistrict!vn: Ward/Commune/Townlet
suburb: Suburb
suburb!jp: Ward
unit: Unit
admin_level:
# admin_level=*
label: Admin Level
Expand Down Expand Up @@ -3556,6 +3557,7 @@ en:
natural/wetland:
# natural=wetland
name: Wetland
# 'terms: bog,marsh,reedbed,swamp,tidalflat'
terms: '<translate with synonyms or related terms for ''Wetland'', separated by commas>'
natural/wood:
# natural=wood
Expand Down
6 changes: 4 additions & 2 deletions data/presets/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
"addr:state",
"addr:street",
"addr:subdistrict",
"addr:suburb"
"addr:suburb",
"addr:unit"
],
"reference": {
"key": "addr"
Expand Down Expand Up @@ -138,7 +139,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions data/presets/fields/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"addr:state",
"addr:street",
"addr:subdistrict",
"addr:suburb"
"addr:suburb",
"addr:unit"
],
"reference": {"key": "addr"},
"icon": "address",
Expand Down Expand Up @@ -58,7 +59,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
}
}
8 changes: 7 additions & 1 deletion data/presets/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -9694,7 +9694,13 @@
"tags": {
"natural": "wetland"
},
"terms": [],
"terms": [
"bog",
"marsh",
"reedbed",
"swamp",
"tidalflat"
],
"name": "Wetland"
},
"natural/wood": {
Expand Down
5 changes: 3 additions & 2 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
},
"admin_level": {
Expand Down Expand Up @@ -4211,7 +4212,7 @@
},
"natural/wetland": {
"name": "Wetland",
"terms": ""
"terms": "bog,marsh,reedbed,swamp,tidalflat"
},
"natural/wood": {
"name": "Wood",
Expand Down