From a937a007778b94b5e3b8b3c2201ccf68ade54741 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 21 Nov 2026 23:14:21 -0500 Subject: [PATCH 1/8] docs: correct stale text and test paths from review points Messages instead of Diagnostics, a browser that may not ask before closing, a control group's memory limit, the Zarr CRS order, the Android and iOS apps without analytics, rounded extents, the mobile activity's end, a split roadmap bullet, integration test paths and commands, and the rows check that xtask changed runs everywhere. The GML notice says unplaced places are kept as missing coordinates, and the publish refusal no longer names longitude/latitude. --- .github/workflows/nightly.yml | 2 +- AGENTS.md | 2 +- ROADMAP.md | 9 +++++---- apps/rustgis-mobile/README.md | 2 +- crates/data/src/gml.rs | 2 +- crates/data/src/publish.rs | 2 +- crates/data/tests/integration/date_properties.rs | 2 +- crates/data/tests/integration/extent_query_properties.rs | 2 +- crates/data/tests/integration/reprojection_round_trip.rs | 2 +- crates/engine/Cargo.toml | 2 +- .../engine/tests/integration/never_silent_roundtrip.rs | 2 +- .../engine/tests/integration/project_save_roundtrip.rs | 2 +- crates/geom/src/utm.rs | 2 +- docs/contributing.md | 2 +- docs/installation.md | 4 +++- docs/mcp.md | 2 +- docs/plugins.md | 2 +- docs/privacy.md | 4 ++-- docs/user-guide/analysis.md | 5 +++-- docs/user-guide/data.md | 5 +++-- docs/user-guide/index.md | 2 +- docs/user-guide/shapefile-encoding.md | 2 +- xtask/src/changed.rs | 2 ++ 23 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e4e40bf36d..537c15bb5d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -60,7 +60,7 @@ jobs: release-build: true # Everyday jobs on real data: the Census Bureau's tracts for Shelby County, Tennessee, checked - # against the areas it publishes (crates/engine/tests/workflows.rs). The files are public domain + # against the areas it publishes (crates/engine/tests/integration/workflows.rs). The files are public domain # and pinned by checksum; a changed file fails the run, a download that fails skips the tests # (`tested` tells the report, which then neither opens nor closes an issue). workflows: diff --git a/AGENTS.md b/AGENTS.md index 76a5649243..60080a3072 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -156,7 +156,7 @@ It counts only the libraries and programs built for the host, not tests, example built only for other targets, nor a row indexed without reading a field (`features[i]` alone); use the accessors there too. While you work, `cargo xtask changed` runs the same checks on only the packages your branch changes -and those that depend on them (and `test-hygiene` on the whole workspace), or everything when a +and those that depend on them (and `test-hygiene` and `rows` on the whole workspace), or everything when a changed file such as `Cargo.lock` is outside every package and nothing includes it. A new dependency must have a licence `deny.toml` allows (CI runs `cargo deny check licenses`); after changing dependencies, run `cargo xtask notices` to refresh the `THIRD-PARTY-LICENSES.txt` files the diff --git a/ROADMAP.md b/ROADMAP.md index 6720bb1a9e..847347ea4d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -71,7 +71,7 @@ A result is right, or RustGIS says what it lost or assumed ([AGENTS.md](AGENTS.md#never-silent)). - Known silent losses: DuckDB queries (`ST_Force2D`) drop Z without a notice; the OSM reader leaves out rings that don't close, rings and member ways with nodes or ways the file doesn't hold, and inner rings outside every outer one; and the text - readers' losses listed as `Silent` in `crates/engine/tests/never_silent_reading.rs`, among them + readers' losses listed as `Silent` in `crates/engine/tests/integration/never_silent_reading.rs`, among them each vertex's Z in DXF and unreadable coordinates, holes and parts in KML, GeoRSS, MapInfo and DXF, plus geometry-collection members in XLSX/ODS/XLS/XLSB, error-valued attribute cells in XLSX, and attribute fields/values in XLSB short-cell workbooks (the original SheetJS 0.18.5 clean @@ -110,10 +110,11 @@ features build on. save, not built in memory first. - A snapshot test of command ids and parameters, so a removal is always deliberate (the project file's JSON Schema, its fixtures and the files past releases saved are checked today). -- A compressed encoding of today's project JSON, read one release before it is written; a - reference system: named connections, copies that remember their source, missing and changed - states, a place for results ([#1653](https://github.com/opengeos/RustGIS/issues/1653)). +- A compressed encoding of today's project JSON, read one release before it is written. _Coordinate first._ +- A system for the data a project refers to: named connections, copies that remember their + source, missing and changed states, a place for results + ([#1653](https://github.com/opengeos/RustGIS/issues/1653)). _Coordinate first._ - What a project holds by default, its own data or links to it ([poll #1660](https://github.com/opengeos/RustGIS/discussions/1660)), and storage that opens a large project without reading it whole. _Decide first._ diff --git a/apps/rustgis-mobile/README.md b/apps/rustgis-mobile/README.md index 0f41b242d8..ea1766296c 100644 --- a/apps/rustgis-mobile/README.md +++ b/apps/rustgis-mobile/README.md @@ -246,7 +246,7 @@ On the Android 15 emulator (x86_64, software GPU), from this crate as it is: | HTTPS basemap tiles | Yes, with the bundled roots | | Rotation | Yes, without a restart | | Suspend and resume | Yes: the surface is dropped and made again, the session is kept | -| The activity destroyed by the system | The session is lost. winit's event loop can't be made twice in a process, so the app ends its process and the next launch starts afresh; without that, the next launch showed nothing | +| The activity destroyed by the system | The session is lost, but recovery copies written while editing let the next launch offer a complete copy. winit's event loop can't be made twice in a process, so the app ends its process if the loop returns; destroying the activity alone doesn't make it return, so the process may survive until the system ends it | | Typing | Key events reach text fields. The soft keyboard itself needs a phone to judge | | Size | 78 MB for arm64 without symbols, 89 MB in the APK for x86_64 | diff --git a/crates/data/src/gml.rs b/crates/data/src/gml.rs index 3eb7c648f5..e99095b83b 100644 --- a/crates/data/src/gml.rs +++ b/crates/data/src/gml.rs @@ -727,7 +727,7 @@ pub fn read(file_name: &str, bytes: &[u8]) -> Result> let what = if unplaced == 1 { "feature has" } else { "features have" }; let system = file_srs.map_or_else(String::new, |(c, _)| format!(" in {}", c.label())); rep.messages.push(format!( - "{}: {unplaced} {what} places{system} that can't be given in longitude/latitude; they are left out of the shapes", + "{}: {unplaced} {what} places{system} that can't be given in longitude/latitude; they are kept as missing coordinates and don't draw", ds.name )); } diff --git a/crates/data/src/publish.rs b/crates/data/src/publish.rs index 2cf0dcbc84..1987370098 100644 --- a/crates/data/src/publish.rs +++ b/crates/data/src/publish.rs @@ -428,7 +428,7 @@ fn in_file<'a>(ds: &'a Dataset, crs: Option, as_held: Option<(&Dataset, &Da crate::progress::check()?; if f.geometry.is_none() && r.geometry.is_some() { return Err(DataError::Format(format!( - "source shape {} couldn't be converted to longitude/latitude, so its native geometry can't be matched safely; check the source projection and add the file again; nothing was written", + "source shape {} couldn't be converted from the source projection when it was read, so its native geometry can't be matched safely; check the source projection and add the file again; nothing was written", i + 1 ))); } diff --git a/crates/data/tests/integration/date_properties.rs b/crates/data/tests/integration/date_properties.rs index bfafef9116..11a84db962 100644 --- a/crates/data/tests/integration/date_properties.rs +++ b/crates/data/tests/integration/date_properties.rs @@ -4,7 +4,7 @@ //! //! Pull requests run a fixed seed; the nightly a new one with more cases. A failure gives its seed //! and the smallest input found. To run a seed again, or deeper: -//! `PROPERTY_SEED=7 PROPERTY_CASES=20000 cargo test -p rustgis-data --test date_properties`. +//! `PROPERTY_SEED=7 PROPERTY_CASES=20000 cargo test -p rustgis-data --test integration date_properties`. use proptest::prelude::*; use proptest::test_runner::{Config, RngAlgorithm, TestCaseError, TestRng, TestRunner}; use rustgis_data::query; diff --git a/crates/data/tests/integration/extent_query_properties.rs b/crates/data/tests/integration/extent_query_properties.rs index c663381910..8e00dab838 100644 --- a/crates/data/tests/integration/extent_query_properties.rs +++ b/crates/data/tests/integration/extent_query_properties.rs @@ -8,7 +8,7 @@ //! //! Pull requests run a fixed seed; the nightly a new one with more cases. A failure gives its seed //! and the smallest layer and extent found. To run a seed again, or deeper: -//! `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-data --test extent_query_properties`. +//! `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-data --test integration extent_query_properties`. use proptest::prelude::*; use proptest::test_runner::{Config, RngAlgorithm, TestCaseError, TestRng, TestRunner}; diff --git a/crates/data/tests/integration/reprojection_round_trip.rs b/crates/data/tests/integration/reprojection_round_trip.rs index 34790e7320..1e7cda3315 100644 --- a/crates/data/tests/integration/reprojection_round_trip.rs +++ b/crates/data/tests/integration/reprojection_round_trip.rs @@ -8,7 +8,7 @@ //! //! Pull requests run a fixed seed; the nightly a new one with more cases. A failure gives its seed //! and the place found that doesn't come back. To run a seed again, or deeper: -//! `PROPERTY_SEED=7 PROPERTY_CASES=200000 cargo test -p rustgis-data --test reprojection_round_trip`. +//! `PROPERTY_SEED=7 PROPERTY_CASES=200000 cargo test -p rustgis-data --test integration reprojection_round_trip`. use proptest::prelude::*; use proptest::test_runner::{Config, RngAlgorithm, TestCaseError, TestRng, TestRunner}; use rustgis_data::raster::{Crs, Transformer}; diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml index 514469ff61..7272a178ac 100644 --- a/crates/engine/Cargo.toml +++ b/crates/engine/Cargo.toml @@ -49,7 +49,7 @@ rustgis-analysis = { workspace = true, features = ["testing"] } tiny-skia = { workspace = true } # Parsing the addresses commands ask for in tests. url = { workspace = true } -# Generated layers for the never-silent round trip (tests/never_silent_roundtrip.rs). +# Generated layers for the never-silent round trip (tests/integration/never_silent_roundtrip.rs). proptest = { workspace = true } # Time slider animations as GIFs (exported by the desktop app only). diff --git a/crates/engine/tests/integration/never_silent_roundtrip.rs b/crates/engine/tests/integration/never_silent_roundtrip.rs index b431a85e78..91483ca546 100644 --- a/crates/engine/tests/integration/never_silent_roundtrip.rs +++ b/crates/engine/tests/integration/never_silent_roundtrip.rs @@ -6,7 +6,7 @@ //! //! Pull requests run a fixed seed; the nightly a new one with more cases. A failure gives its seed //! and the smallest layer found that changes without a notice. To run a seed again, or deeper: -//! `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-engine --test never_silent_roundtrip`. +//! `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-engine --test integration never_silent_roundtrip`. use proptest::prelude::*; use proptest::test_runner::{Config, RngAlgorithm, TestCaseError, TestRng, TestRunner}; use rustgis_engine::{ diff --git a/crates/engine/tests/integration/project_save_roundtrip.rs b/crates/engine/tests/integration/project_save_roundtrip.rs index 0772c51742..fb75975035 100644 --- a/crates/engine/tests/integration/project_save_roundtrip.rs +++ b/crates/engine/tests/integration/project_save_roundtrip.rs @@ -10,7 +10,7 @@ //! changes nothing. //! //! Pull requests run a fixed seed; the nightly a new one with more cases. To run a seed again, or -//! deeper: `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-engine --test project_save_roundtrip`. +//! deeper: `PROPERTY_SEED=7 PROPERTY_CASES=2000 cargo test -p rustgis-engine --test integration project_save_roundtrip`. use proptest::prelude::*; use proptest::test_runner::{Config, RngAlgorithm, TestCaseError, TestRng, TestRunner}; use rustgis_engine::{ diff --git a/crates/geom/src/utm.rs b/crates/geom/src/utm.rs index db997d70ab..dd3574619e 100644 --- a/crates/geom/src/utm.rs +++ b/crates/geom/src/utm.rs @@ -840,7 +840,7 @@ mod tests { /// GeographicLib's GeoConvert documentation converts 33.3° N 44.4° E (Baghdad) to /// `38n 444140.54 3684706.36` and MGRS `38SMB4414084706` /// (https://geographiclib.sourceforge.io/C++/doc/GeoConvert.1.html). Also checked against - /// terrio-crs in `crates/data/tests/utm_vs_proj.rs`. + /// terrio-crs in `crates/data/tests/integration/utm_vs_proj.rs`. #[test] fn published_reference_point() { let u = to_utm(c(44.4, 33.3)).unwrap(); diff --git a/docs/contributing.md b/docs/contributing.md index 658278366d..5b2de2a770 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -305,7 +305,7 @@ test similarly generates its KML, KMZ, CSV and GeoJSON inputs. These run automat `cargo test --workspace --locked` and `cargo xtask ci`, without a separate setup step or a public service. Extend these generators when adding cases. -`crates/engine/tests/workflows.rs` runs everyday jobs from start to finish: join, overlay, +`crates/engine/tests/integration/workflows.rs` runs everyday jobs from start to finish: join, overlay, summarise, map, save, reopen and export, and the same saved job twice. Its real-data case, Shelby County's census tracts checked against the areas the Census Bureau publishes, is `#[ignore]`d: the nightly build downloads the public-domain files, pinned by checksum, and runs it diff --git a/docs/installation.md b/docs/installation.md index 93b7a96b06..692cdef939 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -157,7 +157,9 @@ RustGIS also runs in the browser, compiled to WebAssembly: open after it, and **Save** downloads it under that name again. The browser doesn't tell RustGIS whether it saved a download (its save prompt can be cancelled), so **Save** keeps any unsaved changes, and **Save As** to a different name makes the project unsaved. Closing or leaving - the tab asks first while there are unsaved changes; an unchanged project stays clean. + the tab may ask first while there are unsaved changes, but browsers don't promise to (mobile + browsers often skip it when a tab is closed from the tab switcher), so check that the saved + file downloaded before you leave; an unchanged project stays clean. - The interface uses the built-in font, because a web page can't read installed fonts. Choosing Chinese, Japanese, Korean or Persian downloads a font for that script. - Process plugins (including Python plugins), and the formats read through GDAL or DuckDB, diff --git a/docs/mcp.md b/docs/mcp.md index 46c3a42689..f680bf34fc 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -338,7 +338,7 @@ These behavioral tests in `crates/assistant/src/relay.rs` check the requirements | Tool | What it does | | --- | --- | -| `list_layers` | The whole project in one call: path and unsaved changes, the view (centre, longitude/latitude extent, scale, projection), the active layer, layers in table-of-contents order (group, type, source, extent, feature count, selection, definition query, renderer, labels, fields, visibility, transparency), web tile layers, basemap, tables and layouts with their page size in millimetres and their map frames. `name_filter` keeps the layers and tables whose name holds it; `include_fields: false` leaves fields out | +| `list_layers` | The whole project in one call: path and unsaved changes, the view (centre, longitude/latitude extent, scale, projection), the active layer, layers in table-of-contents order (group, type, source, extent (rounded outwards to six decimals, so it still holds every coordinate), feature count, selection, definition query, renderer, labels, fields, visibility, transparency), web tile layers, basemap, tables and layouts with their page size in millimetres and their map frames. `name_filter` keeps the layers and tables whose name holds it; `include_fields: false` leaves fields out | | `view_map` | The map as a PNG image at the current view; `width` and `height` default to 1024 × 640, each clamped to 64–2048 pixels. A picture over 3.75 MiB (a satellite basemap near 2048 pixels) is drawn again smaller, and its caption gives the size drawn and the size asked | | `snapshot` | The map as a PNG with JSON metadata: `mode`, `width`, `height`, `extent` (longitude/latitude), `center`, `scale`, `projection`, `render_settled`, `saved` and `note`. `mode: "screen"` captures the RustGIS window through the relay, once the map has finished drawing or after `wait_s` seconds (default 5, clamped to 0–30); `overlays: false` leaves out the map's controls, scale bar, north arrow and sketches. `mode: "render"` draws offscreen at `max_width` (default 1024, clamped to 64–2048 pixels); height follows the view's shape, with each side capped at 2048. It works while the window is hidden. `mode: "auto"` (default) takes the screen when the map is on it. Unavailable screen captures fall back to render. `save_path` also writes the PNG to a file, which needs file access | | `search_commands` | Finds RustGIS commands by words: their ids, ribbon locations and parameters | diff --git a/docs/plugins.md b/docs/plugins.md index 400a8e3832..54837c8edb 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -646,7 +646,7 @@ Inside a request, `host::call(op, params)` sends one of these to RustGIS: | Request | Answer | |---|---| | `host.info` | `{rustgis, abi, plugin, permissions}`: version, ABI, plugin id and permissions | -| `host.layers` | `[{id, name, raster, visible, geometry, features, selected, active, extent, transparency, group, crs, fields: [{name, type}]}]`, top first: `crs` is the layer's own coordinate system, `"EPSG:32637"` (its WKT when it has no EPSG code, else its PROJ definition; `null` only for a raster not yet read), the one `share.exportLayer` keeps. A vector layer that carries no coordinate system is reported as `"EPSG:4326"`: RustGIS assumes WGS 84 for it, as it does everywhere, so that is a fallback, not a system the file declared; `extent` is `[west, south, east, north]` in longitude/latitude (`null` when empty or a raster not yet read), `transparency` the layer's own, 0 (opaque) to 100 (its groups' transparency applies on top), `group` the name of the group it is in or `null`. The web tile layers, groups, tables and layouts (with their page size) are in `info.project` | +| `host.layers` | `[{id, name, raster, visible, geometry, features, selected, active, extent, transparency, group, crs, fields: [{name, type}]}]`, top first: `crs` is the layer's own coordinate system, `"EPSG:32637"` (its WKT when it has no EPSG code, else its PROJ definition; `null` only for a raster not yet read), the one `share.exportLayer` keeps. A vector layer that carries no coordinate system is reported as `"EPSG:4326"`: RustGIS assumes WGS 84 for it, as it does everywhere, so that is a fallback, not a system the file declared; `extent` is `[west, south, east, north]` in longitude/latitude, rounded outwards to six decimals so it still holds every coordinate (`null` when empty or a raster not yet read), `transparency` the layer's own, 0 (opaque) to 100 (its groups' transparency applies on top), `group` the name of the group it is in or `null`. The web tile layers, groups, tables and layouts (with their page size) are in `info.project` | | `host.features` `{layer, selected?, limit?, crs?}` | the layer's features as GeoJSON; each feature has its `row`. With `crs` omitted, null or empty, coordinates retain the default longitude/latitude response without a `crs` member: WGS 84 for Earth layers, but the source body’s degrees for planetary layers. An explicit `"EPSG:4326"` (or `"4326"`), or `"layer"` resolving to WGS 84, also uses that response without a `crs` member. This preserves the existing numeric coordinates for planetary layers; it does not convert them to Earth’s WGS 84. Other `crs` values ask for: `"layer"` (the layer's own, as `host.layers` gives it: metres for a UTM layer), `"map"` (the map's projection; Web Mercator on the globe) or an EPSG code (`"EPSG:32637"`, or `"32637"`; WKT and PROJ text are refused, so a plugin can't add coordinate systems to the session). A non-default answer then has a GeoJSON `crs` member (`{"type": "name", "properties": {"name": "EPSG:32637"}}`), which `host.addLayer` reads back. A `crs` that is unknown, not text (except null), an unsupported form, has no EPSG code (a layer or map in a custom system), is geocentric, belongs to another body than the layer, or can't hold a feature (outside its area, or beyond Web Mercator's latitude of 85.05°) is an error starting with `crs:` (naming the feature count where it applies); nothing is dropped silently or moved. The request runs on the calling thread (the window's, in the app) like every host request | | `host.view` | `{center: [lon, lat], scale, projection, bearing, pitch}` (bearing and pitch in degrees, 0 for a flat north-up map) | | `host.notify` `{text, error?}` | shows a message in the status bar | diff --git a/docs/privacy.md b/docs/privacy.md index e1a8dcf1b0..396762c1ec 100644 --- a/docs/privacy.md +++ b/docs/privacy.md @@ -200,5 +200,5 @@ words of a site search. You can block analytics with a content blocker or your browser's tracking protection; the sites work normally without them. Analytics run only on the sites we host: the measurement ID is added -when those sites are deployed, so the desktop app, the command line and any copy you build -yourself never load them. +when those sites are deployed, so the desktop app, the command line, the Android and iOS apps +and any copy you build yourself never load them. diff --git a/docs/user-guide/analysis.md b/docs/user-guide/analysis.md index 1920cb81f4..e5cf71ec42 100644 --- a/docs/user-guide/analysis.md +++ b/docs/user-guide/analysis.md @@ -1584,8 +1584,9 @@ cores; `gp.env` returns the threads and cores as `limits.threads` and `limits.co runs on one thread. `gp.env` also returns the memory limits on this computer (`limits`). On the desktop they follow the -computer's memory, or a memory limit set on RustGIS (a container's, or a service's such as systemd's `MemoryMax`) when it is lower: each plans for a quarter of it, never -below the web app's fixed limits and never above a ceiling. `limits.memorySource` says what they +computer's memory, or the memory limit of the control group RustGIS runs in (set by a container +runtime, or by systemd's `MemoryMax` for a service) when it is lower: each plans for a quarter of +it, never below the web app's fixed limits and never above a ceiling. `limits.memorySource` says what they follow: `computer`, `container` (such a limit, lower than the computer's memory), `override` or `unknown`. For tests, or to reproduce a smaller computer, set the environment variable `RUSTGIS_MEMORY_BYTES` to the memory in bytes (such as `8589934592` for 8 GiB) before diff --git a/docs/user-guide/data.md b/docs/user-guide/data.md index f04fec773e..6bb62d93f0 100644 --- a/docs/user-guide/data.md +++ b/docs/user-guide/data.md @@ -1780,8 +1780,9 @@ rotation, pixel- or node-registered) reads no coordinates, and the transform win the store also holds. It is the variable's own, or that of the nearest group above it (up to 64 levels up) that gives one, taken with that group's `spatial:shape`, which must be the variable's map's. Its map dimensions are those `spatial:dimensions` names. `proj:code`, `proj:wkt2` or `proj:epsg` give -the coordinate system, after the variable's own attributes and its grid mapping, and before a -`spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its +the coordinate system. The first of these that gives one is used: the variable's own attributes +(its own `proj:` keys among them), then its grid mapping's, then the `proj:` keys of the groups +above it, then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its groups' attributes: open the store's address with `"variable"` instead. A web store whose root lists no arrays (a Zarr 3 root `zarr.json` with no consolidated metadata, or a Zarr 2 `.zgroup` with no `.zmetadata`) needs `"variable"`: its array, the groups above it, diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md index b2fad15c02..97e65c6cb5 100644 --- a/docs/user-guide/index.md +++ b/docs/user-guide/index.md @@ -102,7 +102,7 @@ This guide walks through RustGIS by task. Each page covers one part of the app: to step through decimal degrees, DMS, UTM and MGRS; see [Coordinate readouts](maps.md#coordinate-readouts)), the coordinate system (click it to change the projection), the selection count (with a button to clear it), the latest notice (click to open - **Diagnostics**), a **Diagnostics** button, the last draw time, the frame rate and a **GPU**/**CPU** + **Messages**), a **Messages** button, the last draw time, the frame rate and a **GPU**/**CPU** renderer switch. While agents control the desktop app, it also shows the MCP relay or file bridge. **Command Search** (++ctrl+k++, or the box at the top right) finds commands and geoprocessing diff --git a/docs/user-guide/shapefile-encoding.md b/docs/user-guide/shapefile-encoding.md index 6d2e897a07..450351a72d 100644 --- a/docs/user-guide/shapefile-encoding.md +++ b/docs/user-guide/shapefile-encoding.md @@ -83,7 +83,7 @@ tables or system programs are needed for the supported decoders above. - [`yore`'s `CodePage` implementations](https://docs.rs/yore/1.4.0/yore/trait.CodePage.html#implementors) list the available legacy decoders and lossy decoding API. -`crates/data/tests/shapefile_encoding.rs` specifies fixed bytes and Unicode expectations +`crates/data/tests/integration/shapefile_encoding.rs` specifies fixed bytes and Unicode expectations independently of RustGIS's mapping. Its matrix covers every marker above, names and values, ZIP and loose-file imports, a genuinely sampled streamed read, a complete read, and ordered chunk traversal. It also checks `.cpg` precedence, fallback diagnostics, the notices for text diff --git a/xtask/src/changed.rs b/xtask/src/changed.rs index 6ac5e1565c..5d8c0783d1 100644 --- a/xtask/src/changed.rs +++ b/xtask/src/changed.rs @@ -13,6 +13,8 @@ //! - Every package that depends on a changed one, as a dependency of any kind, is checked too. So //! a changed package gets the features every workspace package turns on in it; a feature that a //! package left out turns on in an outside crate isn't, which can make a result differ from CI's. +//! - Formatting, `layers`, `rows` and `test-hygiene` look at the whole workspace, whatever +//! changed: a change anywhere can break them. //! //! `--list` prints the packages it would check, one a line, or `all`, or `none`, and checks nothing. From 3214ac8cb562af7980860163928fb604c80d3bd7 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 21 Nov 2026 23:14:21 -0500 Subject: [PATCH 2/8] fix: name a topology layer once, keep plugin weekday in bounds A topology refusal for a place that can't be converted named its layer twice. A plugin calendar's weekday indexed a month table and could panic for a month outside 1 to 12. Also move a misplaced doc comment, word the options limit for tab rows, and share the offline map suffix with the touch interface. --- crates/engine/src/cmd/design.rs | 21 ++++++++++++++++++++- crates/engine/src/cmd/field.rs | 2 +- crates/plugins/src/panel.rs | 4 ++-- crates/ui-egui/src/pluginpanel.rs | 15 ++++++++++----- crates/ui-touch/src/lib.rs | 2 +- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index c6a5cf34b3..bb4512e77d 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -2355,10 +2355,13 @@ fn check_topology(inputs: &[TopologyInput], tol: f64) -> Result 0, "the overlap is found"); } + /// A held layer with a place that can't be given in longitude/latitude is refused, naming + /// the layer once. + #[test] + fn a_topology_refusal_names_its_layer_once() { + let mut ds = rustgis_data::Dataset::new("Parcels", GeometryType::Polyline, vec![]); + ds.hold_in(rustgis_data::raster::Crs::Epsg(32632)).unwrap(); + // Far beyond any place UTM 32N holds. + ds.push(Some(Geometry::Line(vec![vec![Coord::new(1e12, 1e12), Coord::new(1e12 + 1.0, 1e12)]])), vec![]); + let mut s = Session::new(crate::Project::default()); + s.map_mut().add_dataset(ds); + s.run("topology.rules", &json!({"add": {"rule": "mustNotHaveDangles", "layer": "Parcels"}})).unwrap(); + let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); + assert!(e.starts_with("Parcels: feature"), "{e}"); + assert_eq!(e.matches("Parcels").count(), 1, "{e}"); + } + #[test] fn a_center_is_found_within_the_commands_budget() { // A line at 89.9°N whose ten edges each span 170° of longitude: 340 half-degree stretches diff --git a/crates/engine/src/cmd/field.rs b/crates/engine/src/cmd/field.rs index 2a65aa3e5c..e7a22086e1 100644 --- a/crates/engine/src/cmd/field.rs +++ b/crates/engine/src/cmd/field.rs @@ -29,7 +29,7 @@ const BASEMAPS: &str = "basemaps"; /// The folder of a field package that holds its features' photos. const PHOTOS: &str = "photos"; /// What an offline area's map is called after: ` (offline)`. -pub(crate) const OFFLINE: &str = " (offline)"; +pub const OFFLINE: &str = " (offline)"; /// The most bytes read from one field package's entries when it is opened. const MOST_UNPACKED: usize = rustgis_data::zip::MAX_TOTAL; /// Optional information for the crew. Older readers extract it like any other companion file. diff --git a/crates/plugins/src/panel.rs b/crates/plugins/src/panel.rs index 0c6fcee2f9..e06e61d802 100644 --- a/crates/plugins/src/panel.rs +++ b/crates/plugins/src/panel.rs @@ -39,7 +39,6 @@ pub const MAX_FORM_FIELD_ID: usize = 64; pub const MAX_FORM_CHOICES: usize = 256; /// The most options a dropdown (`choice`) holds. pub const MAX_CHOICES: usize = 1_000; -/// The widget kinds. /// Whether a kind takes its value from a list of `options`: a dropdown, or a tab row, which is the /// same thing drawn as a row of labels instead of a menu. They differ only in how they look, so /// everything from `options` to the value they keep is shared. @@ -48,6 +47,7 @@ pub fn picks_an_option(kind: &str) -> bool { matches!(kind, "choice" | "tabs") } +/// The widget kinds. pub const KINDS: &[&str] = &["text", "checkbox", "slider", "button", "tree", "form", "choice", "tabs", "date", "range", "pick"]; /// What a pick asks for on the map: a point (the default) or a box. pub const PICK_SHAPES: &[&str] = &["point", "box"]; @@ -311,7 +311,7 @@ impl PanelDecl { } if options.len() != item.options.len() { return Err(what(&format!( - "a dropdown's options are at most {MAX_CHOICES} objects, each with a unique id of 1 to {MAX_TREE_ID} characters" + "options (dropdown or tab row) are at most {MAX_CHOICES} objects, each with a unique id of 1 to {MAX_TREE_ID} characters" ))); } if kind != "text" && !item.text.is_empty() { diff --git a/crates/ui-egui/src/pluginpanel.rs b/crates/ui-egui/src/pluginpanel.rs index affc4c97c4..6767e1fbf9 100644 --- a/crates/ui-egui/src/pluginpanel.rs +++ b/crates/ui-egui/src/pluginpanel.rs @@ -1015,18 +1015,19 @@ fn tabs(app: &mut RustGisApp, ui: &mut Ui, pid: &str, item: &PanelItemDecl, stat }); }); ui.add_space(2.0); - let _ = t; if let Some(n) = pick { send(app, pid, item, json!(n)); } } -/// The weekday of a date, 0 for Monday. +/// The weekday of a date, 0 for Monday. A month outside 1 to 12 counts as January's offset rather +/// than failing. fn weekday(y: i32, m: u32, d: u32) -> u32 { // Sakamoto's method, which counts from Sunday. - const T: [i32; 12] = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; - let y = if m < 3 { y - 1 } else { y }; - let sunday = (y + y / 4 - y / 100 + y / 400 + T[(m - 1) as usize] + d as i32).rem_euclid(7) as u32; + const T: [i64; 12] = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; + let y = i64::from(y) - i64::from(m < 3); + let offset = T.get(m.wrapping_sub(1) as usize).copied().unwrap_or(0); + let sunday = (y + y / 4 - y / 100 + y / 400 + offset + i64::from(d)).rem_euclid(7) as u32; (sunday + 6) % 7 } @@ -1297,6 +1298,10 @@ mod tests { assert_eq!(weekday(2023, 4, 1), 5); assert_eq!(weekday(2024, 2, 29), 3); assert_eq!(weekday(2000, 1, 1), 5); + // A month outside 1 to 12, or a far year or day, gives a weekday rather than failing. + for (y, m, d) in [(2024, 0, 1), (2024, 13, 1), (i32::MAX, 2, u32::MAX), (i32::MIN, 0, 0)] { + assert!(weekday(y, m, d) < 7); + } assert_eq!(month_step(2023, 1, -1), (2022, 12)); assert_eq!(month_step(2023, 12, 1), (2024, 1)); assert_eq!(month_step(9999, 12, 1), (9999, 12), "kept within years 1 to 9999"); diff --git a/crates/ui-touch/src/lib.rs b/crates/ui-touch/src/lib.rs index c3c2b8c614..3b182334fe 100644 --- a/crates/ui-touch/src/lib.rs +++ b/crates/ui-touch/src/lib.rs @@ -278,7 +278,7 @@ fn can_send_field_package(app: &RustGisApp) -> bool { } // An area ID with no area (a damaged file) is no copy to send. let area = map.offline_area_id.as_deref().map(|id| project.offline_areas.iter().any(|a| a.id == id)); - area.unwrap_or_else(|| map.name.ends_with(" (offline)")) + area.unwrap_or_else(|| map.name.ends_with(rustgis_ui_egui::rustgis_engine::cmd::field::OFFLINE)) } /// Draws where the device is: a dot, in a ring as wide as the position is good to. From b808266677b08f154ded9e0f778f826337d7325b Mon Sep 17 00:00:00 2001 From: giswqs Date: Sat, 21 Nov 2026 23:44:37 -0500 Subject: [PATCH 3/8] fix(engine): name a covering layer's topology refusal as that layer A mustBeCoveredBy rule whose covering layer had a place that can't be converted was refused under the checked layer's name too. Also say when xtask changed skips its whole-workspace checks, give the roadmap item its coordination path, and use checked_sub in the weekday. --- AGENTS.md | 2 +- ROADMAP.md | 2 +- crates/engine/src/cmd/design.rs | 43 ++++++++++++++++++++++--------- crates/ui-egui/src/pluginpanel.rs | 6 ++--- xtask/src/changed.rs | 6 +++-- 5 files changed, 40 insertions(+), 19 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 60080a3072..13e9d3165a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -156,7 +156,7 @@ It counts only the libraries and programs built for the host, not tests, example built only for other targets, nor a row indexed without reading a field (`features[i]` alone); use the accessors there too. While you work, `cargo xtask changed` runs the same checks on only the packages your branch changes -and those that depend on them (and `test-hygiene` and `rows` on the whole workspace), or everything when a +and those that depend on them (and `test-hygiene`, plus formatting, `layers` and `rows` when packages are checked, on the whole workspace), or everything when a changed file such as `Cargo.lock` is outside every package and nothing includes it. A new dependency must have a licence `deny.toml` allows (CI runs `cargo deny check licenses`); after changing dependencies, run `cargo xtask notices` to refresh the `THIRD-PARTY-LICENSES.txt` files the diff --git a/ROADMAP.md b/ROADMAP.md index 847347ea4d..b48d151b97 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -111,7 +111,7 @@ features build on. - A snapshot test of command ids and parameters, so a removal is always deliberate (the project file's JSON Schema, its fixtures and the files past releases saved are checked today). - A compressed encoding of today's project JSON, read one release before it is written. - _Coordinate first._ + _Coordinate first_: an issue is needed. - A system for the data a project refers to: named connections, copies that remember their source, missing and changed states, a place for results ([#1653](https://github.com/opengeos/RustGIS/issues/1653)). _Coordinate first._ diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index bb4512e77d..5e374c3779 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -2356,18 +2356,19 @@ fn check_topology(inputs: &[TopologyInput], tol: f64) -> Result t::overlaps(&data, &i.rows), @@ -2641,19 +2642,37 @@ mod tests { } /// A held layer with a place that can't be given in longitude/latitude is refused, naming - /// the layer once. + /// the layer once; a covering layer's is named as that layer, not the one checked. #[test] fn a_topology_refusal_names_its_layer_once() { - let mut ds = rustgis_data::Dataset::new("Parcels", GeometryType::Polyline, vec![]); - ds.hold_in(rustgis_data::raster::Crs::Epsg(32632)).unwrap(); - // Far beyond any place UTM 32N holds. - ds.push(Some(Geometry::Line(vec![vec![Coord::new(1e12, 1e12), Coord::new(1e12 + 1.0, 1e12)]])), vec![]); + let held = |name: &str, kind: GeometryType, far: bool| { + let mut ds = rustgis_data::Dataset::new(name, kind, vec![]); + ds.hold_in(rustgis_data::raster::Crs::Epsg(32632)).unwrap(); + // Far beyond any place UTM 32N holds, or in it. + let (x, y) = if far { (1e12, 1e12) } else { (500_000.0, 5_400_000.0) }; + let ring = vec![Coord::new(x, y), Coord::new(x + 10.0, y), Coord::new(x + 10.0, y + 10.0), Coord::new(x, y)]; + let shape = match kind { + GeometryType::Polygon => Geometry::Polygon(vec![vec![ring]]), + GeometryType::Point => Geometry::Point(Coord::new(x, y)), + _ => Geometry::Line(vec![ring]), + }; + ds.push(Some(shape), vec![]); + ds + }; let mut s = Session::new(crate::Project::default()); - s.map_mut().add_dataset(ds); + s.map_mut().add_dataset(held("Parcels", GeometryType::Polyline, true)); s.run("topology.rules", &json!({"add": {"rule": "mustNotHaveDangles", "layer": "Parcels"}})).unwrap(); let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); assert!(e.starts_with("Parcels: feature"), "{e}"); assert_eq!(e.matches("Parcels").count(), 1, "{e}"); + + let mut s = Session::new(crate::Project::default()); + s.map_mut().add_dataset(held("Cities", GeometryType::Point, false)); + s.map_mut().add_dataset(held("Countries", GeometryType::Polygon, true)); + s.run("topology.rules", &json!({"add": {"rule": "mustBeCoveredBy", "layer": "Cities", "by": "Countries"}})).unwrap(); + let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); + assert!(e.starts_with("Countries: feature"), "{e}"); + assert!(!e.contains("Cities"), "{e}"); } #[test] diff --git a/crates/ui-egui/src/pluginpanel.rs b/crates/ui-egui/src/pluginpanel.rs index 6767e1fbf9..b7b9a1d0c1 100644 --- a/crates/ui-egui/src/pluginpanel.rs +++ b/crates/ui-egui/src/pluginpanel.rs @@ -1020,13 +1020,13 @@ fn tabs(app: &mut RustGisApp, ui: &mut Ui, pid: &str, item: &PanelItemDecl, stat } } -/// The weekday of a date, 0 for Monday. A month outside 1 to 12 counts as January's offset rather -/// than failing. +/// The weekday of a date, 0 for Monday. A month outside 1 to 12 (callers pass only those) gives +/// some weekday rather than failing. fn weekday(y: i32, m: u32, d: u32) -> u32 { // Sakamoto's method, which counts from Sunday. const T: [i64; 12] = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; let y = i64::from(y) - i64::from(m < 3); - let offset = T.get(m.wrapping_sub(1) as usize).copied().unwrap_or(0); + let offset = m.checked_sub(1).and_then(|i| T.get(i as usize)).copied().unwrap_or(0); let sunday = (y + y / 4 - y / 100 + y / 400 + offset + i64::from(d)).rem_euclid(7) as u32; (sunday + 6) % 7 } diff --git a/xtask/src/changed.rs b/xtask/src/changed.rs index 5d8c0783d1..2c7abbd4f7 100644 --- a/xtask/src/changed.rs +++ b/xtask/src/changed.rs @@ -13,8 +13,10 @@ //! - Every package that depends on a changed one, as a dependency of any kind, is checked too. So //! a changed package gets the features every workspace package turns on in it; a feature that a //! package left out turns on in an outside crate isn't, which can make a result differ from CI's. -//! - Formatting, `layers`, `rows` and `test-hygiene` look at the whole workspace, whatever -//! changed: a change anywhere can break them. +//! - `test-hygiene` always looks at the whole workspace. When Rust packages are checked, +//! formatting, `layers` and `rows` look at the whole workspace too, as a change anywhere can +//! break them; when nothing changed, or only files outside every package that no package reads, +//! they don't run. //! //! `--list` prints the packages it would check, one a line, or `all`, or `none`, and checks nothing. From f71840af67e9f3ed4827ae0b19d0bdf119544f22 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 22 Nov 2026 00:12:36 -0500 Subject: [PATCH 4/8] Address review feedback - Name a covering layer's topology refusal by its map name, which its data's own name may not be; the test covers a renamed layer. - xtask changed: the skipped case is the non-code files is_non_code names, not any unread file outside packages. - Zarr CRS order: a group gives any coordinate-system key, not only proj: ones. - Rewrap the AGENTS.md and analysis.md lines. --- AGENTS.md | 3 ++- crates/engine/src/cmd/design.rs | 19 ++++++++++++++----- docs/user-guide/analysis.md | 4 ++-- docs/user-guide/data.md | 2 +- xtask/src/changed.rs | 4 ++-- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 13e9d3165a..d318b33473 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -156,7 +156,8 @@ It counts only the libraries and programs built for the host, not tests, example built only for other targets, nor a row indexed without reading a field (`features[i]` alone); use the accessors there too. While you work, `cargo xtask changed` runs the same checks on only the packages your branch changes -and those that depend on them (and `test-hygiene`, plus formatting, `layers` and `rows` when packages are checked, on the whole workspace), or everything when a +and those that depend on them (and `test-hygiene` on the whole workspace, and formatting, `layers` and +`rows` when packages are checked), or everything when a changed file such as `Cargo.lock` is outside every package and nothing includes it. A new dependency must have a licence `deny.toml` allows (CI runs `cargo deny check licenses`); after changing dependencies, run `cargo xtask notices` to refresh the `THIRD-PARTY-LICENSES.txt` files the diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index 5e374c3779..11eeacbb6e 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -2300,6 +2300,8 @@ struct TopologyInput { data: rustgis_data::Dataset, rows: Vec, by: Option, + /// The covering layer's name on the map, which its data's own name may not be. + by_layer: String, } /// The rules as the map has them now, each with what it reads; a rule whose layer is gone is left @@ -2311,11 +2313,11 @@ fn topology_checks(s: &Session) -> Vec { let rows: Vec = l.visible_rows().iter().enumerate().filter(|(_, v)| **v).map(|(i, _)| i).collect(); // A covering layer that is gone leaves the rule with nothing to check (its layer's // latitudes are still checked). - let by = match &rule { - TopologyRule::MustBeCoveredBy { by, .. } => s.map().layer_by_name(by).map(|b| b.dataset.clone()), - _ => None, + let (by, by_layer) = match &rule { + TopologyRule::MustBeCoveredBy { by, .. } => (s.map().layer_by_name(by).map(|b| b.dataset.clone()), by.clone()), + _ => (None, String::new()), }; - inputs.push(TopologyInput { rule, layer: l.name.clone(), data: l.dataset.clone(), rows, by }); + inputs.push(TopologyInput { rule, layer: l.name.clone(), data: l.dataset.clone(), rows, by, by_layer }); } inputs } @@ -2368,7 +2370,7 @@ fn check_topology(inputs: &[TopologyInput], tol: f64) -> Result t::overlaps(&data, &i.rows), @@ -2673,6 +2675,13 @@ mod tests { let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); assert!(e.starts_with("Countries: feature"), "{e}"); assert!(!e.contains("Cities"), "{e}"); + // A covering layer whose map name isn't its data's (a name taken on a clash) is named as + // the map has it. + s.map_mut().layers.iter_mut().find(|l| l.name == "Countries").unwrap().name = "Borders".into(); + s.map_mut().editing.topology = vec![TopologyRule::MustBeCoveredBy { layer: "Cities".into(), by: "Borders".into() }]; + let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); + assert!(e.starts_with("Borders: "), "{e}"); + assert!(!e.contains("Cities"), "{e}"); } #[test] diff --git a/docs/user-guide/analysis.md b/docs/user-guide/analysis.md index e5cf71ec42..42dc9969f6 100644 --- a/docs/user-guide/analysis.md +++ b/docs/user-guide/analysis.md @@ -1586,8 +1586,8 @@ runs on one thread. `gp.env` also returns the memory limits on this computer (`limits`). On the desktop they follow the computer's memory, or the memory limit of the control group RustGIS runs in (set by a container runtime, or by systemd's `MemoryMax` for a service) when it is lower: each plans for a quarter of -it, never below the web app's fixed limits and never above a ceiling. `limits.memorySource` says what they -follow: `computer`, `container` (such a limit, lower than the computer's memory), +it, never below the web app's fixed limits and never above a ceiling. `limits.memorySource` says +what they follow: `computer`, `container` (such a limit, lower than the computer's memory), `override` or `unknown`. For tests, or to reproduce a smaller computer, set the environment variable `RUSTGIS_MEMORY_BYTES` to the memory in bytes (such as `8589934592` for 8 GiB) before starting RustGIS: it replaces the memory read from the computer and any container limit, and the diff --git a/docs/user-guide/data.md b/docs/user-guide/data.md index 6bb62d93f0..0d90632b8b 100644 --- a/docs/user-guide/data.md +++ b/docs/user-guide/data.md @@ -1781,7 +1781,7 @@ the store also holds. It is the variable's own, or that of the nearest group abo levels up) that gives one, taken with that group's `spatial:shape`, which must be the variable's map's. Its map dimensions are those `spatial:dimensions` names. `proj:code`, `proj:wkt2` or `proj:epsg` give the coordinate system. The first of these that gives one is used: the variable's own attributes -(its own `proj:` keys among them), then its grid mapping's, then the `proj:` keys of the groups +(its own `proj:` keys among them), then its grid mapping's, then the coordinate-system keys of the groups above it, then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its groups' attributes: open the store's address with `"variable"` instead. A web store whose root lists no arrays (a Zarr 3 root `zarr.json` with no consolidated metadata, diff --git a/xtask/src/changed.rs b/xtask/src/changed.rs index 2c7abbd4f7..e4a259195e 100644 --- a/xtask/src/changed.rs +++ b/xtask/src/changed.rs @@ -15,8 +15,8 @@ //! package left out turns on in an outside crate isn't, which can make a result differ from CI's. //! - `test-hygiene` always looks at the whole workspace. When Rust packages are checked, //! formatting, `layers` and `rows` look at the whole workspace too, as a change anywhere can -//! break them; when nothing changed, or only files outside every package that no package reads, -//! they don't run. +//! break them; when nothing changed, or only the non-code files `is_non_code` names, they +//! don't run. //! //! `--list` prints the packages it would check, one a line, or `all`, or `none`, and checks nothing. From 0cd603e8485944124c2ad2a4e186aba89a72c2ec Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 22 Nov 2026 00:47:34 -0500 Subject: [PATCH 5/8] Address Claude review feedback - A conversion error's data-name prefix is replaced by the layer's map name, so a layer renamed on a clash is named once. - The test requires the covering layer's name to appear once. --- crates/engine/src/cmd/design.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index 11eeacbb6e..b4abdea794 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -2358,19 +2358,19 @@ fn check_topology(inputs: &[TopologyInput], tol: f64) -> Result t::overlaps(&data, &i.rows), @@ -2680,7 +2680,8 @@ mod tests { s.map_mut().layers.iter_mut().find(|l| l.name == "Countries").unwrap().name = "Borders".into(); s.map_mut().editing.topology = vec![TopologyRule::MustBeCoveredBy { layer: "Cities".into(), by: "Borders".into() }]; let e = check_topology(&topology_checks(&s), 1.0).unwrap_err(); - assert!(e.starts_with("Borders: "), "{e}"); + assert!(e.starts_with("Borders: feature"), "{e}"); + assert_eq!(e.matches("Countries").count() + e.matches("Borders").count(), 1, "{e}"); assert!(!e.contains("Cities"), "{e}"); } From 1723c19e679b644ca8314cb200c5b45f05f4ff7d Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 22 Nov 2026 05:45:16 -0500 Subject: [PATCH 6/8] Address review feedback - Zarr: a group gives only its proj:wkt2, proj:code or proj:epsg, from the nearest group that sets one; the earlier wording was wrong. - Mobile README: the recovery offer comes with a new process, after the system ends the old one. --- apps/rustgis-mobile/README.md | 2 +- docs/user-guide/data.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/rustgis-mobile/README.md b/apps/rustgis-mobile/README.md index 3df41dd693..77462dd35e 100644 --- a/apps/rustgis-mobile/README.md +++ b/apps/rustgis-mobile/README.md @@ -247,7 +247,7 @@ On the Android 15 emulator (x86_64, software GPU), from this crate as it is: | HTTPS basemap tiles | Yes, with the bundled roots | | Rotation | Yes, without a restart | | Suspend and resume | Yes: the surface is dropped and made again, the session is kept | -| The activity destroyed by the system | The session is lost, but recovery copies written while editing let the next launch offer a complete copy. winit's event loop can't be made twice in a process, so the app ends its process if the loop returns; destroying the activity alone doesn't make it return, so the process may survive until the system ends it | +| The activity destroyed by the system | The session is lost. winit's event loop can't be made twice in a process, so the app ends its process if the loop returns; destroying the activity alone doesn't make it return, so the process may survive, and a launch in that same process may not start. Once the system ends the process, the next launch starts a new one, and the recovery copies written while editing let it offer a complete copy | | Typing | Key events reach text fields. The soft keyboard itself needs a phone to judge | | Size | 78 MB for arm64 without symbols, 89 MB in the APK for x86_64 | diff --git a/docs/user-guide/data.md b/docs/user-guide/data.md index b5cc1df0ce..6523e8b473 100644 --- a/docs/user-guide/data.md +++ b/docs/user-guide/data.md @@ -1781,8 +1781,9 @@ the store also holds. It is the variable's own, or that of the nearest group abo levels up) that gives one, taken with that group's `spatial:shape`, which must be the variable's map's. Its map dimensions are those `spatial:dimensions` names. `proj:code`, `proj:wkt2` or `proj:epsg` give the coordinate system. The first of these that gives one is used: the variable's own attributes -(its own `proj:` keys among them), then its grid mapping's, then the coordinate-system keys of the groups -above it, then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its +(its own `proj:` keys among them), then its grid mapping's, then the `proj:wkt2`, `proj:code` or +`proj:epsg` of the nearest group above it that sets any of them (a value there that can't be read +isn't passed over for a group further up), then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its groups' attributes: open the store's address with `"variable"` instead. A web store whose root lists no arrays (a Zarr 3 root `zarr.json` with no consolidated metadata, or a Zarr 2 `.zgroup` with no `.zmetadata`) needs `"variable"`: its array, the groups above it, From b7fd04915f4c7aa7feb791bc8d46bceea52d0c21 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 22 Nov 2026 06:11:56 -0500 Subject: [PATCH 7/8] Address review feedback - Test a checked layer renamed on a clash: named once, by its map name. - Zarr: a variable that sets any proj: key takes nothing from a group. --- crates/engine/src/cmd/design.rs | 7 +++++++ docs/user-guide/data.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index b6f0e4c50a..9354ee0025 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -2773,6 +2773,13 @@ mod tests { let Err(e) = check_topology(&topology_checks(&s), 1.0) else { panic!("the check is refused") }; assert!(e.starts_with("Parcels: feature"), "{e}"); assert_eq!(e.matches("Parcels").count(), 1, "{e}"); + // A checked layer whose map name isn't its data's (a name taken on a clash) is named as + // the map has it, once. + s.map_mut().layers.iter_mut().find(|l| l.name == "Parcels").unwrap().name = "Parcels (2)".into(); + s.map_mut().editing.topology = vec![TopologyRule::MustNotHaveDangles { layer: "Parcels (2)".into() }]; + let Err(e) = check_topology(&topology_checks(&s), 1.0) else { panic!("the check is refused") }; + assert!(e.starts_with("Parcels (2): feature"), "{e}"); + assert_eq!(e.matches("Parcels").count(), 1, "{e}"); let mut s = Session::new(crate::Project::default()); s.map_mut().add_dataset(held("Cities", GeometryType::Point, false)); diff --git a/docs/user-guide/data.md b/docs/user-guide/data.md index 6523e8b473..97cf491880 100644 --- a/docs/user-guide/data.md +++ b/docs/user-guide/data.md @@ -1782,8 +1782,8 @@ levels up) that gives one, taken with that group's `spatial:shape`, which must b dimensions are those `spatial:dimensions` names. `proj:code`, `proj:wkt2` or `proj:epsg` give the coordinate system. The first of these that gives one is used: the variable's own attributes (its own `proj:` keys among them), then its grid mapping's, then the `proj:wkt2`, `proj:code` or -`proj:epsg` of the nearest group above it that sets any of them (a value there that can't be read -isn't passed over for a group further up), then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its +`proj:epsg` of the nearest group above it that sets any of them (only when the variable sets none: +a value that can't be read, on the variable or a group, isn't passed over for one further up), then a `spatial_ref` or `crs` array beside it. A variable opened by its own address doesn't see its groups' attributes: open the store's address with `"variable"` instead. A web store whose root lists no arrays (a Zarr 3 root `zarr.json` with no consolidated metadata, or a Zarr 2 `.zgroup` with no `.zmetadata`) needs `"variable"`: its array, the groups above it, From b984f951f79cbb121384505bd5b47a4789860d24 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 22 Nov 2026 06:37:44 -0500 Subject: [PATCH 8/8] Address Claude review feedback - The memory limit is the lowest of the process's own control group and those above it. --- docs/user-guide/analysis.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user-guide/analysis.md b/docs/user-guide/analysis.md index e800edec9c..440b83766a 100644 --- a/docs/user-guide/analysis.md +++ b/docs/user-guide/analysis.md @@ -1649,10 +1649,10 @@ cores; `gp.env` returns the threads and cores as `limits.threads` and `limits.co runs on one thread. `gp.env` also returns the memory limits on this computer (`limits`). On the desktop they follow the -computer's memory, or on Linux the memory limit of the control group RustGIS runs in (set by a -container runtime, or by systemd's `MemoryMax` for a service) when it is lower: each plans for a -quarter of it, never below the web app's fixed limits and never above a ceiling. `limits.memorySource` says -what they follow: `computer`, `container` (such a limit, lower than the computer's memory), +computer's memory, or on Linux the lowest memory limit of the control groups RustGIS runs in, its +own and those above it (set by a container runtime, or by systemd's `MemoryMax` for a service), +when it is lower: each plans for a quarter of it, never below the web app's fixed limits and never +above a ceiling. `limits.memorySource` says what they follow: `computer`, `container` (such a limit, lower than the computer's memory), `override` or `unknown`. For tests, or to reproduce a smaller computer, set the environment variable `RUSTGIS_MEMORY_BYTES` to the memory in bytes (such as `8589934592` for 8 GiB) before starting RustGIS: it replaces the memory read from the computer and any container limit, and the