feat: set_gee_layer_visualization tool for EE layer styling#64
Merged
Conversation
Adds an Earth Engine native visualization tool so palette, band, and min/max changes for loaded EE layers re-render through ee.Image.getMapId instead of falling back to QGIS raster symbology. Excludes the QGIS set_layer_symbology tool from the gee_data_catalogs agent and resolves common palette names such as terrain, viridis, and grayscale.
|
🚀 Deployed on https://69f4a394827d16b70c0499ee--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated GEE Data Catalogs tool for styling already-loaded Earth Engine layers by re-rendering them with Earth Engine vis_params, and updates the GEE agent wiring/prompt to prefer this tool over QGIS raster symbology.
Changes:
- Introduces
set_gee_layer_visualizationtool to update EE layer visualization (bands/min/max/palette) by re-adding the EE layer with updatedvis_params. - Adds common palette name resolution (e.g.,
terrain,viridis,grayscale) when building EEvis_params. - Excludes
set_layer_symbologyfrom thefor_gee_data_catalogsagent tool surface and updates/extends tests and the GEE system prompt accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tests/test_gee_data_catalogs_tools.py |
Extends tool-surface/prompt assertions and adds a unit test covering visualization updates on registered EE layers. |
geoagent/tools/gee_data_catalogs.py |
Adds palette-name resolution, refactors loaded-layer lookup to return (name, object, vis_params), and implements set_gee_layer_visualization. |
geoagent/core/factory.py |
Updates the GEE system prompt to direct symbology requests to the new tool and excludes set_layer_symbology from the GEE agent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Document that _get_loaded_gee_layer_payload also accepts unambiguous case-insensitive partial matches and raises KeyError on ambiguity. - Mirror the same matching/error semantics in the _get_loaded_gee_object docstring. - Clarify set_gee_layer_visualization output_layer_name: when it differs from the matched layer, the styled output is added as a new layer and the matched layer is preserved in place.
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.
Summary
set_gee_layer_visualizationtool that re-renders loaded Earth Engine layers via Earth Enginevis_params(bands, min/max, palette) instead of QGIS raster symbology.set_layer_symbologytool from thefor_gee_data_catalogsagent and update the system prompt so symbology requests on EE layers route to the new tool.terrain,viridis,grayscale, etc.) into hex color lists when building EEvis_params.Test plan
pytest tests/test_gee_data_catalogs_tools.py -qpre-commit run --all-files