github.com/PDOK/gokoala@v0.50.6/internal/ogc/common/geospatial/templates/collection.go.json (about) 1 {{- /*gotype: github.com/PDOK/gokoala/internal/engine.TemplateData*/ -}} 2 { 3 "id" : "{{ .Params.ID }}", 4 {{ if and .Params.Metadata .Params.Metadata.Title }} 5 "title" : "{{ .Params.Metadata.Title }}", 6 {{ else }} 7 "title" : "{{ .Params.ID }}", 8 {{ end }} 9 {{ if and .Params.Metadata .Params.Metadata.Description }} 10 "description" : "{{ unmarkdown .Params.Metadata.Description }}", 11 {{ end }} 12 {{ if and .Config.OgcAPI.GeoVolumes .Config.OgcAPI.GeoVolumes.Collections }} 13 "collectionType" : "3d-container", 14 {{ end }} 15 {{ if and .Params.Metadata .Params.Metadata.Extent }} 16 "extent" : { 17 "spatial": { 18 "bbox": [ [ {{ .Params.Metadata.Extent.Bbox | join "," }} ] ], 19 {{- if .Params.Metadata.Extent.Srs -}} 20 "crs" : "http://www.opengis.net/def/crs/EPSG/0/{{ trimPrefix "EPSG:" .Params.Metadata.Extent.Srs }}" 21 {{- else -}} 22 "crs" : "http://www.opengis.net/def/crs/OGC/1.3/CRS84" 23 {{- end -}} 24 } 25 {{- if and .Params.Metadata .Params.Metadata.Extent.Interval -}} 26 ,"temporal": { 27 "interval": [ [ {{ .Params.Metadata.Extent.Interval | join ", " }} ] ], 28 "trs" : "http://www.opengis.net/def/uom/ISO-8601/0/Gregorian" 29 } 30 {{- end -}} 31 }, 32 {{ end }} 33 {{ if and .Config.OgcAPI.Features .Config.OgcAPI.Features.Collections }} 34 "crs" : [ 35 "http://www.opengis.net/def/crs/OGC/1.3/CRS84" 36 {{ range $index, $srs := .Config.OgcAPI.Features.ProjectionsForCollection .Params.ID }} 37 ,"http://www.opengis.net/def/crs/EPSG/0/{{ trimPrefix "EPSG:" $srs }}" 38 {{ end }} 39 ], 40 {{ if and .Params.Metadata .Params.Metadata.StorageCrs }} 41 "storageCrs" : "{{ .Params.Metadata.StorageCrs }}", 42 {{ else }} 43 "storageCrs" : "http://www.opengis.net/def/crs/OGC/1.3/CRS84", 44 {{ end }} 45 {{ end }} 46 "links" : [ 47 { 48 "rel" : "self", 49 "type" : "application/json", 50 "title" : "This document as JSON", 51 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}?f=json" 52 }, 53 { 54 "rel" : "alternate", 55 "type" : "text/html", 56 "title" : "This document as HTML", 57 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}?f=html" 58 } 59 {{ if and .Config.OgcAPI.GeoVolumes .Config.OgcAPI.GeoVolumes.Collections }} 60 {{ if and .Params.GeoVolumes .Params.GeoVolumes.Has3DTiles }} 61 , 62 { 63 "rel" : "items", 64 "type" : "application/json+3dtiles", 65 "title" : "Tileset definition of collection {{ .Params.ID }} according to the OGC 3D Tiles specification", 66 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/3dtiles?f=json" 67 } 68 {{ end }} 69 {{ if and .Params.GeoVolumes .Params.GeoVolumes.HasDTM }} 70 , 71 { 72 "rel" : "items", 73 "type" : "application/json", 74 "title" : "Digital Terrain Model '{{ .Params.ID }}' in Quantized Mesh format", 75 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/quantized-mesh?f=json" 76 } 77 {{ end }} 78 {{ end }} 79 {{ if and .Config.OgcAPI.Tiles .Config.OgcAPI.Tiles.Collections }} 80 , 81 { 82 "rel" : "items", 83 "type" : "application/json", 84 "title" : "The JSON representation of the {{ .Params.ID }} tiles served from this endpoint", 85 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/tiles?f=json" 86 }, 87 { 88 "rel" : "alternate", 89 "type" : "text/html", 90 "title" : "The HTML representation of the {{ .Params.ID }} tiles served from this endpoint", 91 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/tiles?f=html" 92 } 93 {{ end }} 94 {{ if and .Config.OgcAPI.Features .Config.OgcAPI.Features.Collections }} 95 , 96 { 97 "rel" : "items", 98 "type" : "application/geo+json", 99 "title" : "The JSON representation of the {{ .Params.ID }} features served from this endpoint", 100 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/items?f=json" 101 }, 102 { 103 "rel" : "items", 104 "type" : "application/vnd.ogc.fg+json", 105 "title" : "The JSON-FG representation of the {{ .Params.ID }} features served from this endpoint", 106 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/items?f=jsonfg" 107 }, 108 { 109 "rel" : "items", 110 "type" : "text/html", 111 "title" : "The HTML representation of the {{ .Params.ID }} features served from this endpoint", 112 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/items?f=html" 113 } 114 {{ end }} 115 ] 116 {{ if and .Config.OgcAPI.GeoVolumes .Config.OgcAPI.GeoVolumes.Collections }} 117 , 118 "content" : [ 119 {{ if and .Params.GeoVolumes .Params.GeoVolumes.Has3DTiles }} 120 { 121 "rel" : "original", 122 "type" : "application/json+3dtiles", 123 "title" : "Tileset definition of collection {{ .Params.ID }} according to the OGC 3D Tiles specification", 124 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/3dtiles?f=json", 125 "collectionType": "3d-container" 126 } 127 {{ else if and .Params.GeoVolumes .Params.GeoVolumes.HasDTM }} 128 { 129 "rel" : "original", 130 "type" : "application/json", 131 "title" : "Digital Terrain Model '{{ .Params.ID }}' in Quantized Mesh format", 132 "href" : "{{ .Config.BaseURL }}/collections/{{ .Params.ID }}/quantized-mesh?f=json", 133 "collectionType": "3d-container" 134 } 135 {{ end }} 136 ] 137 {{ end }} 138 }