Skip to content

Adding configurable base layers, including adding wms options for moon and mars#13

Open
bedwards-ibm wants to merge 1 commit intomainfrom
planetary-base-layers
Open

Adding configurable base layers, including adding wms options for moon and mars#13
bedwards-ibm wants to merge 1 commit intomainfrom
planetary-base-layers

Conversation

@bedwards-ibm
Copy link
Copy Markdown
Contributor

Generated PR message for Moon and Mars base layer implementation:

🌙 Add Moon and Mars Base Layers with Per-Layer Configuration

Summary

Implements support for Moon and Mars WMS base layers in the Cesium map viewer with automatic base layer switching based on per-layer configuration. Users can now visualize lunar and Martian datasets with appropriate celestial body imagery.

Features Added

1. New Celestial Body Base Layers

  • Moon: Lunar Reconnaissance Orbiter Wide Angle Camera Global Mosaic (WMS: https://wms.im-ldi.com/, layer: luna_wac_global)
  • Mars: Mars Viking Mission MDIM 2.1 Global Mosaic (WMS: https://wms.im-ldi.com/, layer: mars_viking_mdim2.1)

Both layers are permanently visible in the Cesium base layer picker under "Celestial Bodies" category.

2. Per-Layer Base Layer Configuration

Introduced baseLayer property for datasets and layers. Valid values: "earth" (default), "moon", "mars", "solar" (reserved)

3. Automatic Base Layer Switching

System automatically switches to the appropriate base layer when loading datasets with baseLayer property. Users can manually override at any time.

Technical Implementation

Modified: app/js/components/inference/app-map.js - Added WMS providers, switchBaseLayer() method, and automatic switching logic

Documentation: docs/BASE_LAYER_CONFIGURATION.md, docs/API_EXAMPLES.md, docs/CELESTIAL_BODY_BASE_LAYERS_SUMMARY.md, PLAN.md

Backend Requirements

Backend APIs must include baseLayer property in dataset and layer responses. See docs/API_EXAMPLES.md for examples and database migration guide.

Known Limitations

  • Solar base layer reserved but not implemented
  • Base layer selection doesn't persist across page refreshes
  • Switching to "earth" doesn't select specific Earth provider

Note: This PR includes unrelated additional info panel changes. Consider splitting into separate PRs if needed.

Copy link
Copy Markdown
Contributor

@cwachira cwachira left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines +324 to +333
## References

- **Implementation Plan**: `PLAN.md`
- **Configuration Guide**: `docs/BASE_LAYER_CONFIGURATION.md`
- **API Examples**: `docs/API_EXAMPLES.md`
- **Modified Code**: `app/js/components/inference/app-map.js`

## Contact

For questions or issues related to this implementation, please refer to the documentation files or check the browser console for debugging information. No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bedwards-ibm we might need to clean up the info added to the docs like reference to files that aren't available (PLAN.md, docs/API_EXAMPLES.md)

Comment on lines +216 to +237
## Next Steps for Backend Team

1. **Update Database Schema** (if needed)
```sql
ALTER TABLE datasets ADD COLUMN base_layer VARCHAR(50) DEFAULT 'earth';
ALTER TABLE layers ADD COLUMN base_layer VARCHAR(50) DEFAULT 'earth';
```

2. **Update API Responses**
- Include `baseLayer` in dataset GET responses
- Include `baseLayer` in layer GET responses
- See `docs/API_EXAMPLES.md` for detailed examples

3. **Identify Existing Lunar/Mars Datasets**
- Review existing datasets
- Update `baseLayer` property for lunar datasets to `"moon"`
- Update `baseLayer` property for Mars datasets to `"mars"`

4. **Test Integration**
- Load a lunar dataset in the UI
- Verify automatic switch to Moon base layer
- Check browser console for switching messages
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This section is on next steps for backend team, should we create some issues that the team needs to work on?

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