generated from opengeospatial/bblock-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "Custom JSON-FG (lenient) Feature", | ||
"abstract": "This example shows a simple customisation method for a JSON-FG (lenient) feature", | ||
"status": "under-development", | ||
"dateTimeAddition": "2024-07-25T00:00:00Z", | ||
"itemClass": "schema", | ||
"register": "ogc-building-block-examples", | ||
"version": "1.0", | ||
"dateOfLastChange": "2023-05-19", | ||
"maturity": "development", | ||
"scope": "unstable", | ||
"tags": [ | ||
"feature", | ||
"examples" | ||
], | ||
"group": "Examples", | ||
"highlighted": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Custom Feature Type | ||
|
||
This building block illustrates a typical "Feature Type" - where an object is modelled as a "Feature with geometry", | ||
but has its own "native schema" - or "domain model". It uses JSON-FG (lenient) as its base. | ||
|
||
This is an **interoperable** approach to defining a Feature, allowing re-use of a well-defined domain model. | ||
|
||
i.e. the attributes (properties) are managed independently of the packaging container (Feature) | ||
|
||
the **propertySet** building block referenced by this container may be used independently of the FeatureModel structure, | ||
and is where semantic annotations are provided. | ||
|
||
This building block **inherits** reusable semantic annotations for the Feature structure from a common library, | ||
simplifying implementation. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- title: GeoJSON - specialisation example. | ||
comment: | ||
This examples shows how to define a customised schema based on an existing building block - in this case the OGC API Features basic GeoJSON Feature response | ||
|
||
base-uri: http://example.com/features/ | ||
snippets: | ||
- language: json | ||
ref: examples/feature.json |
20 changes: 20 additions & 0 deletions
20
_sources/feature/geojsonFeatureFGLenient/examples/feature.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"id": "f1", | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-111.67183507997295, | ||
40.056709946862874 | ||
], | ||
[ | ||
-111.71, | ||
40.156709946862874 | ||
] | ||
] | ||
}, | ||
"properties": { | ||
"myProp": "Mandatory property example" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"$schema": https://json-schema.org/draft/2020-12/schema | ||
description: 'Example of a sinmple GeoJSON Feature specialisation' | ||
allOf: | ||
- $ref: bblocks://ogc.geo.json-fg.feature-lenient | ||
- properties: | ||
properties: | ||
$ref: ../propertySet/schema.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.properties.myPropUpper = .properties.myProp | ascii_upcase |
20 changes: 20 additions & 0 deletions
20
_sources/feature/geojsonFeatureFGLenient/transforms/sample.shacl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@prefix mymodel: <http://example.org/myModel/> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#>. | ||
|
||
<urn:example:LabelToDCTERMS> | ||
a sh:NodeShape ; | ||
sh:targetSubjectsOf mymodel:myProp; | ||
sh:rule [ | ||
a sh:SPARQLRule ; | ||
sh:construct """ | ||
prefix dcterms: <http://purl.org/dc/terms/> | ||
prefix mymodel: <http://example.org/myModel/> | ||
CONSTRUCT { | ||
$this dcterms:identifier ?myPropUpper | ||
} WHERE { | ||
$this mymodel:myProp ?myProp | ||
BIND(UCASE(?myProp) as ?myPropUpper) | ||
} | ||
""" | ||
] ; | ||
. |