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

local layer = {
  Identifier = "Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor",
  Name = [[MSGR MDIS, Slope Colorized Global]],
  FilePath = asset.localResource("Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor.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", layer)
end)
  
asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer.Identifier)
end)
  
asset.export("layer", layer)


asset.meta = {
  Name = [[MSGR MDIS, Slope Colorized Global]],
  Version = "1.0",
  Author = "NASA/Treks",
  URL = "https://trek.nasa.gov/mercury/#v=0.1&x=0&y=0&z=1&p=urn:ogc:def:crs:IAU2000::19900&d=&l=Mercury_Messenger_USGS_DEM_665m_v2_SlopeColor%2Ctrue%2C1&b=mercury&e=-180.0%2C-90.0%2C180.0%2C90.0&sfv=&w=",
  License = "NASA/Treks",
  Description = [[MSGR MDIS, Slope Colorized Global layer from NASA/Treks for Mercury]]
}
