local globe = asset.require("../../earth")



local Name = "Hurricane Tracks: Cumulative - 1950 - 2020"
local Identifier = "noaa-sos-atmosphere-hurricane_tracks-cumulative"
local Description = [[Tracking historical hurricanes is an important way for hurricane
researchers to learn about the paths of future hurricanes. Because of this, records of
hurricane paths are archived and studied. Not all hurricanes follow the same path, but
there are certainly noticeable trends for hurricane paths. Many computer models that have
been created to predict hurricane paths include the historical data in their models]]
local URL = "https://sos.noaa.gov/catalog/datasets/hurricane-tracks-cumulative-1950-2005/"


local syncedDirectory = asset.syncedResource({
  Name = Name,
  Type = "HttpSynchronization",
  Identifier = Identifier,
  Version = 1
})


local Layer = {
  Identifier = Identifier,
  Name = Name,
  Enabled = asset.enabled,
  FilePath = syncedDirectory .. "4096.png",
  Description = Description
}


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)



asset.meta = {
  Name = Name,
  Version = "1.0",
  Description = Description .. "Data provided by the National Oceanic and Atmospheric Administration",
  Author = "National Oceanic and Atmospheric Administration",
  URL = URL,
  License = "https://sos.noaa.gov/copyright/"
}
