Skip to content

Commit

Permalink
Fix contexts for GeoJSON, JSON-FG and JSON links.
Browse files Browse the repository at this point in the history
@nest GeoJSON properties. Improve context for "links".
  • Loading branch information
avillar committed Aug 29, 2023
1 parent 2430de2 commit 4924dc0
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 17 deletions.
1 change: 0 additions & 1 deletion registereditems/geo/common/data_types/geojson/bblock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}
],
"schema": "https://geojson.org/schema/Feature.json",
"ldContext": "https://geojson.org/geojson-ld/geojson-context.jsonld",
"maturity": "mature",
"scope": "geo",
"group": "Common"
Expand Down
31 changes: 31 additions & 0 deletions registereditems/geo/common/data_types/geojson/context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"@context": {
"@version": 1.1,
"geojson": "https://purl.org/geojson/vocab#",
"Feature": "geojson:Feature",
"FeatureCollection": "geojson:FeatureCollection",
"GeometryCollection": "geojson:GeometryCollection",
"LineString": "geojson:LineString",
"MultiLineString": "geojson:MultiLineString",
"MultiPoint": "geojson:MultiPoint",
"MultiPolygon": "geojson:MultiPolygon",
"Point": "geojson:Point",
"Polygon": "geojson:Polygon",
"bbox": {
"@container": "@list",
"@id": "geojson:bbox"
},
"coordinates": {
"@container": "@list",
"@id": "geojson:coordinates"
},
"features": {
"@container": "@set",
"@id": "geojson:features"
},
"geometry": "geojson:geometry",
"id": "@id",
"properties": "@nest",
"type": "@type"
}
}
3 changes: 2 additions & 1 deletion registereditems/geo/features/feature/context.jsonld
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"@context": {
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"links": "rdfs:seeAlso"
"links": "rdfs:seeAlso",
"properties": "@nest"
}
}
4 changes: 3 additions & 1 deletion registereditems/geo/json-fg/feature-lenient/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ allOf:
links:
type: array
items:
$ref: https://beta.schemas.opengis.net/json-fg/link.json
allOf:
- $ref: https://beta.schemas.opengis.net/json-fg/link.json
- $ref: bblocks://ogc.ogc-utils.json-link
time:
$ref: https://beta.schemas.opengis.net/json-fg/time.json
coordRefSys:
Expand Down
3 changes: 0 additions & 3 deletions registereditems/geo/json-fg/feature/bblock.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"register": "ogc-building-block-register",
"version": "0.1",
"dateOfLastChange": "2023-05-31",
"schema": [
"https://beta.schemas.opengis.net/json-fg/feature.json"
],
"sources": [
{
"title": "OGC Testbed-17: OGC Features and Geometries JSON Engineering Report",
Expand Down
41 changes: 35 additions & 6 deletions registereditems/geo/json-fg/feature/context.jsonld
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
{
"@context": [
"https://geojson.org/geojson-ld/geojson-context.jsonld",
{
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"links": "rdfs:seeAlso"
"@context": {
"@version": 1.1,
"geojson": "https://purl.org/geojson/vocab#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"Feature": "geojson:Feature",
"FeatureCollection": "geojson:FeatureCollection",
"GeometryCollection": "geojson:GeometryCollection",
"LineString": "geojson:LineString",
"MultiLineString": "geojson:MultiLineString",
"MultiPoint": "geojson:MultiPoint",
"MultiPolygon": "geojson:MultiPolygon",
"Point": "geojson:Point",
"Polygon": "geojson:Polygon",
"bbox": {
"@container": "@list",
"@id": "geojson:bbox"
},
"coordinates": {
"@container": "@list",
"@id": "geojson:coordinates"
},
"features": {
"@container": "@set",
"@id": "geojson:features"
},
"geometry": "geojson:geometry",
"id": "@id",
"properties": "@nest",
"type": "@type",
"links": {
"@id": "rdfs:seeAlso",
"@context": {

}
}
]
}
}
69 changes: 69 additions & 0 deletions registereditems/geo/json-fg/feature/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "a JSON-FG Feature",
"description": "This JSON Schema is part of JSON-FG version 0.1.1",
"type": "object",
"required": [
"type",
"time",
"place",
"geometry",
"properties"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Feature"
]
},
"id": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"featureType": {
"$ref": "https://beta.schemas.opengis.net/json-fg/featuretype.json"
},
"links": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "https://beta.schemas.opengis.net/json-fg/link.json"
},
{
"$ref": "bblocks://ogc.ogc-utils.json-link"
}
]
}
},
"time": {
"$ref": "https://beta.schemas.opengis.net/json-fg/time.json"
},
"coordRefSys": {
"$ref": "https://beta.schemas.opengis.net/json-fg/coordrefsys.json"
},
"place": {
"$ref": "https://beta.schemas.opengis.net/json-fg/place.json"
},
"geometry": {
"$ref": "https://beta.schemas.opengis.net/json-fg/geometry.json"
},
"properties": {
"oneOf": [
{
"type": "null"
},
{
"type": "object"
}
]
}
}
}
10 changes: 10 additions & 0 deletions registereditems/geo/json-fg/featureCollection-lenient/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ allOf:
maximum: 3
coordRefSys:
$ref: https://beta.schemas.opengis.net/json-fg/coordrefsys.json
links:
type: array
items:
allOf:
- $ref: https://beta.schemas.opengis.net/json-fg/link.json
- $ref: bblocks://ogc.ogc-utils.json-link
features:
type: array
items:
$ref: bblocks://ogc.geo.json-fg.feature
- $ref: bblocks://ogc.geo.features.featureCollection
36 changes: 36 additions & 0 deletions registereditems/geo/json-fg/featureCollection/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "a JSON-FG Feature Collection",
"description": "This JSON Schema is part of JSON-FG version 0.1.1",
"type": "object",
"required": ["type", "features"],
"properties": {
"type": {
"type": "string",
"enum": ["FeatureCollection"]
},
"featureType": {
"$ref": "https://beta.schemas.opengis.net/json-fg/featuretype.json"
},
"geometryDimension": {
"type": "integer",
"minimum": 0,
"maximum": 3
},
"coordRefSys": {
"$ref": "https://beta.schemas.opengis.net/json-fg/coordrefsys.json"
},
"links": {
"type": "array",
"items": {
"$ref": "https://beta.schemas.opengis.net/json-fg/link.json"
}
},
"features": {
"type": "array",
"items": {
"$ref": "bblock://ogc.geo.json-fg.feature"
}
}
}
}
6 changes: 3 additions & 3 deletions registereditems/geo/json-fg/link-role/context.jsonld
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"@context": {
"dct": "http://purl.org/dc/terms/",
"prof": "http://www.w3.org/ns/dx/prof/",
"role": {
"@id": "dct:role",
"@id": "prof:hasRole",
"@type": "@id"
},
"conformsTo": {
"@id": "dct:conformsTo",
"@type": "@id",
"@container": "@nest"
"@type": "@id"
}
}
}
16 changes: 14 additions & 2 deletions registereditems/ogc-utils/json-link/context.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"@context": {
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"href": "@id",
"title": "rdfs:label"
"oa": "http://www.w3.org/ns/oa#",
"dct": "http://purl.org/dc/terms/",
"href": "oa:hasTarget",
"title": "rdfs:label",
"rel": {
"@id": "http://www.iana.org/assignments/relation",
"@type": "@id",
"@context": {
"@base": "http://www.iana.org/assignments/relation/"
}
},
"hreflang": "dct:language",
"type": "dct:type",
"length": "dct:extent"
}
}

0 comments on commit 4924dc0

Please sign in to comment.