Skip to content

Commit 24d4405

Browse files
authored
Merge pull request #198 from markpbaggett/recipe-0139
Add GeoJSONFeature as a type for Recipe 0139.
2 parents e9bccdf + 8e1011d commit 24d4405

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

schema/iiif_3_0.json

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,31 @@
146146
},
147147
"required": ["id", "type"],
148148
"not": { "required": [ "items" ] }
149-
}
149+
},
150+
"geoJSONFeature": {
151+
"title": "GeoJSONFeature",
152+
"description": "A GeoJSON Feature object for geographic annotation bodies.",
153+
"type": "object",
154+
"properties": {
155+
"id": { "$ref": "#/types/id" },
156+
"type": {
157+
"type": "string",
158+
"pattern": "^Feature$"
159+
},
160+
"properties": {
161+
"type": "object"
162+
},
163+
"geometry": {
164+
"type": "object",
165+
"properties": {
166+
"type": { "type": "string" },
167+
"coordinates": { "type": "array" }
168+
},
169+
"required": ["type", "coordinates"]
170+
}
171+
},
172+
"required": ["type", "geometry"]
173+
}
150174
},
151175

152176
"$comment": "IIIF Classes",
@@ -280,7 +304,8 @@
280304
},
281305
{
282306
"$ref": "#/classes/choice"
283-
}
307+
},
308+
{ "$ref": "#/classes/geoJSONFeature" }
284309
]
285310
},
286311
"imgSvr": {
@@ -358,14 +383,14 @@
358383
"type": "object",
359384
"properties": {
360385
"id": { "$ref": "#/types/id" },
361-
"type": {
386+
"type": {
362387
"type": "string",
363388
"default": "FeatureCollection"
364389
},
365-
"features": {
390+
"features": {
366391
"type": "array",
367392
"items": {
368-
"type": "object"
393+
"$ref": "#/types/geoJSONFeature"
369394
}
370395
}
371396
},

0 commit comments

Comments
 (0)