Skip to content

Commit

Permalink
Merge pull request #70 from PDOK/3d-links
Browse files Browse the repository at this point in the history
Fix content section of 3d GeoVolumes collection: should also include DTM
  • Loading branch information
rkettelerij authored Oct 26, 2023
2 parents cfe8314 + d6cf509 commit cc81f24
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
24 changes: 17 additions & 7 deletions ogc/common/geospatial/templates/collection.go.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,23 @@
{{ if and .Config.OgcAPI.GeoVolumes .Config.OgcAPI.GeoVolumes.Collections }}
,
"content" : [
{
"rel" : "original",
"type" : "application/json+3dtiles",
"title" : "Tileset definition of collection {{ .Params.ID }} according to the OGC 3D Tiles specification",
"href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/3dtiles?f=json",
"collectionType": "3d-container"
}
{{ if and .Params.GeoVolumes .Params.GeoVolumes.Has3DTiles }}
{
"rel" : "original",
"type" : "application/json+3dtiles",
"title" : "Tileset definition of collection {{ .Params.ID }} according to the OGC 3D Tiles specification",
"href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/3dtiles?f=json",
"collectionType": "3d-container"
}
{{ else if and .Params.GeoVolumes .Params.GeoVolumes.HasDTM }}
{
"rel" : "original",
"type" : "application/json",
"title" : "Digital Terrain Model '{{ .Params.ID }}' in Quantized Mesh format",
"href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/quantized-mesh?f=json",
"collectionType": "3d-container"
}
{{ end }}
]
{{ end }}
}
18 changes: 9 additions & 9 deletions ogc/common/geospatial/templates/collections.go.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"title" : "Digital Terrain Model '{{ $coll.ID }}' in Quantized Mesh format",
"href" : "{{ $baseUrl }}/collections/{{ $coll.ID }}/quantized-mesh?f=json"
}
{{ end }}
{{end}}
{{end}}
{{end}}
{{ if and $cfg.OgcAPI.Tiles $cfg.OgcAPI.Tiles.Collections }}
Expand Down Expand Up @@ -126,20 +126,20 @@
"content" : [
{{ if and $cfg.OgcAPI.GeoVolumes $cfg.OgcAPI.GeoVolumes.Collections }}
{{ if $cfg.OgcAPI.GeoVolumes.Collections.ContainsID $coll.ID }}
{{ if and $coll.GeoVolumes $coll.GeoVolumes.HasDTM }}
{{ if and $coll.GeoVolumes $coll.GeoVolumes.Has3DTiles }}
{
"rel" : "original",
"type" : "application/json",
"title" : "Digital Terrain Model '{{ $coll.ID }}' in Quantized Mesh format",
"href" : "{{ $baseUrl }}/collections/{{ $coll.ID }}?f=json",
"type" : "application/json+3dtiles",
"title" : "Tileset definition of collection {{ $coll.ID }} according to the OGC 3D Tiles specification",
"href" : "{{ $baseUrl }}/collections/{{ $coll.ID }}/3dtiles?f=json",
"collectionType": "3d-container"
}
{{else}}
{{ else if and $coll.GeoVolumes $coll.GeoVolumes.HasDTM }}
{
"rel" : "original",
"type" : "application/json+3dtiles",
"title" : "Tileset definition of collection {{ $coll.ID }} according to the OGC 3D Tiles specification",
"href" : "{{ $baseUrl }}/collections/{{ $coll.ID }}/3dtiles?f=json",
"type" : "application/json",
"title" : "Digital Terrain Model '{{ $coll.ID }}' in Quantized Mesh format",
"href" : "{{ $baseUrl }}/collections/{{ $coll.ID }}?f=json",
"collectionType": "3d-container"
}
{{end}}
Expand Down

0 comments on commit cc81f24

Please sign in to comment.