Add interactive osm map to the vis server with points/polygons overlaid#666
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an interactive OpenStreetMap/Leaflet map tile to the visualization server, overlaying each window’s geometry, and improves OpenStreetMap data source ergonomics (better config parsing + earlier failure for missing extracts).
Changes:
- Add Leaflet-based per-window interactive map to the vis UI (with server-side proxying for Leaflet assets and basemap tiles).
- Add
window_geometry_geojson()helper to serialize window geometry into WGS84 GeoJSON for the UI. - Improve OpenStreetMap data source: accept feature type strings in configs and raise a clearer error when multiple configured PBF extracts are missing; add integration tests for both.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/data_sources/test_openstreetmap.py | Adds coverage for missing-PBF error behavior and jsonargparse parsing of OSM feature type strings. |
| rslearn/vis/vis_server.py | Proxies Leaflet assets + OSM tiles via Flask routes and injects per-window geometry into the template context. |
| rslearn/vis/utils.py | Adds GeoJSON serialization for Window geometry in WGS84. |
| rslearn/vis/templates/visualization.html | Renders a Leaflet map per window and overlays the geometry (polygon outline / point marker). |
| rslearn/data_sources/openstreetmap.py | Adds feature-type string coercion and early FileNotFoundError when configured PBF extracts are missing; resolves local ds_path for consistent joins. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
June 12, 2026 19:12
…enai/rslearn into piperw/add-map-to-vis-server
favyen2
reviewed
Jun 22, 2026
favyen2
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add interactive map with the ROI highlighted (just a bbox for points and polygons) to the vis server for each window visualized.