Skip to content

Commit

Permalink
Merge pull request #407 from wearepal/Equal-earth-datasets
Browse files Browse the repository at this point in the history
Attributions for Equal-Earth dataset in component tooltip
  • Loading branch information
paulthatjazz authored Aug 7, 2024
2 parents 400cc48 + 2d0450e commit 9731804
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ interface DigitalModel {
id: number
name: string
source: string
toolTip?: string
toolTipURL?: string
}

//TODO: hardcoded scale factors, find an effective way of retrieving them from the geoserver?
Expand All @@ -38,12 +40,16 @@ const ModelList: Array<DigitalModel> = [
{
id: 3,
name: 'Canopy Height (Sentinel-2, Equal-Earth)',
source: 'eth:ch'
source: 'eth:ch',
toolTip: '(Height) Global canopy top height map for the year 2020, visualized in Equal-Earth projection. The underlying data product, estimated from Sentinel-2 imagery, has 10 m ground sampling distance.',
toolTipURL: 'https://langnico.github.io/globalcanopyheight/'
},
{
id: 4,
name: 'SD (Sentinel-2, Equal-Earth)',
source: 'eth:sd'
source: 'eth:sd',
toolTip: '(Standard Deviation) Global canopy top height map for the year 2020, visualized in Equal-Earth projection. The underlying data product, estimated from Sentinel-2 imagery, has 10 m ground sampling distance.',
toolTipURL: 'https://langnico.github.io/globalcanopyheight/'
}
]

Expand All @@ -68,15 +74,20 @@ export class DigitalModelComponent extends BaseComponent {

async builder(node: Node) {

node.meta.toolTip = "Component is still in testing phase! This component uses LIDAR data (Digital Surface and Terrian Models) to generate a numeric dataset. Coverage is limited, areas with missing data will be set to 0."
const dft = 'Digital models are generated via LIDAR or satellite data. They can be used to calculate canopy height, feature height, and more.'

node.meta.toolTip = ModelList.find(a => a.id == node.data.sourceId)?.toolTip || dft
node.meta.toolTipLink = ModelList.find(a => a.id == node.data.sourceId)?.toolTipURL || ''

node.addControl(
new SelectControl(
this.editor,
'sourceId',
() => ModelList,
() => [],
() => {
node.meta.toolTip = ModelList.find(a => a.id == node.data.sourceId)?.toolTip || dft
node.meta.toolTipLink = ModelList.find(a => a.id == node.data.sourceId)?.toolTipURL || ''
},
'Model'
)
)
Expand Down

0 comments on commit 9731804

Please sign in to comment.