[NIRVSS] Encode imagery metadata into image file names (#3759)

* [NIRVSS] Encode imagery metadata into image file names

* added image name metadata to example.imagery plugin.

Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Nikhil
2021-05-05 17:24:31 -07:00
committed by GitHub
parent 05f9202fe4
commit 0e80a5b8a0
3 changed files with 40 additions and 4 deletions

View File

@@ -50,11 +50,16 @@ define([
const IMAGE_DELAY = 20000;
function pointForTimestamp(timestamp, name) {
const url = IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length];
const urlItems = url.split('/');
const imageDownloadName = `example.imagery.${urlItems[urlItems.length - 1]}`;
return {
name: name,
name,
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
url: IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length]
url,
imageDownloadName
};
}
@@ -139,6 +144,14 @@ define([
hints: {
image: 1
}
},
{
name: 'Image Download Name',
key: 'imageDownloadName',
format: 'imageDownloadName',
hints: {
imageDownloadName: 1
}
}
]
};