Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions standard/schema/README.ADOC
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The various components of the CoverageJSON schema, which can be built into the CoverageJSON.json bundle and also tweaked to create the appropriate dialect of JSON Schema.
The original community-based CoverageJSON used dialect DRAFT-07. The current OGC version 1.0 uses 2019-09. V1.0.1 will probably use dialect 2020-12, as required by OpenAPI V3.1.
In the future, IETF will probably define a standardised JSON Schema.
7 changes: 7 additions & 0 deletions standard/schema/anyAxis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$id": "/schemas/anyAxis",
"description" : "Validates any axis",
"if" : { "required" : [ "values" ] },
"then": { "$ref": "/schemas/valuesAxis" },
"else": { "$ref": "/schemas/numericRegularlySpacedAxis" }
}
13 changes: 13 additions & 0 deletions standard/schema/coverage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$id" : "/schemas/coverage",
"$ref": "/schemas/coverageBase",
"required" : [ "parameters" ],
"properties":
{
"domain":
{
"if": { "type": "object" },
"then": { "required": [ "referencing" ] }
}
}
}
102 changes: 102 additions & 0 deletions standard/schema/coverageBase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"$id" : "/schemas/coverageBase",
"description" : "A Coverage, representing a mapping from a domain to sets of data values described by parameters.",
"type" : "object",
"properties" :
{
"type" : { "const" : "Coverage" },
"id": { "type": "string" },
"domainType" : { "type" : "string" },
"domain":
{
"allOf" :
[
{
"type": [ "string", "object" ]
},
{
"if": { "type": "object" },
"then": { "$ref" : "/schemas/domainBase" }
}
]
},
"parameters":
{
"type": "object",
"patternProperties" :
{
".+" : { "$ref": "/schemas/parameter" }
}
},
"parameterGroups":
{
"type": "array",
"items": { "$ref": "/schemas/parameterGroup" }
},
"ranges":
{
"type": "object",
"patternProperties" :
{
".+" :
{
"allOf" :
[
{
"type": [ "string", "object" ]
},
{
"if":
{
"type": "object"
},
"then":
{
"properties":
{
"type":
{
"enum":
[
"NdArray",
"TiledNdArray"
]
}
},
"required": ["type"]
}
},
{
"if":
{
"type": "object",
"properties" :
{
"type" : { "const" : "NdArray" }
}
},
"then":{ "$ref": "/schemas/ndArray" }
},
{
"if":
{
"type": "object",
"properties" :
{
"type" : { "const" : "TiledNdArray" }
}
},
"then":{ "$ref": "/schemas/tiledNdArray" }
}
]
}
}
},
"rangeAlternates":
{
"type": "object"
}
},
"required" : [ "type", "domain", "ranges" ]

}
88 changes: 88 additions & 0 deletions standard/schema/coverageCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"$id" : "/schemas/coverageCollection",
"description": "A collection of coverage objects",
"properties":
{
"type" : { "const" : "CoverageCollection" },
"domainType": { "type": "string" },
"parameters":
{
"type": "object",
"patternProperties" :
{
".+" : { "$ref": "/schemas/parameter" }
}
},
"parameterGroups":
{
"type": "array",
"items": { "$ref": "/schemas/parameterGroup" }
},
"referencing":
{
"type": "array",
"items": { "$ref": "/schemas/referenceSystemConnection" }
},
"coverages": {
"type": "array",
"items": { "$ref": "/schemas/coverageBase" }
}
},
"required" : [ "type", "coverages" ],
"allOf":
[
{
"$comment": "If no parameters are present at collection level then each coverage must have their own",
"if":
{
"not":
{
"required": [ "parameters" ]
}
},
"then":
{
"properties":
{
"coverages":
{
"items":
{
"required": [ "parameters" ]
}
}
}
}
},
{
"$comment": "If no \"referencing\" member is present at collection level then each coverage domain must have its own",
"if":
{
"not":
{
"required": [ "referencing" ]
}
},
"then":
{
"properties":
{
"coverages":
{
"items":
{
"properties":
{
"domain":
{
"if": { "type": "object" },
"then": { "required": [ "referencing" ] }
}
}
}
}
}
}
}
]
}
5 changes: 5 additions & 0 deletions standard/schema/domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$id" : "/schemas/domain",
"$ref": "/schemas/domainBase",
"required" : [ "referencing" ]
}
Loading
Loading