Skip to content

Commit 8261a7d

Browse files
authored
Add ISO 6709:2022 schemas to the collection (#90)
Signed-off-by: Juan Cruz Viotti <[email protected]>
1 parent c5e91fc commit 8261a7d

File tree

6 files changed

+249
-0
lines changed

6 files changed

+249
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 6709:2022 Altitude",
4+
"description": "An altitude or height in meters relative to the reference ellipsoid, with positive values above and negative values below",
5+
"examples": [ 0, 100, -50, 8848.86, -10994 ],
6+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
7+
"x-links": [ "https://www.iso.org/standard/75147.html" ],
8+
"type": "number"
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 6709:2022 Latitude",
4+
"description": "A latitude coordinate in decimal degrees, ranging from -90 (south pole) to +90 (north pole)",
5+
"examples": [ 0, 37.7749, -33.8688, 90, -90 ],
6+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
7+
"x-links": [ "https://www.iso.org/standard/75147.html" ],
8+
"$ref": "../../../bipm/si/2019/non-si/unit/degree.json",
9+
"maximum": 90,
10+
"minimum": -90
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "ISO 6709:2022 Longitude",
4+
"description": "A longitude coordinate in decimal degrees, ranging from -180 (west) to +180 (east)",
5+
"examples": [ 0, -122.419, 151.209, 180, -180 ],
6+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
7+
"x-links": [ "https://www.iso.org/standard/75147.html" ],
8+
"$ref": "../../../bipm/si/2019/non-si/unit/degree.json",
9+
"maximum": 180,
10+
"minimum": -180
11+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
3+
"target": "../../../../schemas/2020-12/iso/coordinate/2022/altitude.json",
4+
"tests": [
5+
{
6+
"description": "Valid - sea level",
7+
"data": 0,
8+
"valid": true
9+
},
10+
{
11+
"description": "Valid - Mount Everest summit",
12+
"data": 8848.86,
13+
"valid": true
14+
},
15+
{
16+
"description": "Valid - Mariana Trench",
17+
"data": -10994,
18+
"valid": true
19+
},
20+
{
21+
"description": "Valid - positive integer",
22+
"data": 100,
23+
"valid": true
24+
},
25+
{
26+
"description": "Valid - negative decimal",
27+
"data": -50.5,
28+
"valid": true
29+
},
30+
{
31+
"description": "Valid - very high altitude",
32+
"data": 100000,
33+
"valid": true
34+
},
35+
{
36+
"description": "Valid - very deep",
37+
"data": -100000,
38+
"valid": true
39+
},
40+
{
41+
"description": "Invalid type - string",
42+
"data": "100",
43+
"valid": false
44+
},
45+
{
46+
"description": "Invalid type - boolean",
47+
"data": true,
48+
"valid": false
49+
},
50+
{
51+
"description": "Invalid type - null",
52+
"data": null,
53+
"valid": false
54+
},
55+
{
56+
"description": "Invalid type - array",
57+
"data": [],
58+
"valid": false
59+
},
60+
{
61+
"description": "Invalid type - object",
62+
"data": {},
63+
"valid": false
64+
}
65+
]
66+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
3+
"target": "../../../../schemas/2020-12/iso/coordinate/2022/latitude.json",
4+
"tests": [
5+
{
6+
"description": "Valid - equator",
7+
"data": 0,
8+
"valid": true
9+
},
10+
{
11+
"description": "Valid - north pole",
12+
"data": 90,
13+
"valid": true
14+
},
15+
{
16+
"description": "Valid - south pole",
17+
"data": -90,
18+
"valid": true
19+
},
20+
{
21+
"description": "Valid - positive decimal",
22+
"data": 37.7749,
23+
"valid": true
24+
},
25+
{
26+
"description": "Valid - negative decimal",
27+
"data": -33.8688,
28+
"valid": true
29+
},
30+
{
31+
"description": "Invalid - above north pole",
32+
"data": 90.1,
33+
"valid": false
34+
},
35+
{
36+
"description": "Invalid - below south pole",
37+
"data": -90.1,
38+
"valid": false
39+
},
40+
{
41+
"description": "Invalid - way above range",
42+
"data": 180,
43+
"valid": false
44+
},
45+
{
46+
"description": "Invalid - way below range",
47+
"data": -180,
48+
"valid": false
49+
},
50+
{
51+
"description": "Invalid type - string",
52+
"data": "37.7749",
53+
"valid": false
54+
},
55+
{
56+
"description": "Invalid type - boolean",
57+
"data": true,
58+
"valid": false
59+
},
60+
{
61+
"description": "Invalid type - null",
62+
"data": null,
63+
"valid": false
64+
},
65+
{
66+
"description": "Invalid type - array",
67+
"data": [],
68+
"valid": false
69+
},
70+
{
71+
"description": "Invalid type - object",
72+
"data": {},
73+
"valid": false
74+
}
75+
]
76+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
3+
"target": "../../../../schemas/2020-12/iso/coordinate/2022/longitude.json",
4+
"tests": [
5+
{
6+
"description": "Valid - prime meridian",
7+
"data": 0,
8+
"valid": true
9+
},
10+
{
11+
"description": "Valid - antimeridian east",
12+
"data": 180,
13+
"valid": true
14+
},
15+
{
16+
"description": "Valid - antimeridian west",
17+
"data": -180,
18+
"valid": true
19+
},
20+
{
21+
"description": "Valid - positive decimal",
22+
"data": 151.209,
23+
"valid": true
24+
},
25+
{
26+
"description": "Valid - negative decimal",
27+
"data": -122.419,
28+
"valid": true
29+
},
30+
{
31+
"description": "Invalid - above east limit",
32+
"data": 180.1,
33+
"valid": false
34+
},
35+
{
36+
"description": "Invalid - below west limit",
37+
"data": -180.1,
38+
"valid": false
39+
},
40+
{
41+
"description": "Invalid - way above range",
42+
"data": 360,
43+
"valid": false
44+
},
45+
{
46+
"description": "Invalid - way below range",
47+
"data": -360,
48+
"valid": false
49+
},
50+
{
51+
"description": "Invalid type - string",
52+
"data": "-122.419",
53+
"valid": false
54+
},
55+
{
56+
"description": "Invalid type - boolean",
57+
"data": true,
58+
"valid": false
59+
},
60+
{
61+
"description": "Invalid type - null",
62+
"data": null,
63+
"valid": false
64+
},
65+
{
66+
"description": "Invalid type - array",
67+
"data": [],
68+
"valid": false
69+
},
70+
{
71+
"description": "Invalid type - object",
72+
"data": {},
73+
"valid": false
74+
}
75+
]
76+
}

0 commit comments

Comments
 (0)