Skip to content

Add interactive osm map to the vis server with points/polygons overlaid#666

Merged
piperwolters merged 8 commits into
masterfrom
piperw/add-map-to-vis-server
Jun 24, 2026
Merged

Add interactive osm map to the vis server with points/polygons overlaid#666
piperwolters merged 8 commits into
masterfrom
piperw/add-map-to-vis-server

Conversation

@piperwolters

@piperwolters piperwolters commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Add interactive map with the ROI highlighted (just a bbox for points and polygons) to the vis server for each window visualized.

Screenshot 2026-06-09 at 3 03 52 PM Screenshot 2026-06-09 at 3 04 15 PM

@piperwolters piperwolters marked this pull request as ready for review June 12, 2026 19:06
@piperwolters piperwolters requested a review from Copilot June 12, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread rslearn/vis/vis_server.py Outdated
Comment thread rslearn/vis/vis_server.py Outdated
@piperwolters piperwolters requested a review from favyen2 June 12, 2026 19:25
Comment thread rslearn/data_sources/openstreetmap.py Outdated
Comment thread rslearn/vis/utils.py Outdated
Comment thread rslearn/vis/vis_server.py Outdated
Comment thread rslearn/vis/vis_server.py Outdated
Comment thread rslearn/vis/vis_server.py Outdated
Comment thread tests/integration/data_sources/test_openstreetmap.py Outdated
@piperwolters piperwolters requested a review from favyen2 June 23, 2026 23:42
@piperwolters piperwolters merged commit 1c9faed into master Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants