[Feature]: A mask for tile layers (WMS, XYZ…), as layer.mask gives feature and raster layers
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
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust, web-dev
- Ambito
- backend-api-design, databases, frontend
Direzione di ricerca
Start by tracing map.setTiles, map.addTiles, and service.add, then compare how feature and raster layers implement masking. Follow the tile drawing, project save and removal, properties UI, identify, render, and export paths named in the proposal. Done means all listed commands and UI support masks, outside pixels are omitted in view and export, clearing and removing a mask behave as specified, and the tests pass.
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 tile layer (XYZ, WMS, WMTS, ArcGIS map service) can't be cut to a polygon. layer.mask takes a polygon layer and masks a feature or raster layer, but a tile layer isn't a layer it can be given (map.addTiles and map.setTiles have no mask), so a WMS map of a country or of the world always draws everywhere.
A study area's map then shows the service's picture outside the area too, while every other layer of the area is cut to it. There is no workaround inside RustGIS:
- A WMS
GetMappicture can't be opened as a raster, so it can't be clipped.layer.addUrlon a PNGGetMapaddress answers "not a data format RustGIS reads". - Many services offer no GeoTIFF
GetMap, and no WCS of the same product.
Proposed solution
A mask on a tile layer, as feature and raster layers have: the tile layer draws only inside the polygons of a polygon layer.
Choices in this proposal
- Commands:
map.setTilestakes"mask": polygon layer | null, aslayer.maskdoes;map.addTilesandservice.addtake it too, so a layer can be added already cut.
- Drawing: the same as
layer.maskfor a raster, applied to the tile layer's drawn picture: its pixels outside the mask's polygons are left out. Map view, layouts and exports all draw it this way. - Saved: the mask is kept in the project with the tile layer, by the mask layer's id, and handled as a feature or raster layer's mask is when that layer is removed.
- UI: the tile layer's properties get the Masking choice that feature and raster layers have.
- Identify: a click outside the mask doesn't ask a WMS layer for its feature info.
- Tests:
- a tile layer masked by a polygon draws nothing outside it, both in a render and in an export;
"mask": nullremoves the mask;- removing the mask layer leaves the tile layer as a raster's mask leaves its layer.
Alternatives considered
- Veil: a polygon with a hole for the area, drawn over the tiles in the paper's colour. It also hides the basemap and other layers outside the area, and it has to be kept above the tiles by hand.
- Clip the service's data: only possible where the service offers a GeoTIFF or a WCS, which the drought maps of the Copernicus Global Drought Observatory, for one, don't (their WCS gives colour classes, and not every product).
Additional context
This came up in the BrasilData plugin, which adds the Copernicus Global Drought Observatory's drought maps (WMS) over a study area. Every other BrasilData layer is clipped to the area, and the drought map is not.
- 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