Skip to content

Commit

Permalink
fix(lambda-tiler): expose the name of the imagery set in attribution (#…
Browse files Browse the repository at this point in the history
…2153)

* fix(lambda-tiler): expose the name of the imagery set in attribution

* refactor: use a better title

* test: fixup broken build/test
  • Loading branch information
blacha authored Apr 20, 2022
1 parent 066f39f commit 65d22cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/attribution/src/__tests__/attr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ o.spec('Attribution', () => {
],
},
properties: {
title: '',
datetime: null,
start_datetime: '2014-01-01T00:00:00Z',
end_datetime: '2015-01-01T00:00:00Z',
Expand Down
1 change: 1 addition & 0 deletions packages/geo/src/stac/stac.attribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type AttributionCollection = StacCollection<{
* A Single File STAC compliant feature for calculating attribution of an extent
*/
export type AttributionItem = StacItem<{
title: string;
datetime: null;
start_datetime: string;
end_datetime: string;
Expand Down
4 changes: 4 additions & 0 deletions packages/lambda-tiler/src/routes/__test__/attribution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const ExpectedJson = {
],
},
properties: {
title: 'Hastings-district urban 2011-13 0.1m',
datetime: null,
start_datetime: '2011-01-01T00:00:00Z',
end_datetime: '2014-01-01T00:00:00Z',
Expand Down Expand Up @@ -73,6 +74,7 @@ const ExpectedJson = {
],
},
properties: {
title: 'Hastings-district urban 2013-14 0.1m',
datetime: null,
start_datetime: '2013-01-01T00:00:00Z',
end_datetime: '2015-01-01T00:00:00Z',
Expand Down Expand Up @@ -101,6 +103,7 @@ const ExpectedJson = {
],
},
properties: {
title: 'Hastings-district urban 2015-17 0.1m',
datetime: null,
start_datetime: '2015-01-01T00:00:00Z',
end_datetime: '2018-01-01T00:00:00Z',
Expand Down Expand Up @@ -129,6 +132,7 @@ const ExpectedJson = {
],
},
properties: {
title: 'Hastings-district urban 2017-18 0.1m',
datetime: null,
start_datetime: '2017-01-01T00:00:00Z',
end_datetime: '2019-01-01T00:00:00Z',
Expand Down
1 change: 1 addition & 0 deletions packages/lambda-tiler/src/routes/attribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ async function tileSetAttribution(tileSet: TileSetRaster): Promise<AttributionSt
coordinates: createCoordinates(bbox, im.files, proj),
},
properties: {
title: titleizeImageryName(im.name),
datetime: null,
start_datetime: interval[0][0],
end_datetime: interval[0][1],
Expand Down

0 comments on commit 65d22cb

Please sign in to comment.