Add new TileProvider to select tile providers based on the date and apply to VIIRS Joint Polar Satellite System (#3350)

This commit is contained in:
Alexander Bock
2024-07-18 11:18:57 +02:00
committed by GitHub
parent cabb8cb55b
commit 981a13a855
18 changed files with 477 additions and 126 deletions

View File

@@ -0,0 +1,33 @@
local Layer = {
Identifier = "Temporal_NOAA20_VIIRS",
Name = "Temporal NOAA20 VIIRS",
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2018-01-05",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_NOAA20_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
}
asset.export("Layer", Layer)
asset.meta = {
Name = "NOAA 20",
Description = [[A layer that sources its images from the NOAA-20 satellite that is part of the Joint Polar Satellite System.]],
Author = "OpenSpace Team",
URL = "http://www.openspaceproject.com",
License = "MIT License"
}

View File

@@ -0,0 +1,33 @@
local Layer = {
Identifier = "Temporal_NOAA21_VIIRS",
Name = "Temporal NOAA21 VIIRS",
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2024-04-19",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_NOAA21_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
}
asset.export("Layer", Layer)
asset.meta = {
Name = "NOAA 20",
Description = [[A layer that sources its images from the NOAA-21 satellite that is part of the Joint Polar Satellite System.]],
Author = "OpenSpace Team",
URL = "http://www.openspaceproject.com",
License = "MIT License"
}

View File

@@ -0,0 +1,33 @@
local Layer = {
Identifier = "Temporal_SNPP_VIIRS",
Name = "Temporal SNPP VIIRS",
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2015-11-24",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_SNPP_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
}
asset.export("Layer", Layer)
asset.meta = {
Name = "NOAA 20",
Description = [[A layer that sources its images from the Suomi NPP satellite that is part of the Joint Polar Satellite System.]],
Author = "OpenSpace Team",
URL = "http://www.openspaceproject.com",
License = "MIT License"
}

View File

@@ -1,4 +1,5 @@
local globe = asset.require("../../earth")
local noaa20 = asset.require("./definitions/noaa20")
@@ -11,26 +12,7 @@ local Layer = {
LevelTileProviders = {
{
MaxLevel = 4,
TileProvider = {
Identifier = "Temporal_VIIRS_NOAA20",
Name = "Temporal VIIRS NOAA20",
Type = "TemporalTileProvider",
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
}
TileProvider = noaa20.Layer
},
{
MaxLevel = 22,

View File

@@ -1,4 +1,5 @@
local globe = asset.require("../../earth")
local noaa21 = asset.require("./definitions/noaa21")
@@ -11,26 +12,7 @@ local Layer = {
LevelTileProviders = {
{
MaxLevel = 4,
TileProvider = {
Identifier = "Temporal_VIIRS_NOAA21",
Name = "Temporal VIIRS NOAA21",
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2024-04-19",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_NOAA21_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
}
TileProvider = noaa21.Layer
},
{
MaxLevel = 22,

View File

@@ -0,0 +1,52 @@
local globe = asset.require("../../earth")
local snpp = asset.require("./definitions/snpp")
local Layer = {
Identifier = "ESRI_VIIRS_Combo",
Name = "ESRI VIIRS Combo",
Enabled = asset.enabled,
ZIndex = 20,
Type = "TileProviderByLevel",
LevelTileProviders = {
{
MaxLevel = 4,
TileProvider = snpp.Layer
},
{
MaxLevel = 22,
TileProvider = {
Identifier = "ESRI_World_Imagery",
Name = "ESRI World Imagery",
FilePath = asset.resource("esri_world_imagery.wms"),
PadTiles = false
}
}
},
PadTiles = false,
Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World
Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]]
}
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)
asset.export("layer", Layer)
asset.meta = {
Name = "ESRI VIIRS Combo",
Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World
Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]],
Author = "OpenSpace Tem",
URL = "http://www.openspaceproject.com",
License = "MIT License"
}

View File

@@ -1,4 +1,7 @@
local globe = asset.require("../../earth")
local snpp = asset.require("./definitions/snpp")
local noaa20 = asset.require("./definitions/noaa20")
local noaa21 = asset.require("./definitions/noaa21")
@@ -12,24 +15,14 @@ local Layer = {
{
MaxLevel = 4,
TileProvider = {
Identifier = "Temporal_VIIRS_SNPP",
Name = "Temporal VIIRS SNPP",
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2015-11-24",
End = "2024-05-27"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_SNPP_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
PadTiles = false
Identifier = "VIIRS_Joint_Layer",
Name = "VIIRS Joint Layer",
Type = "TileProviderByDate",
Providers = {
["2015-11-24"] = snpp.Layer,
["2018-01-05"] = noaa20.Layer,
["2024-04-19"] = noaa21.Layer
}
}
},
{
@@ -43,8 +36,8 @@ local Layer = {
}
},
PadTiles = false,
Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World
Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]]
Description = [[Level based layer combining different VIIRS layers and ESRI World
Imagery. VIIRS is faded out at tile level 4]]
}

View File

@@ -1,42 +1,16 @@
local globe = asset.require("../../earth")
local noaa20 = asset.require("./definitions/noaa20")
local Layer = {
Identifier = "VIIRS_NOAA20_Temporal",
Name = "VIIRS NOAA20 (Temporal)",
Enabled = asset.enabled,
ZIndex = 30,
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2020-04-25",
End = "Yesterday"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_NOAA20_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
Description = [[Temporal coverage: 11 November 2015 - Present. The imagery resolution
is 0.25 km, and the temporal resolution is daily]]
}
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", noaa20.Layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", noaa20.Layer)
end)
asset.export("layer", Layer)
asset.meta = {

View File

@@ -0,0 +1,23 @@
local globe = asset.require("../../earth")
local noaa21 = asset.require("./definitions/noaa21")
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", noaa21.Layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", noaa21.Layer)
end)
asset.meta = {
Name = "VIIRS NOAA21 (Temporal)",
Description = "This layer has the best daily Earth Image",
Author = "NASA EOSDIS Global Imagery Browse Services",
URL =
"https://earthdata.nasa.gov/eosdis/science-system-description/eosdis-components/gibs",
License = "NASA"
}

View File

@@ -1,42 +1,16 @@
local globe = asset.require("../../earth")
local snpp = asset.require("./definitions/snpp")
local Layer = {
Identifier = "VIIRS_SNPP_Temporal",
Name = "VIIRS SNPP (Temporal)",
Enabled = asset.enabled,
ZIndex = 30,
Type = "TemporalTileProvider",
Mode = "Prototyped",
Prototyped = {
Time = {
Start = "2015-11-24",
End = "Today"
},
TemporalResolution = "1d",
TimeFormat = "YYYY-MM-DD",
Prototype = openspace.globebrowsing.createTemporalGibsGdalXml(
"VIIRS_SNPP_CorrectedReflectance_TrueColor",
"250m",
"jpg"
)
},
Description = [[Temporal coverage: 11 November 2015 - Present. The imagery resolution
is 0.25 km, and the temporal resolution is daily]]
}
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", snpp.Layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", snpp.Layer)
end)
asset.export("layer", Layer)
asset.meta = {