-- This file was automatically generated using a script found at
-- https://github.com/OpenSpace/scripts/treks-to-openspace. See the README.md file
-- in that repository for more information on how to run the script to update these
-- files. In particular in the case of errors, prefer to change that script rather
-- than the individual files

local globeIdentifier = asset.require("scene/solarsystem//planets/mercury/mercury").Mercury.Identifier

local treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor = {
  Identifier = "Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor",
  Name = [[MSGR MDIS, ColorHillshade Global]],
  FilePath = asset.localResource("MSGR_MDIS/ColorHillshade_Global.vrt"),
  Description = [[This is a colorized shaded-relief generated from the USGS Astrogeology Science Center's Mercury MESSENGER Global DEM 665m v2 data product providing global coverage of Mercury. This color hillshade was generated in ArcPro with the shaded-relief raster function. The resolution of the original DEM used to create this product is 64 pixels/degree (665 m/pixel). The control network used for registration contains tie points that are sample/line coordinates with geometric locations (derived from SPICE) that are automatically measured across the overlapping image areas. Elevation values are in meters and referred to a radius of 2439400m. The legend conveys the mapping colors to elevation values (meters).]]
}

local treks_Mercury_Messenger_USGS_DEM_665m_v2_Hillshade = {
  Identifier = "Mercury_Messenger_USGS_DEM_665m_v2_Hillshade",
  Name = [[MSGR MDIS, Hillshade Global]],
  FilePath = asset.localResource("MSGR_MDIS/Hillshade_Global.vrt"),
  Description = [[This is a shaded-relief generated from the USGS Astrogeology Science Center's Mercury MESSENGER Global DEM 665m v2 data product providing global coverage of Mercury. This shaded-relief data product was generated in ArcPro with the hillshade raster function. The resolution of the original DEM used to create this product is 64 pixels/degree (665 m/pixel). The control network used for registration contains tie points that are sample/line coordinates with geometric locations (derived from SPICE) that are automatically measured across the overlapping image areas. Elevation values are in meters and referred to a radius of 2439400m.]]
}

local treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor = {
  Identifier = "Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor",
  Name = [[MSGR MDIS, Slope Colorized Global]],
  FilePath = asset.localResource("MSGR_MDIS/Slope_Colorized_Global.vrt"),
  Description = [[This is a colorized slope data product of the USGS Astrogeology Science Center's Mercury MESSENGER Global DEM 665m v2 data product providing global coverage of Mercury. This slope data product was generated in ArcMap with the slope spatial analysis tool. The resolution of this product is 64 pixels/degree (665 m/pixel). The control network used for registration contains tie points that are sample/line coordinates with geometric locations (derived from SPICE) that are automatically measured across the overlapping image areas. Slope values are in degrees and referred to a radius of 2439400m. Slope values range from a minimum value of 0 to a maximum value of 71.0409. The legend conveys the mapping colors to slope values (degrees).]]
}

asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor)
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mercury_Messenger_USGS_DEM_665m_v2_Hillshade)
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", "treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor")
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", "treks_Mercury_Messenger_USGS_DEM_665m_v2_Hillshade")
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", "treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor")
end)

asset.export("Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor", treks_Mercury_Messenger_USGS_DEM_665m_v2_HillshadeColor)
asset.export("Mercury_Messenger_USGS_DEM_665m_v2_Hillshade", treks_Mercury_Messenger_USGS_DEM_665m_v2_Hillshade)
asset.export("Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor", treks_Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor)


asset.meta = {
  Name = [[NASA Treks Layers for Mercury MSGR_MDIS],
  Version = "1.0",
  Author = "NASA/Treks",
  URL = "https://trek.nasa.gov/mercury",
  License = "NASA/Treks",
  Description = [[MSGR_MDIS layers from NASA/Treks for Mercury]]
}
