[Feature]: Reusable spatial indexing for map queries and snapping
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
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- data-visualization
Direzione di ricerca
Start with Map::hits_at and hits_in in crates/map/src/lib.rs, then read the snapping entry points in crates/engine/src/cmd/design.rs and related work in issues #818, #2051, #1065, and #2032. Decide how reusable indexes should be owned and kept valid across geometry, projection, and streamed-content changes while preserving feature and vertex identities. Done means a map-level query and snapping API handles the stated visibility, scale, filter, and exclusion rules; the issue provides no tests or benchmark criteria.
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?
Problem and proposal
Looking at main as of November 17, 2026 (cca86cb):
- Map::hits_at and hits_in primarily iterate over loaded features.
- Snapping scans feature vertices and segments, and its public entry points still require a Session.
- The snapping path calls Geometry::extent(), which traverses coordinates to calculate the bounding box.
Relevant code: map queries, snapping.
Projection and some query results are cached, but continuous interaction with large layers or complex geometries may still incur substantial scanning costs. This is a source-level observation; I have not benchmarked these paths.
Could RustGIS provide a reusable spatial query/snapping API that works with an existing Map, independently of Session?
Ideally, it would:
- Reuse indexes across queries, updating or invalidating them when geometry, projection, or streamed content changes.
- Respect layer visibility, scale ranges, and feature filters.
- Preserve source feature/vertex identities and snapping exclusion rules.
- Handle both many features and individual geometries with many vertices efficiently.
Related work
RustGIS already has file-level and analysis indexes. This proposal focuses on map interaction:
- #1119, #1148, #1928 added indexing to analysis and topology operations.
- #818 and #2051 improved snapping identity handling and cache invalidation.
- #1065 and #2032 track streamed rendering and per-layer coordinate systems, which this design should coordinate with.
Proposed solution
QGIS reference
QGIS separates these responsibilities into:
- QgsSpatialIndex: a general-purpose feature R-tree.
- QgsPointLocator: indexed, layer-level location queries.
- QgsSnappingUtils: shared snapping configuration and queries, with full-layer, local, and hybrid indexing strategies.
This is a reference for reusable APIs and ownership boundaries, not a request to copy a particular implementation.
Estimated scope
Medium: a broader feature that is feasible in a reasonable timeframe
Alternatives considered
No response
- 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