Add combo layer that shows the NOAA20 VIIRS layer (closes #2538)

This commit is contained in:
Alexander Bock
2023-03-08 16:30:02 +01:00
parent 15b4cd670f
commit 1c3f7d0cf2
2 changed files with 68 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
-- Color layers
asset.require("./layers/colorlayers/blue_marble", false)
asset.require("./layers/colorlayers/esri_viirs_combo", true)
asset.require("./layers/colorlayers/esri_noaa20_combo", false)
asset.require("./layers/colorlayers/esri_world_imagery", false)
asset.require("./layers/colorlayers/viirs_snpp_temporal", false)
asset.require("./layers/colorlayers/aqua_modis_temporal", false)

View File

@@ -0,0 +1,67 @@
local globeIdentifier = asset.require("../../earth").Earth.Identifier
local layer = {
Identifier = "ESRI_NOAA20_Combo",
Name = "ESRI NOAA20 Combo",
Enabled = asset.enabled,
Type = "ByLevelTileLayer",
LevelTileProviders = {
{
MaxLevel = 4,
TileProvider = {
Identifier = "Temporal_VIIRS_NOAA20",
Name = "Temporal VIIRS NOAA20",
Type = "TemporalTileLayer",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2020-04-25",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_NOAA20_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
}
},
{
MaxLevel = 22,
TileProvider = {
Identifier = "ESRI_World_Imagery",
Name = "ESRI World Imagery",
FilePath = asset.localResource("esri_world_imagery.wms"),
PadTiles = false
}
},
},
PadTiles = false,
Description = [[Level based layer combining "NOAA20 SNPP (Temporal)" and ESRI World
Imagery. "NOAA20 SNPP (Temporal)" is faded out at tile level 4]]
}
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)
asset.export("layer", layer)
asset.meta = {
Name = "ESRI NOAA20 VIIRS Combo",
Version = "1.0",
Description = [[Level based layer combining "NOAA20 SNPP (Temporal)" and ESRI World
Imagery. "NOAA20 SNPP (Temporal)" is faded out at tile level 4]],
Author = "OpenSpace Tem",
URL = "http://www.openspaceproject.com",
License = "MIT License"
}