Skip to content

feat: set_gee_layer_visualization tool for EE layer styling#64

Merged
giswqs merged 2 commits into
mainfrom
feat/gee-layer-visualization
May 1, 2026
Merged

feat: set_gee_layer_visualization tool for EE layer styling#64
giswqs merged 2 commits into
mainfrom
feat/gee-layer-visualization

Conversation

@giswqs

@giswqs giswqs commented May 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Add set_gee_layer_visualization tool that re-renders loaded Earth Engine layers via Earth Engine vis_params (bands, min/max, palette) instead of QGIS raster symbology.
  • Exclude the QGIS set_layer_symbology tool from the for_gee_data_catalogs agent and update the system prompt so symbology requests on EE layers route to the new tool.
  • Resolve common palette names (terrain, viridis, grayscale, etc.) into hex color lists when building EE vis_params.

Test plan

  • pytest tests/test_gee_data_catalogs_tools.py -q
  • pre-commit run --all-files

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.
Copilot AI review requested due to automatic review settings May 1, 2026 12:51
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 12:52 Inactive

Copilot AI left a comment

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.

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_visualization tool to update EE layer visualization (bands/min/max/palette) by re-adding the EE layer with updated vis_params.
  • Adds common palette name resolution (e.g., terrain, viridis, grayscale) when building EE vis_params.
  • Excludes set_layer_symbology from the for_gee_data_catalogs agent 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.

Comment thread geoagent/tools/gee_data_catalogs.py
Comment thread geoagent/tools/gee_data_catalogs.py Outdated
Comment thread geoagent/tools/gee_data_catalogs.py
- 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.
@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 12:59 Inactive
@giswqs giswqs merged commit 97a63d6 into main May 1, 2026
9 checks passed
@giswqs giswqs deleted the feat/gee-layer-visualization branch May 1, 2026 12:59
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.

2 participants