/
anderson.json
132 lines (132 loc) · 4.12 KB
/
anderson.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
{
"coverage": {
"US Census": {
"geoid": "45007",
"name": "Anderson County",
"state": "South Carolina"
},
"country": "us",
"state": "sc",
"county": "Anderson"
},
"data": "http://propertyviewer.andersoncountysc.org/arcgis/rest/services/Address_Viewer/MapServer/0",
"protocol": "ESRI",
"conform": {
"format": "geojson",
"number": {
"function": "regexp",
"field": "HOUSE_NUMB",
"pattern": "^(\\d+)"
},
"street": "RDNAME",
"unit": {
"function": "regexp",
"field": "HOUSE_NUMB",
"pattern": "^\\d+\\s+(.+)$"
},
"city": "PO_NAME",
"postcode": "ZIP"
},
"test": {
"enabled": true,
"description": "these are tests that extract optional unit from number",
"acceptance-tests": [
{
"description": "address without unit",
"inputs": {
"HOUSE_NUMB": "106",
"RDNAME": "J MAYNARD DR",
"PO_NAME": "WILLIAMSTON",
"ZIP": "29697"
},
"expected": {
"number": "106",
"street": "J MAYNARD DR",
"unit": "",
"city": "WILLIAMSTON",
"postcode": "29697"
}
},
{
"description": "non-digits house number",
"inputs": {
"HOUSE_NUMB": "UKN",
"RDNAME": "COX LAKE RD",
"PO_NAME": "BELTON",
"ZIP": "29627"
},
"expected": {
"number": "",
"street": "COX LAKE RD",
"unit": "",
"city": "BELTON",
"postcode": "29627"
}
},
{
"description": "address with alpha unit",
"inputs": {
"HOUSE_NUMB": "321 A",
"RDNAME": "CLUB RD",
"PO_NAME": "WILLIAMSTON",
"ZIP": "29697"
},
"expected": {
"number": "321",
"street": "CLUB RD",
"unit": "A",
"city": "WILLIAMSTON",
"postcode": "29697"
}
},
{
"description": "address with numeric unit",
"inputs": {
"HOUSE_NUMB": "126 5",
"RDNAME": "LODGE RD",
"PO_NAME": "PENDLETON",
"ZIP": "29670"
},
"expected": {
"number": "126",
"street": "LODGE RD",
"unit": "5",
"city": "PENDLETON",
"postcode": "29670"
}
},
{
"description": "address with numeric+alpha unit",
"inputs": {
"HOUSE_NUMB": "4023 35A",
"RDNAME": "WHITEHALL RD",
"PO_NAME": "ANDERSON",
"ZIP": "29626"
},
"expected": {
"number": "4023",
"street": "WHITEHALL RD",
"unit": "35A",
"city": "ANDERSON",
"postcode": "29626"
}
},
{
"description": "address with alpha+numeric unit",
"inputs": {
"HOUSE_NUMB": "4115 B9",
"RDNAME": "LIBERTY HWY",
"PO_NAME": "ANDERSON",
"ZIP": "29621"
},
"expected": {
"number": "4115",
"street": "LIBERTY HWY",
"unit": "B9",
"city": "ANDERSON",
"postcode": "29621"
}
}
]
}
}