local globeIdentifier = asset.require("../../mars").Mars.Identifier

local layer = {
  Identifier = "MOLA_Pseudo_Color_Utah",
  Name = "MOLA Pseudo Color [Utah]",
  Enabled = asset.enabled,
  FilePath = asset.localResource("mola_pseudo_color_utah.wms"),
  Description = [[This map is based on data from the Mars Orbiter Laser Altimeter (MOLA)
    (Smith, et al., 2001), an instrument on NASA's Mars Global Surveyor (MGS)
    spacecraft (Albee, et al., 2001). The image used for the base of this map
    represents more than 600 million measurements gathered between 1999 and 2001,
    adjusted for consistency (Neumann, et al., 2001; Neumann, et al., 2003) and
    converted to planetary radii. These have been converted to elevations above the
    areoid as determined from a Martian gravity field solution GMM-2B (Lemoine, et
    al., 2001), truncated to degree and order 50, and oriented according to current
    standards (see below). The average accuracy of each point is originally ~100
    meters in horizontal position and ~1 meter in radius (Neumann, et al., 2001;
    Neumann, et al., 2003). However, the total elevation uncertainty is at least ±3 m
    due to the global error in the areoid (±1.8 meters; Lemoine, et al., 2001) and
    regional uncertainties in its shape (Neumann, 2002). Pixel resolution of this map
    is 463 meters per pixel (m). (Description from URL). Data Reference: (See URL)]],
}

asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.export("layer", layer)



asset.meta = {
  Name = "MOLA Pseudo Color [Utah]",
  Version = "1.1",
  Description = [[Colorzied elevation data for Mars (with shading). This map is hosted
    on the OpenSpace server in Utah]],
  Author = "USGS",
  URL = "https://astrogeology.usgs.gov/search/map/Mars/GlobalSurveyor/MOLA/" ..
    "Mars_MGS_MOLA_ClrShade_merge_global_463m",
  License = "NASA/PDS"
}
