/
countrywide.json
148 lines (148 loc) · 5.33 KB
/
countrywide.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"coverage": {
"country": "cz",
"ISO 3166": {
"alpha2": "CZ",
"country": "Czech Republic"
}
},
"website": "http://vdp.cuzk.cz/vdp/ruian/vymennyformat/vyhledej?vf.pu=S&_vf.pu=on&_vf.pu=on&vf.cr=U&vf.up=OB&vf.ds=Z&vf.vu=Z&_vf.vu=on&_vf.vu=on&_vf.vu=on&_vf.vu=on&vf.uo=O&ob.kod=531723&search=Vyhledat",
"license": "§ 62 of Law 111/2009 Sb - http://www.zakonyprolidi.cz/cs/2009-111#p62",
"type": "http",
"compression": "zip",
"data": "https://www.dropbox.com/s/fhopgbg4vkyoobr/czech_addresses_wgs84_12092016_MASTER.zip?dl=1",
"note": {
"address formats": "http://www.upu.int/fileadmin/documentsFiles/activities/addressingUnit/czeEn.pdf",
"description": "according to format, there are cities w/o streets, just house numbers",
"examples": {
"street+house+neighbourhood+postcode+city": [
"Jiřská 9/10, Hradčany, 11900 Praha 1",
"Jelení 91/7a, Hradčany, 11800 Praha 1",
"Hrad I. nádvoří 1, Hradčany, 11900 Praha 1",
"Malá Strana 57, 15000 Praha 1",
"Albertov č.ev. 7/3a, Nové Město, 12800 Praha 2"
],
"house+postcode+city": [
"č.p. 111, 27042 Skryje",
"č.ev. 57, 79862 Rozstání"
]
}
},
"conform": {
"lat": "POINT_Y",
"lon": "POINT_X",
"number": {
"function": "regexp",
"field": "alternativ",
"pattern": ".*?((?:č\\.?(?:p|ev)\\.?)?\\s*\\d+(?:\/\\d+[a-z]?)?)"
},
"street": {
"function": "regexp",
"field": "alternativ",
"pattern": "(.*?)(?:(?:č\\.?(?:p|ev)\\.?)?\\s*\\d+(?:\\d+[a-z]?)?)"
},
"city": {
"function": "regexp",
"field": "alternativ",
"pattern": "(?:.*),\\s+(?:\\d+\\s+)?(\\w.*)"
},
"postcode": {
"function": "regexp",
"field": "alternativ",
"pattern": "(?:.*),\\s+(\\d+)"
},
"file": "czech_addresses_wgs84_12092016_MASTER.csv",
"type": "csv",
"accuracy": 1
},
"test": {
"enabled": true,
"description": "these are the tests that exercise valid inputs for czech countrywide",
"acceptance-tests": [
{
"description": "address with /-delimited number",
"inputs": {
"alternativ": "Jiřská 9/10, Hradčany, 11900 Praha 1"
},
"expected": {
"number": "9/10",
"street": "Jiřská",
"city": "Praha 1",
"postcode": "11900"
}
},
{
"description": "address with /-delimited number with letter",
"inputs": {
"alternativ": "Jelení 91/7a, Hradčany, 11800 Praha 1"
},
"expected": {
"number": "91/7a",
"street": "Jelení",
"city": "Praha 1",
"postcode": "11800"
}
},
{
"description": "address with single digit number and neighbourhood",
"inputs": {
"alternativ": "Hrad I. nádvoří 1, Hradčany, 11900 Praha 1"
},
"expected": {
"number": "1",
"street": "Hrad I. nádvoří",
"city": "Praha 1",
"postcode": "11900"
}
},
{
"description": "address with single digit number",
"inputs": {
"alternativ": "Malá Strana 57, 15000 Praha 1"
},
"expected": {
"number": "57",
"street": "Malá Strana",
"city": "Praha 1",
"postcode": "15000"
}
},
{
"description": "address with special-case house-only identifier 'č.ev.'",
"inputs": {
"alternativ": "Albertov č.ev. 7/3a, Nové Město, 12800 Praha 2"
},
"expected": {
"number": "č.ev. 7/3a",
"street": "Albertov",
"city": "Praha 2",
"postcode": "12800"
}
},
{
"description": "street-less address with house-only identifier 'č.p.'",
"inputs": {
"alternativ": "č.p. 111, 27042 Skryje"
},
"expected": {
"number": "č.p. 111",
"street": "",
"city": "Skryje",
"postcode": "27042"
}
},
{
"description": "street-less address with house-only identifier 'č.ev.'",
"inputs": {
"alternativ": "č.ev. 57, 79862 Rozstání"
},
"expected": {
"number": "č.ev. 57",
"street": "",
"city": "Rozstání",
"postcode": "79862"
}
}
]
}
}