developmentseed / developmentseed/cng-sandbox
feat(frontend): metadata search and nearest-neighbor lookup on point layers
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
## Problem
Once a point dataset is loaded, there's no way to find specific features by name/attribute or locate neighbors of a clicked point.
## Proposal
Borrow the real-time search + nearest-neighbor UX from [Geospatial Atlas](https://github.com/do-me/geospatial-atlas). Free-text search over an indexed column; click a point to see k-nearest neighbors highlighted.
## Scope
- Search bar on the map view for point layers with a searchable text column
- User picks which column is indexed (similar UX to category label editing on categorical rasters)
- Index built client-side via DuckDB WASM for small/medium datasets; server-side full-text via Postgres for large ones
- Click-to-find-neighbors using spatial distance (KNN)
## Dependencies
Pairs well with #216 and #219. Client-side index reuses the DuckDB WASM plumbing from #217.
## References
- https://github.com/do-me/geospatial-atlas
Contributor guide
Research direction
Start with the map view and review the DuckDB WASM plumbing from #217, then compare the proposed search and nearest-neighbor UX with Geospatial Atlas. Clarify how the searchable column is selected and how client-side versus Postgres indexing is chosen. Done means point-layer text search works and clicking a point highlights its k-nearest neighbors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres, typescript, wasm
- Domain
- databases, frontend, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100