-
Notifications
You must be signed in to change notification settings - Fork 3
/
Geometry.json
119 lines (119 loc) · 4.25 KB
/
Geometry.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://raw.githubusercontent.com/peterataylor/om-json/master/Geometry.json",
"title": "geometry",
"description": "One geometry object, as defined in GeoJSON",
"definitions": {
"position": {
"description": "A single position",
"type": "array",
"minItems": 2,
"items": { "type": "number" },
"additionalItems": false
},
"positionArray": {
"description": "An array of positions",
"type": "array",
"items": { "$ref": "#/definitions/position" }
},
"lineString": {
"description": "An array of two or more positions",
"allOf": [
{ "$ref": "#/definitions/positionArray" },
{ "minItems": 2 }
]
},
"linearRing": {
"description": "An array of four or more positions where the first equals the last",
"allOf": [
{ "$ref": "#/definitions/positionArray" },
{ "minItems": 4 }
]
},
"polygon": {
"description": "An array of linear rings",
"type": "array",
"items": { "$ref": "#/definitions/linearRing" }
},
"geometryObject": {
"oneOf": [
{
"title": "Point",
"type": "object",
"properties": {
"type": { "enum": [ "Point" ] },
"coordinates": { "$ref": "#/definitions/position" }
},
"required": [ "type", "coordinates" ]
},
{
"title": "MultiPoint",
"type": "object",
"properties": {
"type": { "enum": [ "MultiPoint" ] },
"coordinates": { "$ref": "#/definitions/positionArray" }
},
"required": [ "type", "coordinates" ]
},
{
"title": "LineString",
"type": "object",
"properties": {
"type": { "enum": [ "LineString" ] },
"coordinates": { "$ref": "#/definitions/lineString" }
},
"required": [ "type", "coordinates" ]
},
{
"title": "MultiLineString",
"type": "object",
"properties": {
"type": { "enum": [ "MultiLineString" ] },
"coordinates": {
"type": "array",
"items": { "$ref": "#/definitions/lineString" }
}
},
"required": [ "type", "coordinates" ]
},
{
"title": "Polygon",
"type": "object",
"properties": {
"type": { "enum": [ "Polygon" ] },
"coordinates": { "$ref": "#/definitions/polygon" }
},
"required": [ "type", "coordinates" ]
},
{
"title": "MultiPolygon",
"type": "object",
"properties": {
"type": { "enum": [ "MultiPolygon" ] },
"coordinates": {
"type": "array",
"items": { "$ref": "#/definitions/polygon" }
}
},
"required": [ "type", "coordinates" ]
},
{
"title": "GeometryCollection",
"type": "object",
"properties": {
"type": { "enum": [ "GeometryCollection" ] },
"geometries": {
"type": "array",
"items": { "$ref": "#/definitions/geometryObject" }
}
},
"required": [ "type", "geometries" ]
}
]
}
},
"properties": {
"geometry": { "$ref": "#/definitions/geometryObject"}
},
"required": [ "geometry" ]
}