Skip to content

Commit

Permalink
spline with tangents support
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-metalinkage committed Nov 23, 2023
1 parent e03da7c commit 1d4bbaf
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
12 changes: 12 additions & 0 deletions _sources/features/topo-arc/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,17 @@
base-uri: http://www.example.com/features/
ref: examples/spline.json
# this is a "closure" of objects required to perform SHACL validation of logical constraints.
shacl-closure:
- ../topo-feature/examples/points.ttl

- title: Example GeoJSON feature using Cubic Spline topology with start and end tangents
content: |-
Cubic Spline with Tangents example.
snippets:
- language: json
base-uri: http://www.example.com/features/
ref: examples/spline_with_tangents.json
# this is a "closure" of objects required to perform SHACL validation of logical constraints.
shacl-closure:
- ../topo-feature/examples/points.ttl
27 changes: 27 additions & 0 deletions _sources/features/topo-arc/examples/spline_with_tangents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "1853004",
"type": "Feature",
"featureType": "my:SplineFeature",
"geometry": null,
"topology": {
"type": "CubicSpline",
"x-description": "References is an ordered list of features with point geometries, with tangent vectors defining entry and exit angles",
"startTangentVector": {
"references": [
"PVS",
"P1"
]
},
"endTangentVector": {
"references": [
"P2",
"PVE"
]
},
"references": [
"P1",
"P2"
]
},
"properties": null
}
16 changes: 13 additions & 3 deletions _sources/features/topo-arc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,19 @@
"references": {
"minItems": 3
}
},
"not": {
"required": [
"startTangentVector",
"endTangentVector"
]
}
},
{
"properties": {
"type": {
"type": "string",
"const": "CubicSplineWithTangents"
"const": "CubicSpline"
},
"references": {
"minItems": 2
Expand All @@ -92,14 +98,18 @@
}
}
},
"endTangentVector": {
"endTangentVector": {
"properties": {
"references": {
"minItems": 2
}
}
}
}
},
"required": [
"startTangentVector",
"endTangentVector"
]
}
]
}
Expand Down
8 changes: 8 additions & 0 deletions _sources/features/topo-feature/examples/points.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
geojson:geometry [ a geojson:Point ;
geojson:coordinates ( 13 15 ) ] .

<http://www.example.com/features/PVS> a geojson:Feature ;
geojson:geometry [ a geojson:Point ;
geojson:coordinates ( 9 10 ) ] .

<http://www.example.com/features/PVE> a geojson:Feature ;
geojson:geometry [ a geojson:Point ;
geojson:coordinates ( 20 21 ) ] .

[] geojson:features <http://www.example.com/features/P1>,
<http://www.example.com/features/P2> .

0 comments on commit 1d4bbaf

Please sign in to comment.