/
polk.json
82 lines (82 loc) · 2.66 KB
/
polk.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
{
"coverage": {
"US Census": {
"geoid": "37149",
"name": "Polk County",
"state": "North Carolina"
},
"country": "us",
"state": "nc",
"county": "Polk"
},
"data": "https://services1.arcgis.com/23uf7jKvz6SRPFWJ/ArcGIS/rest/services/TaxParcels/FeatureServer/0",
"protocol": "ESRI",
"conform": {
"format": "geojson",
"number": "PHYSICAL_LOCATION_STREET_NUMBER",
"street": {
"function": "regexp",
"field": "PHYSICAL_STREET_ADDRESS",
"pattern": "^\\d+\\s+(.+?)(?:,?\\s*#\\d+)?\\s*$"
},
"unit": {
"function": "regexp",
"field": "PHYSICAL_STREET_ADDRESS",
"pattern": "^\\d+\\s+(?:.+?)(?:,?\\s*#(\\d+))\\s*$"
}
},
"test": {
"enabled": true,
"description": "need to separate street and unit from input",
"acceptance-tests": [
{
"description": "address without unit",
"inputs": {
"PHYSICAL_LOCATION_STREET_NUMBER": "86",
"PHYSICAL_STREET_ADDRESS": "86 NORTH TRADE ST "
},
"expected": {
"number": "86",
"street": "NORTH TRADE ST",
"unit": ""
}
},
{
"description": "unit can be prefixed with ','",
"inputs": {
"PHYSICAL_LOCATION_STREET_NUMBER": "335",
"PHYSICAL_STREET_ADDRESS": "335 MELROSE AV, #104 "
},
"expected": {
"number": "335",
"street": "MELROSE AV",
"unit": "104"
}
},
{
"description": "unit can be a '#' followed by numbers",
"inputs": {
"PHYSICAL_LOCATION_STREET_NUMBER": "1152",
"PHYSICAL_STREET_ADDRESS": "1152 WHITE OAK LANE #19 "
},
"expected": {
"number": "1152",
"street": "WHITE OAK LANE",
"unit": "19"
}
},
{
"description": "embedded '#' that's not unit",
"inputs": {
"PHYSICAL_LOCATION_STREET_NUMBER": "8414",
"PHYSICAL_STREET_ADDRESS": "8414 NC #9 HWY "
},
"expected": {
"number": "8414",
"street": "NC #9 HWY",
"unit": ""
}
}
]
}
}