/
city_of_rockville.json
89 lines (89 loc) · 2.72 KB
/
city_of_rockville.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
{
"coverage": {
"geometry": {
"type": "Point",
"coordinates": [
-77.181,
39.087
]
},
"US Census": {
"geoid": "2467675",
"name": "City of Rockville",
"state": "Maryland"
},
"country": "us",
"state": "md",
"city": "Rockville"
},
"data": "http://maps.rockvillemd.gov/arcgis/rest/services/Rockville_Addresses_WebMerc/MapServer/0",
"protocol": "ESRI",
"conform": {
"format": "geojson",
"number": {
"function": "regexp",
"field": "ADDRESS",
"pattern": "^\\s*(\\d+)"
},
"street": {
"function": "regexp",
"field": "ADDRESS",
"pattern": "^\\s*(?:\\d+(?:-\\w+)?)\\s+(.+?)(?:, SUITE \\d+)?$"
},
"unit": {
"function": "regexp",
"field": "ADDRESS",
"pattern": "\\s*\\d+-(\\w+)\\s"
}
},
"test": {
"enabled": true,
"description": "units are optionally appended to number with hyphen, though can be appended with comma and word 'SUITE' (latter is dropped due to inability to represent either in regexp pattern)",
"acceptance-tests": [
{
"description": "address without unit",
"inputs": {
"ADDRESS": "6 ORCHARD WAY N"
},
"expected": {
"number": "6",
"street": "ORCHARD WAY N",
"unit": ""
}
},
{
"description": "address with digits+hyphen+alpha house number",
"inputs": {
"ADDRESS": "10003-B FIELDS RD"
},
"expected": {
"number": "10003",
"street": "FIELDS RD",
"unit": "B"
}
},
{
"description": "address with digits+hyphen+digit house number",
"inputs": {
"ADDRESS": "16021-15 INDUSTRIAL DR"
},
"expected": {
"number": "16021",
"street": "INDUSTRIAL DR",
"unit": "15"
}
},
{
"description": "address with unit postfixed in 'SUITE'-format",
"inputs": {
"ADDRESS": "3202 TOWER OAKS BLVD, SUITE 180"
},
"expected": {
"number": "3202",
"street": "TOWER OAKS BLVD",
"unit": ""
}
}
]
}
}