Commit e702c7e
authored
### Motivation
As an Imagery Data Maintainer, I want to ensure that imagery is
attributed to the correct licensor(s) for all published surveys so that
councils and government departments receive appropriate recognition.
---
### Attribution Types
|| Compact | Extended |
| - | - | - |
| Template | © `stac_license` `licensor_names` | © `stac_license`
`licensor_names` - `tileset_info` |
| Example | © CC BY 4.0 Otago Regional Council | © CC BY 4.0 Otago
Regional Council - Otago 0.3 Rural Aerial Photos (2017-2019) |
---
### Modifications
#### packages/config-loader
- Updated the package so that it copies through `providers` metadata
when generating config files.
#### packages/lambda-tiler
- Updated the attribution endpoint to include `providers` metadata as
part of collections when returning `AttributionStac` responses.
- Updated the style endpoint to include a _compact attribution_ on
sources when returning `StyleJson` responses.
#### packages/attribution
- Updated the attribution class to return an _extended attribution_ for
the bottom-right of the landing page.
### Verification
#### packages/lambda-tiler
1. Implemented a test suite for the style endpoint to ensure it
generates the correct _compact attribution_ for a given tileset.
#### packages/attribution
5. Implemented a test suite to verify that the new utility function
`createLicensorAttribution()` generates the correct _compact
attribution_ for a given list of providers.
---
### Example
Layer: Top of the South 0.15m Flood Aerial Photos (2022)
> To recreate this example, you will need to locally download the
`collection.json` file and at least one of the .TIFF files. You will
then need to run them through the `cogify` process and serve them using
the `server` package.
#### Landing Page
Screenshot showing the _extended attribution_ for the bottom-right of
the landing page.

#### Styles Endpoint
`/v1/styles/:styleName.json`
Excerpt from the JSON response showing the provider metadata:
```json
{
...
"collections": [
{
...
"providers": [
{
"name": "Nelson City Council",
"roles": [
"licensor"
]
},
{
"name": "Tasman District Council",
"roles": [
"licensor"
]
},
{
"name": "Waka Kotahi",
"roles": [
"licensor"
]
},
...
],
...
}
],
...
}
```
#### Attribution Endpoint
`/v1/tiles/:tileSet/:tileMatrix/attribution.json`
Excerpt from the JSON response showing the _compact attribution_ for the
layer source:
```json
{
...
"sources": {
"basemaps-top-of-the-south-flood-2022-0.15m": {
...
"attribution": "© CC BY 4.0 Nelson City Council, Tasman District Council, Waka Kotahi",
...
}
},
...
}
```
1 parent 4a684f2 commit e702c7e
File tree
10 files changed
+497
-31
lines changed- packages
- attribution/src
- __tests__
- config-loader/src/json
- config/src/config
- geo/src/stac
- lambda-tiler/src/routes
- __tests__
- landing/src
10 files changed
+497
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
185 | 231 | | |
186 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
187 | 235 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
194 | 242 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
198 | 246 | | |
199 | 247 | | |
200 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
49 | 77 | | |
50 | 78 | | |
51 | 79 | | |
| |||
140 | 168 | | |
141 | 169 | | |
142 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
143 | 176 | | |
144 | 177 | | |
145 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
27 | 49 | | |
28 | 50 | | |
29 | 51 | | |
| |||
0 commit comments