From eafd67b42f7da06d6471398f21c5addfc8f477bb Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Tue, 28 May 2024 10:16:56 +0200 Subject: [PATCH] Add JSON-FG time as bblock --- README.md | 8 ++-- .../geo/json-fg/feature/context.jsonld | 9 +++- .../geo/json-fg/feature/examples.yaml | 11 +++++ .../geo/json-fg/feature/schema.json | 2 +- registereditems/geo/json-fg/time/bblock.json | 18 ++++++++ .../geo/json-fg/time/context.jsonld | 18 ++++++++ .../geo/json-fg/time/examples.yaml | 45 +++++++++++++++++++ 7 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 registereditems/geo/json-fg/feature/examples.yaml create mode 100644 registereditems/geo/json-fg/time/bblock.json create mode 100644 registereditems/geo/json-fg/time/context.jsonld create mode 100644 registereditems/geo/json-fg/time/examples.yaml diff --git a/README.md b/README.md index 3f55b1e44..efb1abc92 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ All the output files will be generated under `build-local`. 1. Clone the repository: `git clone https://github.com/opengeospatial/bblocks.git --recurse-submodules` 2. Change into the repository folder: `cd bblocks` -4. Update submodules: `git submodule update --recursive --remote` -5. Build the Register: +3. Update submodules: `git submodule update --recursive --remote` +4. Build the Register: ```shell # Process building blocks docker run --pull=always --rm --workdir /workspace -v $(pwd):/workspace --user $UID \ @@ -28,8 +28,8 @@ All the output files will be generated under `build-local`. -v "$(pwd)/build-local/generateddocs/slate-build:/srv/slate/build" \ dockerogc/slate build ``` -6. Run a web server locally, on this folder. For instance: `npx http-server` -7. Access it on a browser: `http://127.0.0.1:8080`. +5. Run a web server locally, on this folder. For instance: `npx http-server` +6. Access it on a browser: `http://127.0.0.1:8080`. If you need to rebuild the Register, just run steps 2 and 3. diff --git a/registereditems/geo/json-fg/feature/context.jsonld b/registereditems/geo/json-fg/feature/context.jsonld index d903f17ac..a99fdab93 100644 --- a/registereditems/geo/json-fg/feature/context.jsonld +++ b/registereditems/geo/json-fg/feature/context.jsonld @@ -3,6 +3,8 @@ "@version": 1.1, "geojson": "https://purl.org/geojson/vocab#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "dct": "http://purl.org/dc/terms/", + "owlTime": "http://www.w3.org/2006/time#", "Feature": "geojson:Feature", "FeatureCollection": "geojson:FeatureCollection", "GeometryCollection": "geojson:GeometryCollection", @@ -29,6 +31,11 @@ "properties": "@nest", "type": "@type", "links": "rdfs:seeAlso", - "featureType": "@type" + "featureType": "@type", + "coordRefSys": "http://www.opengis.net/def/glossary/term/CoordinateReferenceSystemCRS", + "place": "dct:spatial", + "time": { + "@id": "dct:time" + } } } \ No newline at end of file diff --git a/registereditems/geo/json-fg/feature/examples.yaml b/registereditems/geo/json-fg/feature/examples.yaml new file mode 100644 index 000000000..36b28b95b --- /dev/null +++ b/registereditems/geo/json-fg/feature/examples.yaml @@ -0,0 +1,11 @@ +- title: Example feature for a building + snippets: + - language: json + ref: https://github.com/opengeospatial/ogc-feat-geo-json/raw/main/core/examples/building.json + base-uri: https://example.com/json-fg/ + +- title: Example feature for a fence + snippets: + - language: json + ref: https://github.com/opengeospatial/ogc-feat-geo-json/raw/main/core/examples/fence.json + base-uri: https://example.com/json-fg/ diff --git a/registereditems/geo/json-fg/feature/schema.json b/registereditems/geo/json-fg/feature/schema.json index a54f043a3..4951e5133 100644 --- a/registereditems/geo/json-fg/feature/schema.json +++ b/registereditems/geo/json-fg/feature/schema.json @@ -49,7 +49,7 @@ } }, "time": { - "$ref": "https://beta.schemas.opengis.net/json-fg/time.json" + "$ref": "bblocks://ogc.geo.json-fg.time" }, "coordRefSys": { "$ref": "https://beta.schemas.opengis.net/json-fg/coordrefsys.json" diff --git a/registereditems/geo/json-fg/time/bblock.json b/registereditems/geo/json-fg/time/bblock.json new file mode 100644 index 000000000..3d915d7e6 --- /dev/null +++ b/registereditems/geo/json-fg/time/bblock.json @@ -0,0 +1,18 @@ +{ + "name": "JSON-FG time member", + "status": "stable", + "dateTimeAddition": "2024-05-28T09:45:00+00:00", + "itemClass": "schema", + "register": "ogc-building-block-register", + "version": "0.2.2", + "dateOfLastChange": "2024-05-28", + "schema": "https://beta.schemas.opengis.net/json-fg/time.json", + "sources": [ + { + "title": "OGC Testbed-17: OGC Features and Geometries JSON Engineering Report", + "link": "http://docs.ogc.org/per/21-017r1.html" + } + ], + "scope": "geo", + "group": "JSON-FG" +} diff --git a/registereditems/geo/json-fg/time/context.jsonld b/registereditems/geo/json-fg/time/context.jsonld new file mode 100644 index 000000000..be0c036c0 --- /dev/null +++ b/registereditems/geo/json-fg/time/context.jsonld @@ -0,0 +1,18 @@ +{ + "@context": { + "time": "http://www.w3.org/2006/time#", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "timestamp": { + "@id": "time:hasTime", + "@type": "xsd:dateTime" + }, + "date": { + "@id": "time:hasTime", + "@type": "xsd:date" + }, + "interval": { + "@id": "time:hasTime", + "@container": "@list" + } + } +} \ No newline at end of file diff --git a/registereditems/geo/json-fg/time/examples.yaml b/registereditems/geo/json-fg/time/examples.yaml new file mode 100644 index 000000000..f893a98f6 --- /dev/null +++ b/registereditems/geo/json-fg/time/examples.yaml @@ -0,0 +1,45 @@ +- title: Sample date (May 13th, 2024) + snippets: + - language: json + code: | + { + "date": "2024-05-13" + } + +- title: 'Sample timestamp (May 13th, 2024, at 19:15:16 UTC)' + snippets: + - language: json + code: | + { + "timestamp": "2024-05-13T19:15:16Z" + } + +- title: 'Sample timestamp with milliseconds' + snippets: + - language: json + code: | + { + "timestamp": "2024-05-13T19:15:16.987Z" + } + +- title: "Interval between two dates" + snippets: + - language: json + code: | + { + "interval": [ + "2024-05-13", + "2024-05-16" + ] + } + +- title: "Open-ended interval (no end timestamp)" + snippets: + - language: json + code: | + { + "interval": [ + "2024-05-13T19:15:16Z", + ".." + ] + }