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



local Layer = {
  Identifier = "LolaDem_Utah",
  Name = "Lola DEM [Utah]",
  Enabled = asset.enabled,
  FilePath = asset.localResource("loladem_utah.wms"),
  TilePixelSize = 360,
  Settings = { Multiplier = 0.5 },
  Description = [[This digital elevation model (DEM) is based on data from the Lunar
    Orbiter Laser Altimeter (LOLA; Smith et al., 2010), an instrument on the National
    Aeronautics and Space Agency (NASA) Lunar Reconnaissance Orbiter (LRO) spacecraft
    (Tooley et al., 2010). The created DEM represents more than 6.5 billion measurements
    gathered between July 2009 and July 2013, adjusted for consistency in the coordinate
    system described below, and then converted to lunar radii (Mazarico et al., 2012)]]
}


asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globe.Moon.Identifier, "HeightLayers", Layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globe.Moon.Identifier, "HeightLayers", Layer)
end)

asset.export("layer", Layer)



asset.meta = {
  Name = "Lola DEM [Utah]",
  Version = "1.1",
  Description = [[Moon LRO LOLA DEM 118m v1 layer for Moon globe. This map is hosted on
    the OpenSpace server in Utah]],
  Author = "USGS",
  URL = "https://astrogeology.usgs.gov/search/map/Moon/LRO/LOLA/Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014",
  License = "NASA/PDS"
}
