TemporalTileProvider

Inherits TileProvider

Members

Name

Documentation

Type

Description

Optional

Mode

The mode that his temporal tile provider operates in. In the Prototyped mode, a given start and end time, temporal resolution, and perscriptive time format is used to generate the information used by GDAL to access the data. In the folder method, a folder and a time format is provided and each file in the folder is scanned using the time format instead

String

In list { Prototyped, Folder }

No

Colormap

If provided, the tile provider will use this color map to convert a greyscale image to color

String

Value of type ‘String’

Yes

FixedTime

If the ‘UseFixedTime’ is enabled, this time will be used instead of the actual time taken from OpenSpace for the displayed tiles.

String

Value of type ‘String’

Yes

Folder

Table

Table parameters

Yes

Interpolation

Determines whether this tile provider should interpolate between two adjacent layers

Boolean

Value of type ‘Boolean’

Yes

Prototyped

Table

Table parameters

Yes

UseFixedTime

If this value is enabled, the time-varying timevarying dataset will always use the time that is specified in the ‘FixedTime’ property, rather than using the actual time from OpenSpace.

Boolean

Value of type ‘Boolean’

Yes

Table parameters for Folder
  • Optional: Yes

Name

Documentation

Type

Description

Optional

Folder

The folder that is parsed for files. Every file in the provided directory is checked against the provided format and added if it adheres to said format

Directory

Value of type ‘Directory’

No

Format

The format of files that is pared in the provided folder. The format string has to be compatible to the C++ function get_time. https://en.cppreference.com/w/cpp/io/manip/get_time

String

Value of type ‘String’

No

Table parameters for Prototyped
  • Optional: Yes

Name

Documentation

Type

Description

Optional

Prototype

The text that will be used as the prototype to generate the data to load the image layer. Any occurance of ${OpenSpaceTimeId} in this prototype is replaced with the current date according to the remaining information such as the resolution and the format and the resulting text is used to load the corresponding images

String

Value of type ‘String’

No

TemporalResolution

The temporal resolution between each image

String

Value of type ‘String’

No

Time

The starting and ending times for the range of values

Table

Table parameters

No

TimeFormat

The specification of the date format that is used in the tile provider. The time format must be specified in a manner appropriate for the SPICE function timout_c. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html

String

Value of type ‘String’

No

Table parameters for Time

The starting and ending times for the range of values

  • Optional: No

Name

Documentation

Type

Description

Optional

End

The (inclusive) ending time of the temporal image range

String

Value of type ‘String’

No

Start

The (inclusive) starting time of the temporal image range

String

Value of type ‘String’

No

Asset Examples

 1local globe = asset.require("scene/solarsystem/planets/earth/earth")
 2
 3
 4
 5local path = asset.resource({
 6  Name = "Earth Textures Climate",
 7  Type = "HttpSynchronization",
 8  Identifier = "earth_textures_climate",
 9  Version = 1
10})
11
12
13local LayerPrototype = {
14  Identifier = "ERA5_Land_HighRes_Monthly_2M_Temperature_Temporal_prototype",
15  Name = "ERA5 Land HighRes Monthly 2M Temperature (Temporal) [Prototype]",
16  Type = "TemporalTileProvider",
17  Mode = "Prototyped",
18  Prototyped = {
19    Time = {
20      Start = "1981-01-01",
21      End = "1990-10-01"
22    },
23    TemporalResolution = "1M",
24    TimeFormat = "YYYY-MM-DD",
25    Prototype = path .. "${OpenSpaceTimeId}-land.png"
26  },
27  Interpolation = true,
28  Colormap = path .. "rainbow.png",
29  Description = "Temporal coverage: 01 Jan 1981 - 31 Dec 2020"
30}
31
32local LayerFolder = {
33  Identifier = "ERA5_Land_HighRes_Monthly_2M_Temperature_Temporal_folder",
34  Name = "ERA5 Land HighRes Monthly 2M Temperature (Temporal) [Folder]",
35  Type = "TemporalTileProvider",
36  Mode = "Folder",
37  Folder = {
38    Folder = path,
39    Format = "%Y-%m-%d-land.png"
40  },
41  Interpolation = true,
42  Colormap = path .. "rainbow.png",
43  Description = "Temporal coverage: 01 Jan 1981 - 31 Dec 2020"
44}
45
46
47asset.onInitialize(function()
48  openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", LayerPrototype)
49  openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", LayerFolder)
50end)
51
52asset.onDeinitialize(function()
53  openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", LayerFolder)
54  openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", LayerPrototype)
55end)
56
57asset.export("Prototype", LayerPrototype)
58asset.export("Folder", LayerFolder)
59
60
61
62asset.meta = {
63  Name = "Climate Earth Layers",
64  Description = "ERA5 data",
65  Author = "OpenSpace Team",
66  URL = "http://openspaceproject.com",
67  License = "MIT license"
68}