/
city_of_sundance.json
95 lines (95 loc) · 2.69 KB
/
city_of_sundance.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
{
"coverage": {
"geometry": {
"type": "Point",
"coordinates": [
-104.383,
44.405
]
},
"US Census": {
"geoid": "5674195",
"name": "City of Sundance",
"state": "Wyoming"
},
"country": "us",
"state": "wy",
"county": "Crook",
"city": "Sundance"
},
"data": "http://services2.arcgis.com/3vf4sgqBAWcEpmNB/ArcGIS/rest/services/SundanceBaseMap/FeatureServer/0",
"type": "ESRI",
"conform": {
"type": "geojson",
"number": {
"function": "prefixed_number",
"field": "ADDRESS"
},
"street": {
"function": "regexp",
"field": "ADDRESS",
"pattern": "^(?:[0-9]+ )(.*?)(?: (?:UNIT|SPACE|#) ?.*)?$",
"replace": "$1"
},
"unit": {
"function": "regexp",
"field": "ADDRESS",
"pattern": "^(?:[0-9]+ )(?:.*?)((?:UNIT|SPACE|#) ?.*)$"
}
},
"test": {
"enabled": true,
"description": "Ensure Valid Regex for City of Sundance",
"acceptance-tests": [{
"description": "address with no unit",
"inputs": {
"ADDRESS": "300 N GREEN RIVER AVE"
},
"expected": {
"number": "300",
"street": "N GREEN RIVER AVE",
"unit": ""
}
},{
"description": "address with UNIT",
"inputs": {
"ADDRESS": "34 BARLOW CANYON RD UNIT A"
},
"expected": {
"number": "34",
"street": "BARLOW CANYON RD",
"unit": "UNIT A"
}
},{
"description": "address with # Unit",
"inputs": {
"ADDRESS": "481 SAND CREEK RD #1"
},
"expected": {
"number": "481",
"street": "SAND CREEK RD",
"unit": "#1"
}
},{
"description": "address with space",
"inputs": {
"ADDRESS": "1657 STATE HIGHWAY 24 SPACE 1"
},
"expected": {
"number": "1657",
"street": "STATE HIGHWAY 24",
"unit": "SPACE 1"
}
},{
"description": "Ensure unit changes never grab the highway ref",
"inputs": {
"ADDRESS": "1657 STATE HIGHWAY 24"
},
"expected": {
"number": "1657",
"street": "STATE HIGHWAY 24",
"unit": ""
}
}]
}
}