Skip to content

Commit

Permalink
Add JSON-FG time as bblock
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed May 28, 2024
1 parent a803acd commit eafd67b
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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.

Expand Down
9 changes: 8 additions & 1 deletion registereditems/geo/json-fg/feature/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
}
11 changes: 11 additions & 0 deletions registereditems/geo/json-fg/feature/examples.yaml
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion registereditems/geo/json-fg/feature/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 18 additions & 0 deletions registereditems/geo/json-fg/time/bblock.json
Original file line number Diff line number Diff line change
@@ -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"
}
18 changes: 18 additions & 0 deletions registereditems/geo/json-fg/time/context.jsonld
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
45 changes: 45 additions & 0 deletions registereditems/geo/json-fg/time/examples.yaml
Original file line number Diff line number Diff line change
@@ -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",
".."
]
}

0 comments on commit eafd67b

Please sign in to comment.