/
nye.json
70 lines (70 loc) · 1.99 KB
/
nye.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
{
"coverage": {
"US Census": {
"geoid": "32023",
"name": "Nye County",
"state": "Nevada"
},
"country": "us",
"state": "nv",
"county": "Nye"
},
"data": "https://services.arcgis.com/4YineAQdtmx0tv46/ArcGIS/rest/services/NyeNVFeatures/FeatureServer/5",
"type": "ESRI",
"conform": {
"type": "geojson",
"number": {
"function": "prefixed_number",
"field": "Address"
},
"street": {
"function": "regexp",
"field": "Address",
"pattern": "^\\d+\\s+(.+?)(?:\\s+(?:#|UNIT)\\b.+)?$"
},
"unit": {
"function": "regexp",
"field": "Address",
"pattern": "((?:#|UNIT).+)$"
}
},
"test": {
"enabled": true,
"description": "These are tests for extracting number, street, and unit",
"acceptance-tests": [
{
"description": "no unit",
"inputs": {
"Address": "1795 W AMARGOSA FARM RD"
},
"expected": {
"number": "1795",
"street": "W AMARGOSA FARM RD",
"unit": ""
}
},
{
"description": "has # unit",
"inputs": {
"Address": "1701 S PAHRUMP VALLEY BLVD #261 "
},
"expected": {
"number": "1701",
"street": "S PAHRUMP VALLEY BLVD",
"unit": "#261"
}
},
{
"description": "has UNIT unit",
"inputs": {
"Address": "2541 E AMBUSH ST UNIT C"
},
"expected": {
"number": "2541",
"street": "E AMBUSH ST",
"unit": "UNIT C"
}
}
]
}
}