/
rolette.json
104 lines (104 loc) · 3.14 KB
/
rolette.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
{
"coverage": {
"US Census": {
"geoid": "38079",
"name": "Rolette County",
"state": "North Dakota"
},
"country": "us",
"state": "nd",
"county": "Rolette"
},
"data": "https://services.arcgis.com/4YineAQdtmx0tv46/ArcGIS/rest/services/RoletteNDFeatures/FeatureServer/0",
"protocol": "ESRI",
"conform": {
"format": "geojson",
"number": {
"function": "regexp",
"field": "HOUSE",
"pattern": "^(\\d+)"
},
"street": {
"function": "regexp",
"field": "STREET",
"pattern": "^(.+?)(?:\\s+(?:#|\\*|UNIT|SUITE)\\s*.+)?$"
},
"unit": {
"function": "regexp",
"field": "STREET",
"pattern": "((?:\\*|#|UNIT|SUITE)\\b.+)$"
},
"city": "CITY"
},
"test": {
"enabled": true,
"description": "these are the tests that exercise extracting the street from a field that may contain units",
"acceptance-tests": [
{
"description": "address without unit",
"inputs": {
"HOUSE": "",
"STREET": "40TH AVE NE",
"UNIT": "",
"CITY": ""
},
"expected": {
"street": "40TH AVE NE"
}
},
{
"description": "address with UNIT unit",
"inputs": {
"HOUSE": "",
"STREET": "HWY 281 UNIT 972 (DUNSEITH)",
"UNIT": "",
"CITY": ""
},
"expected": {
"street": "HWY 281",
"unit": "UNIT 972 (DUNSEITH)"
}
},
{
"description": "address with # unit",
"inputs": {
"HOUSE": "",
"STREET": "BIA RD 25 #1225 (NORTH SITE)",
"UNIT": "",
"CITY": ""
},
"expected": {
"street": "BIA RD 25",
"unit": "#1225 (NORTH SITE)"
}
},
{
"description": "address with SUITE unit",
"inputs": {
"HOUSE": "",
"STREET": "HOSPITAL RD SUITE B",
"UNIT": "",
"CITY": ""
},
"expected": {
"street": "HOSPITAL RD",
"unit": "SUITE B"
}
},
{
"description": "address with unit designator in house number",
"inputs": {
"HOUSE": "163-D",
"STREET": "CUTHBERT GRANT WAY",
"UNIT": "",
"CITY": ""
},
"expected": {
"number": "163",
"street": "CUTHBERT GRANT WAY",
"unit": ""
}
}
]
}
}