[Feature]: Let plugins use raster.mosaic with the Imagery extension off (DEM tile download)

Aperta Adatta ai principianti
#3,031 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, backend

Direzione di ricerca

Inizia da crates/engine/src/extensions.rs ed esamina IMAGERY.commands, poi segui la policy dei comandi e i test che verificano il blocco dell’estensione per raster.mosaic e raster.process. L’issue propone di rimuovere entrambe le voci da quell’elenco. Il lavoro è concluso quando i plugin e le sessioni CLI o Python predefinite possono chiamarli con Imagery disabilitato e i test della policy sono stati aggiornati per confermare questo comportamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Before you start
What problem does this solve?

We port the Isoliner QGIS plugin to RustGIS as a process plugin: https://github.com/Valery35/isoliner-rustgis (v0.1.20). Tools 2.01 and 2.02 download DEM and topobase tiles for an extent (GLO-30, Mapzen) and merge them into one relief. The tile names and URLs are already computed in Rust (dem_fetch.rs).

A plugin can download a tile with layer.addUrl, but it cannot merge the tiles into one raster:

  • raster.mosaic is listed in the Imagery extension (crates/engine/src/extensions.rs, IMAGERY.commands), and that extension is default_on: false.
  • A plugin can't turn an extension on: extension.enable is reserved.
  • A plugin can't count on the user having turned Imagery on, and in the command line and Python sessions extensions start at their defaults.

So a plugin can only add N separate tile layers, not the single DEM its tools need. #2823 asked to take raster.mosaic out of the Imagery extension; it is closed, but in v0.8.0 raster.mosaic is still in IMAGERY.commands and still refused with the extension off.

Proposed solution

One of:

  1. Take raster.mosaic out of the Imagery extension, as #2823 asked: it is a general raster step (elevation, soil, rainfall), not imagery-only. raster.process (clip) has the same problem.
  2. Or let a plugin call raster.mosaic regardless of the extension state, the way it can call layer.addUrl and layer.addData today.
  3. Or a plugin-facing helper that downloads a list of URLs and mosaics them into one raster in a single call (the DEM case), so a plugin doesn't have to add N layers and merge them.

Option 1 is the smallest: move "raster.mosaic" (and "raster.process") out of IMAGERY.commands. The command itself already works without the extension's other pieces.

Estimated scope

Small: move two entries out of IMAGERY.commands, check the command policy and the tests that expect the extension gate.

Alternatives considered
  • Adding the tiles as separate layers and letting the user merge them by hand. That is what we do today, and it is not the single DEM the tools take.
  • Downloading tiles through host.fetch. It returns text and JSON, not bytes; #2428 asks for a byte range of a remote file, but a whole GeoTIFF tile is a different case.
  • Shipping our own mosaic in the plugin. It would duplicate raster.mosaic, and the plugin would still need the tiles as layers or files.
Additional context

RustGIS 0.8.0. Plugin: https://github.com/Valery35/isoliner-rustgis. Raster inputs for plugin tools are tracked in #1933; binary fetch in #2428. The two DEM tools are 2.01 (dem_download) and 2.02 (topobase_download) in the QGIS Isoliner module.

Lingua principale
Rust
Stelle
1.9k
Fork
268
Merge medio
8h 21m
PR unite (30g)
936

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di opengeos/RustGIS

Tutte le issue di opengeos/RustGIS

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.