[Feature]: A credit on every layer, listed as a publication layout's sources when none are given
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with crates/engine/src/cmd/layout.rs around line 1223 and ribbon.rs around line 1108, then trace rustgis_map::Layer and how layer data and project state are saved. The issue also calls out layer.addData, layer.credit, Layer Properties, file metadata, and layer-producing tools as entry points. Done means credits survive those paths and Publication Layout uses visible layer credits by default, with the specified overrides and warning; the listed tests should cover these cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Before you start
- I searched the existing issues and the roadmap and did not find a duplicate request.
What problem does this solve?
A map sheet must say where its data came from. layout.publication has a sources parameter, but when it isn't given the sheet has no sources at all (crates/engine/src/cmd/layout.rs:1223, texts_of(p, "sources")?.unwrap_or_default()). The footer then shows only the cartographic reference. The New Layout menu runs layout.publication with no sources (ribbon.rs ~1108), and nothing could fill them in, because RustGIS has nowhere to keep them:
- Tile layers have an
attribution, which the map draws as a credit. - A cube catalog entry has a
credit(JAXA Earth datasets: "JAXA, "), and it is passed tostac.addCubeas the cube layer's attribution. - A raster or vector layer (
rustgis_map::Layer) has no such field. So the layer thatcube.reducemakes from a JAXA cube, a GeoTIFF or a shapefile opened withlayer.addData, and a layer made by a tool or a plugin all lose where they came from.
The user has to retype the sources for every layout, and a sheet made in one click goes out without them.
Proposed solution
A credit on every layer: one line of text saying where its data came from. Publication Layout lists the credits of the visible layers as the sheet's sources when none are given.
Choices in this proposal
- Field:
credit: StringonLayer, empty by default, saved in the project. An older project opens with all credits empty. - Setting it:
- a
"credit"parameter onlayer.addData; - a new
layer.credit {"layer", "credit"}command, which plugins and scripts can call; - a Credit field in Layer Properties (General or Source tab).
- a
- Filled in automatically:
- A tile layer's credit is its attribution, so nothing new is stored for it.
- A file whose metadata names its source (a GeoTIFF's
TIFFTAG_COPYRIGHT, a GeoPackage's or a STAC item's attribution) gets that as its credit. - A layer made from another one (clip, reproject, resample,
cube.reduce, raster calculator, vector tools) gets its input's credit. With several inputs, it gets their distinct credits joined with "; ".
- Publication Layout:
- When
"sources"isn't given, the sources are the distinct credits of the visible layers, top to bottom, with basemap attributions last. "sources": []still gives none, and given sources are used as they are.- When a visible data layer has no credit, a warning names it, so the user knows the sheet doesn't say where it came from.
- The New Layout menu gets the same sources this way. The sources stay an ordinary text element on the sheet, which the user can edit.
- When
- Tests:
layer.addDatawith a credit, thenlayout.publicationwithout sources, lists it;cube.reducefrom a catalog cube keeps the entry's credit;- a layer with no credit gives the warning;
"sources": []gives no sources.
Alternatives considered
- Sources in the layer's name: this makes long names, which the legend and the colorbar then show.
- Leaving it to plugins: the BrasilData plugin keeps its own sources table and passes
sourcestolayout.publicationitself. Every plugin and script would have to do the same, and data opened by hand would still have none.
Additional context
This came up when a user ran Publication Layout on monthly rainfall from JAXA Earth: the sheet came out with no sources. JAXA's terms ask for a credit on maps using their data, and the cube catalog already knows it.
- Lingua principale
- Rust
- Stelle
- 1.9k
- Fork
- 268
- Merge medio
- 11h 1m
- PR unite (30g)
- 942
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepForse già presa @jgregoriorincon l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opengeos/RustGIS#2621 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
opengeos/RustGIS#1446 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opengeos/RustGIS
Issue simili
-
文件夹重大BUG:不支持重命名Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jonathanong/no-mistakes#3879 ·
I maintainer di solito rispondono entro 1 giorno
-
area:index v0.35.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pbakaus/impeccable#1653 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
nautechsystems/nautilus_trader#5741 ·
I maintainer di solito rispondono entro 1 giorno