diff --git a/crates/engine/command-surface.txt b/crates/engine/command-surface.txt index 2499fb3030..0c163296c3 100644 --- a/crates/engine/command-surface.txt +++ b/crates/engine/command-surface.txt @@ -486,7 +486,7 @@ raster.rotation layer? angle raster.setDefaultStyle fromLayer? layer? ramp? invert? stretch? low? high? n? resampling? reset? raster.spectral layer lon? lat? points? zone? raster.stretch layer? type low? high? n? min? max? like? -raster.symbology layer? type band? ramp? invert? classes? method? azimuth? altitude? zFactor? shadow? sky? fill? ambient? balanced? shadowSoftness? aerial? terrain? rock? grey? +raster.symbology layer? type band? ramp? invert? classes? method? azimuth? altitude? zFactor? shadow? sky? fill? ambient? balanced? shadowSoftness? aerial? terrain? flats? rock? grey? raster.zarrInfo path url bbox? variable? report.activate report report.attachments report? field diff --git a/crates/engine/src/cmd/raster.rs b/crates/engine/src/cmd/raster.rs index c4ada5eb45..1809ce207e 100644 --- a/crates/engine/src/cmd/raster.rs +++ b/crates/engine/src/cmd/raster.rs @@ -7,7 +7,7 @@ use std::sync::Arc; use rustgis_data::raster::{self, Raster}; use rustgis_geom::Extent; use rustgis_map::raster::{ - Normalizer, RasterLayer, RasterMask, RasterRenderer, RasterStyle, Resampling, Rock, Stretch, classify_masked, unique_values, + Flats, Normalizer, RasterLayer, RasterMask, RasterRenderer, RasterStyle, Resampling, Rock, Stretch, classify_masked, unique_values, }; use rustgis_map::{ClassMethod, Ramp, RasterDefaults}; use serde_json::{Value, json}; @@ -39,7 +39,7 @@ pub fn commands() -> Vec { C::new("layer.addDataBytes", "Add Data (from file contents)", "Home › Add", add_bytes::).roles(&[]).effects(crate::policy::Effects::NONE) .params(r#"{"fileName": "name.tif|.tiff|.asc|.grb|.grib|.grb2|.grib2 (GRIB)|.hgt|.dt0|.dt1|.dt2|.geojson|.csv|.zip|.kml|.kmz|.gpx|.parquet|.fgb|.gpkg|.mbtiles|.jp2|.j2k|.dxf|.pdf (JPEG 2000: desktop, through GDAL; PDF: desktop, command line and Python)", "data": base64, "zoom"?: bool, "layer"?: "one layer of a zip, KML or GPX by name, or a PDF's page number (the first when left out or blank)", "name"?: text, "x"?, "y"?, "wkt"?, "crs"?, "delimiter"?, "paperSpace"?, "blocks"?, "stream"?, "as"? (as layer.addData)}"#), C::new("raster.symbology", "Symbology", "Style › Rendering", symbology).when(need_raster).roles(&[]).effects(crate::policy::Effects::NONE).params( - r#"{"layer"?, "type": "stretch"|"rgb"|"classify"|"unique"|"colormap"|"shadedRelief", "band"?: 1.., "ramp"?, "invert"?: bool, "classes"?: 1..32, "method"?, "azimuth"?, "altitude"?, "zFactor"?, "shadow"?: 0..1 (shadedRelief: how dark the shadows the terrain casts are; left out, kept; 0 casts none), "sky"?: 0..1 (shadedRelief: how much the share of the sky each cell sees dims its ambient light; left out, kept; 0 leaves it whole), "fill"?: 0..1 (shadedRelief: a fill light from the side opposite the sun that lightens the slopes turned toward it; left out, kept; 0 has none), "ambient"?: 0..1|null (shadedRelief: the share of the colour a slope turned fully from the sun keeps; left out, kept; null, the default: 0.25, or 0.5 balanced), "balanced"?: bool (shadedRelief: flat ground keeps the ramp's colour and slopes facing the sun brighten, up to 1.3; left out, kept; false, the default, lights as before), "shadowSoftness"?: 0.5..15|null (shadedRelief: how soft the edges of its cast shadows are, as half the sun's apparent size in degrees; left out, kept; outside 0.5 to 15, refused; null, the default: 5), "aerial"?: 0..1|null (shadedRelief: aerial perspective, low ground on the layer's stretch lit with less contrast and hazed toward #ECECEC, the more the lower; left out, kept; outside 0 to 1, refused; null or 0, the default: none), "terrain"?: -1..1|null (shadedRelief: terrain type, each cell's gradient g reshaped for the sun's light only as tan 30° × (g / tan 30°)^(1 − 0.5 × terrain), steepened at most 8 times: above 0 gentle relief shows, below 0 steep ground stands out; cast shadows, sky, fill light and rock keep the ground's slope; left out, kept; outside -1 to 1, refused; null or 0, the default: lit as before), "rock"?: {"from"?: 0..90, "to"?: 0..90, "color"?: #RRGGBB} | false (shadedRelief: steep slopes tinted toward a rock colour before the light, from the ground's own slope in degrees, without the Z factor: the ramp below from, the colour above to, blended between; left out, kept; an object's missing keys keep the current rock's, or 25, 40 and #B2ACA4; false or null removes it), "grey"?: bool (shadedRelief without its colour ramp)}"#, + r#"{"layer"?, "type": "stretch"|"rgb"|"classify"|"unique"|"colormap"|"shadedRelief", "band"?: 1.., "ramp"?, "invert"?: bool, "classes"?: 1..32, "method"?, "azimuth"?, "altitude"?, "zFactor"?, "shadow"?: 0..1 (shadedRelief: how dark the shadows the terrain casts are; left out, kept; 0 casts none), "sky"?: 0..1 (shadedRelief: how much the share of the sky each cell sees dims its ambient light; left out, kept; 0 leaves it whole), "fill"?: 0..1 (shadedRelief: a fill light from the side opposite the sun that lightens the slopes turned toward it; left out, kept; 0 has none), "ambient"?: 0..1|null (shadedRelief: the share of the colour a slope turned fully from the sun keeps; left out, kept; null, the default: 0.25, or 0.5 balanced), "balanced"?: bool (shadedRelief: flat ground keeps the ramp's colour and slopes facing the sun brighten, up to 1.3; left out, kept; false, the default, lights as before), "shadowSoftness"?: 0.5..15|null (shadedRelief: how soft the edges of its cast shadows are, as half the sun's apparent size in degrees; left out, kept; outside 0.5 to 15, refused; null, the default: 5), "aerial"?: 0..1|null (shadedRelief: aerial perspective, low ground on the layer's stretch lit with less contrast and hazed toward #ECECEC, the more the lower; left out, kept; outside 0 to 1, refused; null or 0, the default: none), "terrain"?: -1..1|null (shadedRelief: terrain type, each cell's gradient g reshaped for the sun's light only as tan 30° × (g / tan 30°)^(1 − 0.5 × terrain), steepened at most 8 times: above 0 gentle relief shows, below 0 steep ground stands out; cast shadows, sky, fill light and rock keep the ground's slope; left out, kept; outside -1 to 1, refused; null or 0, the default: lit as before), "flats"?: {"amount"?: 0..1, "size"?: 1..32} | false (shadedRelief: flat ground's detail, each cell's direct light moved by its height above the mean within size cells around it, 40 per unit of height (a metre on most DEMs) within 80, times amount, fading out by 4° of slope; best on a terrain model, as a surface model's trees and roads show too; left out, kept; an object's missing keys keep the current one's, or 1 and 6; amount 0, false or null: none, the default; outside, refused), "rock"?: {"from"?: 0..90, "to"?: 0..90, "color"?: #RRGGBB} | false (shadedRelief: steep slopes tinted toward a rock colour before the light, from the ground's own slope in degrees, without the Z factor: the ramp below from, the colour above to, blended between; left out, kept; an object's missing keys keep the current rock's, or 25, 40 and #B2ACA4; false or null removes it), "grey"?: bool (shadedRelief without its colour ramp)}"#, ), C::new("raster.stretch", "Stretch Type", "Style › Rendering", stretch).inputs(stretch_inputs).roles(&[]).effects(crate::policy::Effects::NONE) .when(need_raster) @@ -1085,7 +1085,10 @@ fn symbology(s: &mut Session, p: &Value) -> CmdResult { Some(Value::Null) => 0.0, Some(_) => relief_terrain_type(f(p, "terrain"))?, }, - flats: cur_flats, + flats: match p.get("flats") { + None => cur_flats, + Some(v) => relief_flats(v, cur_flats)?, + }, } } other => return Err(format!("unknown raster symbology '{other}'")), @@ -1182,6 +1185,30 @@ fn relief_terrain_type(v: Option) -> Result { } } +/// The detail on flat ground of a Shaded Relief's `"flats"` (see `raster.symbology`): `false` or +/// null for none, or an object whose missing keys keep `cur`'s, or else [`Flats::DEFAULT`]'s, +/// read as other keys are (a numeric string is its number). An amount of 0 is none; an amount +/// outside 0 to 1, or a size that isn't a whole number of cells from 1 to [`Flats::MAX_SIZE`], is +/// refused by name. +pub(crate) fn relief_flats(v: &Value, cur: Option) -> Result, String> { + if v.is_null() || *v == Value::Bool(false) { + return Ok(None); + } + let max = Flats::MAX_SIZE; + let refused = || format!("\"flats\" must be {{\"amount\": 0 to 1, \"size\": 1 to {max} cells}}, or false for none"); + if !v.is_object() { + return Err(refused()); + } + let was = cur.unwrap_or(Flats::DEFAULT); + let given = |k: &str| v.get(k).filter(|x| !x.is_null()).map(|_| f(v, k).ok_or_else(refused)).transpose(); + let amount = given("amount")?.unwrap_or(was.amount); + let size = given("size")?.unwrap_or(f64::from(was.size)); + if !(0.0..=1.0).contains(&amount) || size.fract() != 0.0 || !(1.0..=f64::from(max)).contains(&size) { + return Err(refused()); + } + Ok((amount > 0.0).then_some(Flats { amount, size: size as u32 })) +} + /// The rock of a Shaded Relief's `"rock"` (see `raster.symbology`): `false` or null for none, or /// an object whose missing keys keep `cur`'s, or else [`Rock::DEFAULT`]'s. fn relief_rock(v: &Value, cur: Option) -> Result, String> { diff --git a/crates/engine/src/project_capabilities.rs b/crates/engine/src/project_capabilities.rs index dd93c35d92..cc0556cc48 100644 --- a/crates/engine/src/project_capabilities.rs +++ b/crates/engine/src/project_capabilities.rs @@ -189,8 +189,25 @@ const COMMAND_CAPABILITIES: &[(&str, CommandCheck)] = &[ ("shaded-relief-shadow-softness", command_sets_shadow_softness), ("shaded-relief-aerial", command_sets_aerial), ("shaded-relief-terrain-type", command_sets_terrain_type), + ("shaded-relief-flats", command_sets_flats), ]; +/// A saved `raster.symbology` that sets a Shaded Relief's detail on flat ground (#3143): an older +/// reader runs it without the key, saying nothing, so flat ground would be drawn even. Read as the +/// command reads it, with its parser (an object's missing amount is the default's, 1): `false`, +/// `null` and an amount of 0 ask for none, and another renderer reads no flats. The current +/// setting isn't known here, so an object is read against none. +fn command_sets_flats(id: &str, params: &Value) -> bool { + match id { + "raster.symbology" => { + crate::cmd::raster::symbology_is_relief(params) + && params.get("flats").is_some_and(|v| matches!(crate::cmd::raster::relief_flats(v, None), Ok(Some(_)))) + } + "script.run" => params.get("script").and_then(Value::as_str).is_some_and(|s| script_uses(s, command_sets_flats)), + _ => false, + } +} + /// A saved `layout.publication` that leaves out or sets up its grid, scale bar or north arrow /// (#3094): an older reader ignores `grid` and `scaleBar`, making the default sheet, and refuses /// any `northArrow` object. `null`, and a grid or scale bar object giving nothing, ask for the @@ -1777,6 +1794,18 @@ mod tests { // Read as the command reads it: a numeric string is its number, so "0" is none too. (&[], "raster.symbology", json!({"type": "shadedRelief", "aerial": "0"})), (&["shaded-relief-aerial"], "raster.symbology", json!({"type": "shadedRelief", "aerial": "0.5"})), + // Flat ground's detail, read with the command's parser: an object's missing amount is + // the default's; false, null and an amount of 0 are the none an older reader draws, and + // a refused one is never saved. + (&["shaded-relief-flats"], "raster.symbology", json!({"type": "shadedRelief", "flats": {"amount": 0.5, "size": 4}})), + (&["shaded-relief-flats"], "raster.symbology", json!({"type": "shadedRelief", "flats": {}})), + (&["shaded-relief-flats"], "raster.symbology", json!({"type": "hillshade", "flats": {"amount": "0.5"}})), + (&[], "raster.symbology", json!({"type": "shadedRelief", "flats": {"amount": 0}})), + (&[], "raster.symbology", json!({"type": "shadedRelief", "flats": {"amount": "0"}})), + (&[], "raster.symbology", json!({"type": "shadedRelief", "flats": false})), + (&[], "raster.symbology", json!({"type": "shadedRelief", "flats": null})), + (&[], "raster.symbology", json!({"type": "shadedRelief", "flats": {"amount": 2}})), + (&[], "raster.symbology", json!({"type": "stretch", "flats": {"amount": 0.5}})), // Only a Shaded Relief draws them, its type read as the command reads it: left out, the // command draws a stretch, which an older reader draws the same. (&[], "raster.symbology", json!({"type": "stretch", "aerial": 0.6, "shadowSoftness": 1.5})), @@ -1829,6 +1858,13 @@ mod tests { let script = format!(r#"raster.symbology {{"type": "{kind}", "terrain": "{terrain}"}}"#); assert_eq!(command_sets_terrain_type("script.run", &json!({ "script": script })), needs, "{kind} {terrain}"); } + for (value, needs) in [(r#"{"amount": "0"}"#, false), (r#"{"amount": "0.5"}"#, true)] { + for kind in ["shadedRelief", "stretch"] { + let (key, uses) = ("flats", command_sets_flats); + let script = format!(r#"raster.symbology {{"type": "{kind}", "{key}": {value}}}"#); + assert_eq!(uses("script.run", &json!({ "script": script })), needs && kind == "shadedRelief", "{kind} {key} {value}"); + } + } } /// `report.existingTemplate` imports a layout file as `layout.import` does, so a step of it diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index ff3dbe4c1b..5cdd470545 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -8060,29 +8060,52 @@ fn shaded_relief_keeps_its_terrain_type() { assert_eq!(serde_json::to_value(&fixture).unwrap()["requires"], json!(["shaded-relief-terrain-type"])); } -/// Shaded Relief's detail on flat ground (#3143) reads back from a project, required by name; a -/// new relief has none, and one set is kept when the relief is styled again, and saved. +/// Shaded Relief's detail on flat ground (#3143) is set, an object's missing keys from the current +/// one or the defaults (1 and 6), kept when left out, refused by name outside its ranges (nothing +/// changed), saved only when set, and back when the project is opened again; an amount of 0, +/// false or null is none again, which saves nothing new. #[test] fn shaded_relief_keeps_its_flat_ground_detail() { - let fixture = Project::from_json(include_str!("../../../schema/fixtures/shaded_relief_flats.rgis")).unwrap(); - assert_eq!(serde_json::to_value(&fixture).unwrap()["requires"], json!(["shaded-relief-flats"])); + use rustgis_map::raster::Flats; + let mut s = with_raster(); let flats = |s: &Session| match s.map().layers.iter().find_map(|l| l.raster.as_ref()).map(|r| &r.style.renderer) { Some(rustgis_map::RasterRenderer::ShadedRelief { flats, .. }) => *flats, other => panic!("{other:?}"), }; - assert_eq!(flats(&Session::new(fixture)), Some(rustgis_map::raster::Flats::DEFAULT)); - let mut s = with_raster(); - s.run("raster.symbology", &json!({"type": "shadedRelief"})).unwrap(); - assert_eq!(flats(&s), None, "none by default"); - if let Some(rustgis_map::RasterRenderer::ShadedRelief { flats, .. }) = - s.map_mut().layers.iter_mut().find_map(|l| l.raster.as_mut()).map(|r| &mut r.style.renderer) - { - *flats = Some(rustgis_map::raster::Flats::DEFAULT); + let saved = |s: &mut Session| s.project.saved_text(None).unwrap().0; + let relief = |s: &mut Session, flats: Value| s.run("raster.symbology", &json!({"type": "shadedRelief", "flats": flats})); + s.run("raster.symbology", &json!({"type": "shadedRelief", "shadow": 0.8})).unwrap(); + assert_eq!(flats(&s), None); + assert!(!saved(&mut s).contains("\"flats\":"), "none saves nothing new"); + relief(&mut s, json!({})).unwrap(); + assert_eq!(flats(&s), Some(Flats::DEFAULT), "the defaults"); + relief(&mut s, json!({"size": "9"})).unwrap(); + relief(&mut s, json!({"amount": 0.4})).unwrap(); + s.run("raster.symbology", &json!({"type": "shadedRelief", "azimuth": 200})).unwrap(); + assert_eq!(flats(&s), Some(Flats { amount: 0.4, size: 9 }), "missing keys and left out, kept"); + let refused = [json!({"amount": -0.1}), json!({"amount": "flat"}), json!({"size": 0}), json!({"size": 33}), json!({"size": 2.5})]; + for refused in refused.into_iter().chain([json!({"amount": 1.5}), json!(0.5), json!(true)]) { + let e = relief(&mut s, refused.clone()).unwrap_err(); + assert!(e.contains("\"flats\"") && e.contains("0 to 1") && e.contains("1 to 32"), "{refused}: {e}"); + assert_eq!(flats(&s), Some(Flats { amount: 0.4, size: 9 }), "{refused}: refused, nothing changed"); } - s.run("raster.symbology", &json!({"type": "shadedRelief", "azimuth": 200, "shadow": 0.5})).unwrap(); - assert_eq!(flats(&s), Some(rustgis_map::raster::Flats::DEFAULT), "kept"); - let text = s.project.saved_text(None).unwrap().0; - assert!(text.contains(r#""flats":{"amount":1.0,"size":6}"#) && text.contains("shaded-relief-flats"), "{text}"); + let text = saved(&mut s); + assert!(text.contains(r#""flats":{"amount":0.4,"size":9}"#) && text.contains("shaded-relief-flats"), "saved, and required by name"); + let reopened = Project::from_json(&text).unwrap(); + assert_eq!(flats(&Session::new(reopened)), Some(Flats { amount: 0.4, size: 9 }), "back when opened"); + for none in [json!({"amount": 0}), json!(false), json!(null)] { + relief(&mut s, json!({"amount": 0.3})).unwrap(); + relief(&mut s, none.clone()).unwrap(); + assert_eq!(flats(&s), None, "{none}: none"); + } + relief(&mut s, json!({"amount": 0.3})).unwrap(); + s.run("edit.undo", &json!({})).unwrap(); + assert_eq!(flats(&s), None, "undone"); + assert!(!saved(&mut s).contains("\"flats\":"), "none saves nothing new"); + // The fixture reads back as saved, requiring what it sets by name. + let fixture = Project::from_json(include_str!("../../../schema/fixtures/shaded_relief_flats.rgis")).unwrap(); + assert_eq!(flats(&Session::new(fixture.clone())), Some(Flats::DEFAULT)); + assert_eq!(serde_json::to_value(&fixture).unwrap()["requires"], json!(["shaded-relief-flats"])); } /// Shaded Relief's rock on steep slopes (#1913): an object turns it on, its missing keys from the @@ -34999,6 +35022,34 @@ fn cog_windows_stand_in_the_level_kept_until_their_tiles_arrive() { assert_eq!(v(&part, 1001, 901), ((1001 + 901) % 256) as f32); } +/// A Shaded Relief's detail on flat ground (#3143) drawn from a GeoTIFF read in place, zoomed in +/// past its overview, is the same at the view's edges as further in: the part in view is read +/// with the neighbourhood around it, so a small view is the middle of a larger one. +#[test] +fn flat_ground_detail_read_in_place_has_no_step_at_the_views_edges() { + let (base, _) = serve_ranges(rustgis_data::raster::cog::example(2048, 256)); + let mut s = Session::new(Project::default()); + s.run("layer.addUrl", &json!({"url": format!("{base}/scene.tif")})).unwrap(); + s.map_mut().camera.center = rustgis_geom::lonlat_to_merc(rustgis_geom::Coord::new(10.5, 45.5)); + s.map_mut().camera.res = 25.0; + // A GeoTIFF of the view: its layers alone, without the scale bar and credits. + let tif = std::env::temp_dir().join(format!("rustgis-flats-in-place-{}.tif", std::process::id())); + let drawn = |s: &mut Session, side: u32| { + s.view_size = (f64::from(side), f64::from(side)); + s.run("share.exportMap", &json!({"path": tif.to_string_lossy(), "width": side, "height": side})).unwrap(); + rustgis_data::raster::geotiff::read(std::io::Cursor::new(std::fs::read(&tif).unwrap()), "view").unwrap() + }; + for flats in [json!(false), json!({"amount": 1, "size": 6})] { + s.run("raster.symbology", &json!({"type": "shadedRelief", "flats": flats})).unwrap(); + let (small, large) = (drawn(&mut s, 64), drawn(&mut s, 128)); + let at = |b: usize, x: usize, y: usize, r: &rustgis_data::raster::Raster| r.bands[b].data[y * r.width as usize + x]; + let differ = + (0..3 * 64 * 64).filter(|i| at(i / 4096, i % 64, i / 64 % 64, &small) != at(i / 4096, i % 64 + 32, i / 64 % 64 + 32, &large)); + assert_eq!(differ.count(), 0, "{flats}: pixels of the small view drawn otherwise"); + } + let _ = std::fs::remove_file(&tif); +} + /// A tile a sparse file leaves out (GDAL's: no bytes) is empty, not waited for: a window over it /// is whole at once and asks for nothing more, and an export of the view over it is written rather /// than refused after waiting for the tile. diff --git a/crates/render/src/raster.rs b/crates/render/src/raster.rs index a8f073381c..37a96e3bcb 100644 --- a/crates/render/src/raster.rs +++ b/crates/render/src/raster.rs @@ -229,16 +229,23 @@ pub(crate) fn draw_in_place( read.extend(alpha); // The strips in view: one, or two across a 0–360° grid's seam. let strips: Vec<(f64, f64)> = std::iter::once(want.cols).chain(want.cols2).collect(); + // A pixel past each side for bilinear sampling, or the cells flat ground's detail averages + // (#3143), so the part's edge is drawn as the whole image's. + let pad = match style.renderer { + RasterRenderer::ShadedRelief { flats: Some(f), .. } if f.amount > 0.0 => f.size.min(Flats::MAX_SIZE) + 1, + _ => 1, + }; let mut window = None; while let Some(l) = levels.get(level) { - // The part in view, in the level's pixels, a pixel past each side (for bilinear sampling). + // The part in view, in the level's pixels, `pad` past each side. let (sx, sy) = (f64::from(l.width) / f64::from(r.width.max(1)), f64::from(l.height) / f64::from(r.height.max(1))); let edge = |v: f64, k: f64, max: u32| ((v * k).floor() as i64).clamp(0, i64::from(max)) as u32; let cols: Vec<(u32, u32)> = strips .iter() - .map(|c| (edge(c.0, sx, l.width).saturating_sub(1), edge(c.1, sx, l.width).saturating_add(2).min(l.width))) + .map(|c| (edge(c.0, sx, l.width).saturating_sub(pad), edge(c.1, sx, l.width).saturating_add(pad + 1).min(l.width))) .collect(); - let rows = (edge(want.rows.0, sy, l.height).saturating_sub(1), edge(want.rows.1, sy, l.height).saturating_add(2).min(l.height)); + let rows = + (edge(want.rows.0, sy, l.height).saturating_sub(pad), edge(want.rows.1, sy, l.height).saturating_add(pad + 1).min(l.height)); if cols.iter().all(|cols| rustgis_tiles::cog::raster::fits(address, level, *cols, rows, &read)) { window = Some((level, cols, rows)); break; diff --git a/docs/maintaining.md b/docs/maintaining.md index 3c056f2e15..a47984e7e9 100644 --- a/docs/maintaining.md +++ b/docs/maintaining.md @@ -124,7 +124,8 @@ diagram cut to a circle or to polygons), `terrain-block-polygon` (one cut to pol `null` are none), `shaded-relief-terrain-type` (a Shaded Relief's terrain type, stored as `terrain_type`, left out at 0, or set by a saved step's `"terrain"` on a Shaded Relief, where 0 and `null` light as before), -`shaded-relief-flats` (a Shaded Relief's detail on flat ground), +`shaded-relief-flats` (a Shaded Relief's detail on flat ground, stored at any amount, or set by a +saved step, where `false`, `null` and an amount of 0 are none), `blank-paper` (a blank basemap's paper colour) and `normalized-legend-urls` for normalized legend addresses. Project requirements include offline map snapshots. `table-export-order` protects saved task commands,